(git:34ef472)
iterate_matrix Module Reference

Routines useful for iterative matrix calculations. More...

Functions/Subroutines

recursive subroutine, public determinant (matrix, det, threshold)
 Computes the determinant of a symmetric positive definite matrix using the trace of the matrix logarithm via Mercator series: det(A) = det(S)det(I+X)det(S), where S=diag(sqrt(Aii),..,sqrt(Ann)) det(I+X) = Exp(Trace(Ln(I+X))) Ln(I+X) = X - X^2/2 + X^3/3 - X^4/4 + .. The series converges only if the Frobenius norm of X is less than 1. If it is more than one we compute (recursevily) the determinant of the square root of (I+X). More...
 
subroutine, public invert_taylor (matrix_inverse, matrix, threshold, use_inv_as_guess, norm_convergence, filter_eps, accelerator_order, max_iter_lanczos, eps_lanczos, silent)
 invert a symmetric positive definite diagonally dominant matrix More...
 
subroutine, public invert_hotelling (matrix_inverse, matrix, threshold, use_inv_as_guess, norm_convergence, filter_eps, accelerator_order, max_iter_lanczos, eps_lanczos, silent)
 invert a symmetric positive definite matrix by Hotelling's method explicit symmetrization makes this code not suitable for other matrix types Currently a bit messy with the options, to to be cleaned soon More...
 
subroutine, public matrix_sign_newton_schulz (matrix_sign, matrix, threshold, sign_order)
 compute the sign a matrix using Newton-Schulz iterations More...
 
subroutine, public matrix_sign_proot (matrix_sign, matrix, threshold, sign_order)
 compute the sign a matrix using the general algorithm for the p-th root of Richters et al. Commun. Comput. Phys., 25 (2019), pp. 564-585. More...
 
subroutine, public matrix_sign_submatrix (matrix_sign, matrix, threshold, sign_order, submatrix_sign_method)
 Submatrix method. More...
 
subroutine, public matrix_sign_submatrix_mu_adjust (matrix_sign, matrix, mu, nelectron, threshold, variant)
 Submatrix method with internal adjustment of chemical potential. More...
 
subroutine, public matrix_sqrt_newton_schulz (matrix_sqrt, matrix_sqrt_inv, matrix, threshold, order, eps_lanczos, max_iter_lanczos, symmetrize, converged)
 compute the sqrt of a matrix via the sign function and the corresponding Newton-Schulz iterations the order of the algorithm should be 2..5, 3 or 5 is recommended More...
 
subroutine, public matrix_sqrt_proot (matrix_sqrt, matrix_sqrt_inv, matrix, threshold, order, eps_lanczos, max_iter_lanczos, symmetrize, converged)
 compute the sqrt of a matrix via the general algorithm for the p-th root of Richters et al. Commun. Comput. Phys., 25 (2019), pp. 564-585. More...
 
subroutine, public matrix_exponential (matrix_exp, matrix, omega, alpha, threshold)
 ... More...
 

Detailed Description

Routines useful for iterative matrix calculations.

History
2010.10 created [Joost VandeVondele]
Author
Joost VandeVondele

Function/Subroutine Documentation

◆ determinant()

recursive subroutine, public iterate_matrix::determinant ( type(dbcsr_type), intent(inout)  matrix,
real(kind=dp), intent(inout)  det,
real(kind=dp), intent(in)  threshold 
)

Computes the determinant of a symmetric positive definite matrix using the trace of the matrix logarithm via Mercator series: det(A) = det(S)det(I+X)det(S), where S=diag(sqrt(Aii),..,sqrt(Ann)) det(I+X) = Exp(Trace(Ln(I+X))) Ln(I+X) = X - X^2/2 + X^3/3 - X^4/4 + .. The series converges only if the Frobenius norm of X is less than 1. If it is more than one we compute (recursevily) the determinant of the square root of (I+X).

Parameters
matrix...
det- determinant
threshold...
History
2015.04 created [Rustam Z Khaliullin]
Author
Rustam Z. Khaliullin

Definition at line 79 of file iterate_matrix.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ invert_taylor()

subroutine, public iterate_matrix::invert_taylor ( type(dbcsr_type), intent(inout), target  matrix_inverse,
type(dbcsr_type), intent(inout), target  matrix,
real(kind=dp), intent(in)  threshold,
logical, intent(in), optional  use_inv_as_guess,
real(kind=dp), intent(in), optional  norm_convergence,
real(kind=dp), intent(in), optional  filter_eps,
integer, intent(in), optional  accelerator_order,
integer, intent(in), optional  max_iter_lanczos,
real(kind=dp), intent(in), optional  eps_lanczos,
logical, intent(in), optional  silent 
)

invert a symmetric positive definite diagonally dominant matrix

Parameters
matrix_inverse...
matrix...
thresholdconvergence threshold nased on the max abs
use_inv_as_guesslogical whether input can be used as guess for inverse
norm_convergenceconvergence threshold for the 2-norm, useful for approximate solutions
filter_epsfilter_eps for matrix multiplications, if not passed nothing is filteres
accelerator_order...
max_iter_lanczos...
eps_lanczos...
silent...
History
2010.10 created [Joost VandeVondele] 2011.10 guess option added [Rustam Z Khaliullin]
Author
Joost VandeVondele

Definition at line 282 of file iterate_matrix.F.

Here is the caller graph for this function:

◆ invert_hotelling()

subroutine, public iterate_matrix::invert_hotelling ( type(dbcsr_type), intent(inout), target  matrix_inverse,
type(dbcsr_type), intent(inout), target  matrix,
real(kind=dp), intent(in)  threshold,
logical, intent(in), optional  use_inv_as_guess,
real(kind=dp), intent(in), optional  norm_convergence,
real(kind=dp), intent(in), optional  filter_eps,
integer, intent(in), optional  accelerator_order,
integer, intent(in), optional  max_iter_lanczos,
real(kind=dp), intent(in), optional  eps_lanczos,
logical, intent(in), optional  silent 
)

invert a symmetric positive definite matrix by Hotelling's method explicit symmetrization makes this code not suitable for other matrix types Currently a bit messy with the options, to to be cleaned soon

Parameters
matrix_inverse...
matrix...
thresholdconvergence threshold nased on the max abs
use_inv_as_guesslogical whether input can be used as guess for inverse
norm_convergenceconvergence threshold for the 2-norm, useful for approximate solutions
filter_epsfilter_eps for matrix multiplications, if not passed nothing is filteres
accelerator_order...
max_iter_lanczos...
eps_lanczos...
silent...
History
2010.10 created [Joost VandeVondele] 2011.10 guess option added [Rustam Z Khaliullin]
Author
Joost VandeVondele

Definition at line 469 of file iterate_matrix.F.

Here is the caller graph for this function:

◆ matrix_sign_newton_schulz()

subroutine, public iterate_matrix::matrix_sign_newton_schulz ( type(dbcsr_type), intent(inout)  matrix_sign,
type(dbcsr_type), intent(inout)  matrix,
real(kind=dp), intent(in)  threshold,
integer, intent(in), optional  sign_order 
)

compute the sign a matrix using Newton-Schulz iterations

Parameters
matrix_sign...
matrix...
threshold...
sign_order...
History
2010.10 created [Joost VandeVondele] 2019.05 extended to order byxond 2 [Robert Schade]
Author
Joost VandeVondele, Robert Schade

Definition at line 680 of file iterate_matrix.F.

Here is the caller graph for this function:

◆ matrix_sign_proot()

subroutine, public iterate_matrix::matrix_sign_proot ( type(dbcsr_type), intent(inout)  matrix_sign,
type(dbcsr_type), intent(inout)  matrix,
real(kind=dp), intent(in)  threshold,
integer, intent(in), optional  sign_order 
)

compute the sign a matrix using the general algorithm for the p-th root of Richters et al. Commun. Comput. Phys., 25 (2019), pp. 564-585.

Parameters
matrix_sign...
matrix...
threshold...
sign_order...
History
2019.03 created [Robert Schade]
Author
Robert Schade

Definition at line 1008 of file iterate_matrix.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ matrix_sign_submatrix()

subroutine, public iterate_matrix::matrix_sign_submatrix ( type(dbcsr_type), intent(inout)  matrix_sign,
type(dbcsr_type), intent(inout)  matrix,
real(kind=dp), intent(in)  threshold,
integer, intent(in), optional  sign_order,
integer, intent(in)  submatrix_sign_method 
)

Submatrix method.

Parameters
matrix_sign...
matrix...
threshold...
sign_order...
submatrix_sign_method...
History
2019.03 created [Robert Schade] 2019.06 impl. submatrix method [Michael Lass]
Author
Robert Schade, Michael Lass

Definition at line 1361 of file iterate_matrix.F.

Here is the caller graph for this function:

◆ matrix_sign_submatrix_mu_adjust()

subroutine, public iterate_matrix::matrix_sign_submatrix_mu_adjust ( type(dbcsr_type), intent(inout)  matrix_sign,
type(dbcsr_type), intent(inout)  matrix,
real(kind=dp), intent(inout)  mu,
integer, intent(in)  nelectron,
real(kind=dp), intent(in)  threshold,
integer, intent(in)  variant 
)

Submatrix method with internal adjustment of chemical potential.

Parameters
matrix_sign...
matrix...
mu...
nelectron...
threshold...
variant...
History
2020.05 Created [Michael Lass]
Author
Robert Schade, Michael Lass

Definition at line 1438 of file iterate_matrix.F.

Here is the caller graph for this function:

◆ matrix_sqrt_newton_schulz()

subroutine, public iterate_matrix::matrix_sqrt_newton_schulz ( type(dbcsr_type), intent(inout)  matrix_sqrt,
type(dbcsr_type), intent(inout)  matrix_sqrt_inv,
type(dbcsr_type), intent(inout)  matrix,
real(kind=dp), intent(in)  threshold,
integer, intent(in)  order,
real(kind=dp), intent(in)  eps_lanczos,
integer, intent(in)  max_iter_lanczos,
logical, optional  symmetrize,
logical, optional  converged 
)

compute the sqrt of a matrix via the sign function and the corresponding Newton-Schulz iterations the order of the algorithm should be 2..5, 3 or 5 is recommended

Parameters
matrix_sqrt...
matrix_sqrt_inv...
matrix...
threshold...
order...
eps_lanczos...
max_iter_lanczos...
symmetrize...
converged...
History
2010.10 created [Joost VandeVondele]
Author
Joost VandeVondele

Definition at line 1622 of file iterate_matrix.F.

Here is the caller graph for this function:

◆ matrix_sqrt_proot()

subroutine, public iterate_matrix::matrix_sqrt_proot ( type(dbcsr_type), intent(inout)  matrix_sqrt,
type(dbcsr_type), intent(inout)  matrix_sqrt_inv,
type(dbcsr_type), intent(inout)  matrix,
real(kind=dp), intent(in)  threshold,
integer, intent(in)  order,
real(kind=dp), intent(in)  eps_lanczos,
integer, intent(in)  max_iter_lanczos,
logical, optional  symmetrize,
logical, optional  converged 
)

compute the sqrt of a matrix via the general algorithm for the p-th root of Richters et al. Commun. Comput. Phys., 25 (2019), pp. 564-585.

Parameters
matrix_sqrt...
matrix_sqrt_inv...
matrix...
threshold...
order...
eps_lanczos...
max_iter_lanczos...
symmetrize...
converged...
History
2019.04 created [Robert Schade]
Author
Robert Schade

Definition at line 1869 of file iterate_matrix.F.

Here is the caller graph for this function:

◆ matrix_exponential()

subroutine, public iterate_matrix::matrix_exponential ( type(dbcsr_type), intent(inout)  matrix_exp,
type(dbcsr_type), intent(inout)  matrix,
real(kind=dp), intent(in)  omega,
real(kind=dp), intent(in)  alpha,
real(kind=dp), intent(in)  threshold 
)

...

Parameters
matrix_exp...
matrix...
omega...
alpha...
threshold...

Definition at line 2100 of file iterate_matrix.F.

Here is the caller graph for this function: