Documentation for module ls_matrix_exp

Routines for calculating a complex matrix exponential with dbcsr matrices. Based on the code in matrix_exp.F from Florian Schiffmann

source: ls_matrix_exp.F
Loading...

public Subroutines/Functions:

The Baker-Campbell-Hausdorff expansion for a complex exponent (e.g. rtp) Works for a non unitary propagator, because the density matrix is hermitian
The Baker-Campbell-Hausdorff expansion for a purely imaginary exponent (e.g. rtp) Works for a non unitary propagator, because the density matrix is hermitian
Convenience function. Computes the matrix multiplications needed for the multiplication of complex sparse matrices. C = beta * C + alpha * ( A ** transa ) * ( B ** transb )
subroutine for general complex matrix exponentials on input a separate cp_fm_type for real and complex part on output a size 2 cp_fm_p_type, first element is the real part of the exponential second the imaginary
specialized subroutine for purely imaginary matrix exponentials

SUBROUTINEbch_expansion_complex_propagator(propagator_re, propagator_im, density_re, density_im, filter_eps, filter_eps_small, eps_exp)

The Baker-Campbell-Hausdorff expansion for a complex exponent (e.g. rtp) Works for a non unitary propagator, because the density matrix is hermitian

Arguments:
TYPE(dbcsr_type),
POINTER
:: propagator_re Real part of the exponent
TYPE(dbcsr_type),
POINTER
:: propagator_im Imaginary part of the exponent
TYPE(dbcsr_type),
POINTER
:: density_re Real part of the density matrix
TYPE(dbcsr_type),
POINTER
:: density_im Imaginary part of the density matrix
REAL(dp),
INTENT(in)
:: filter_eps The filtering threshold for all matrices
REAL(dp),
INTENT(in)
:: filter_eps_small ...
REAL(dp),
INTENT(in)
:: eps_exp The accuracy of the exponential

SUBROUTINEbch_expansion_imaginary_propagator(propagator, density_re, density_im, filter_eps, filter_eps_small, eps_exp)

The Baker-Campbell-Hausdorff expansion for a purely imaginary exponent (e.g. rtp) Works for a non unitary propagator, because the density matrix is hermitian

Arguments:
TYPE(dbcsr_type),
POINTER
:: propagator The exponent of the matrix exponential
TYPE(dbcsr_type),
POINTER
:: density_re Real part of the density matrix
TYPE(dbcsr_type),
POINTER
:: density_im Imaginary part of the density matrix
REAL(dp),
INTENT(in)
:: filter_eps The filtering threshold for all matrices
REAL(dp),
INTENT(in)
:: filter_eps_small ...
REAL(dp),
INTENT(in)
:: eps_exp The accuracy of the exponential

SUBROUTINEcp_complex_dbcsr_gemm_3(transa, transb, alpha, a_re, a_im, b_re, b_im, beta, c_re, c_im, filter_eps)

Convenience function. Computes the matrix multiplications needed for the multiplication of complex sparse matrices. C = beta * C + alpha * ( A ** transa ) * ( B ** transb )

Arguments:
CHARACTER(1),
INTENT(in)
:: transa 'N' -> normal 'T' -> transpose alpha,beta :: can be 0.0_dp and 1.0_dp
CHARACTER(1),
INTENT(in)
:: transb ...
REAL(dp),
INTENT(in)
:: alpha ...
TYPE(dbcsr_type),
INTENT(in)
:: a_re m x k matrix ( ! for transa = 'N'), real part
TYPE(dbcsr_type),
INTENT(in)
:: a_im m x k matrix ( ! for transa = 'N'), imaginary part
TYPE(dbcsr_type),
INTENT(in)
:: b_re k x n matrix ( ! for transb = 'N'), real part
TYPE(dbcsr_type),
INTENT(in)
:: b_im k x n matrix ( ! for transb = 'N'), imaginary part
REAL(dp),
INTENT(in)
:: beta ...
TYPE(dbcsr_type),
INTENT(inout)
:: c_re m x n matrix, real part
TYPE(dbcsr_type),
INTENT(inout)
:: c_im m x n matrix, imaginary part
REAL(dp),
INTENT(in),
OPTIONAL
:: filter_eps ...

SUBROUTINEtaylor_full_complex_dbcsr(exp_h, re_part, im_part, nsquare, ntaylor, filter_eps)

subroutine for general complex matrix exponentials on input a separate cp_fm_type for real and complex part on output a size 2 cp_fm_p_type, first element is the real part of the exponential second the imaginary

Arguments:
:: exp_h(2) ...
TYPE(dbcsr_type),
POINTER
:: re_part ...
TYPE(dbcsr_type),
POINTER
:: im_part ...
INTEGER,
INTENT(in)
:: nsquare ...
INTEGER,
INTENT(in)
:: ntaylor ...
REAL(dp),
INTENT(in)
:: filter_eps ...

SUBROUTINEtaylor_only_imaginary_dbcsr(exp_h, im_matrix, nsquare, ntaylor, filter_eps)

specialized subroutine for purely imaginary matrix exponentials

Arguments:
:: exp_h(2) ...
TYPE(dbcsr_type),
POINTER
:: im_matrix ...
INTEGER,
INTENT(in)
:: nsquare ...
INTEGER,
INTENT(in)
:: ntaylor ...
REAL(dp),
INTENT(in)
:: filter_eps ...