Octopus
lalg_adv_oct_m::lalg_matrix_function Interface Reference

Detailed Description

Definition at line 228 of file lalg_adv.F90.

Private Member Functions

subroutine dlalg_matrix_function (n, factor, a, fun_a, fun, hermitian)
 This routine calculates a function of a matrix by using an eigenvalue decomposition. More...
 
subroutine zlalg_matrix_function (n, factor, a, fun_a, fun, hermitian)
 This routine calculates a function of a matrix by using an eigenvalue decomposition. More...
 

Member Function/Subroutine Documentation

◆ dlalg_matrix_function()

subroutine lalg_adv_oct_m::lalg_matrix_function::dlalg_matrix_function ( integer, intent(in)  n,
real(real64), intent(in)  factor,
real(real64), dimension(:, :), intent(in)  a,
real(real64), dimension(:, :), intent(inout)  fun_a,
  fun,
logical, intent(in)  hermitian 
)
private

This routine calculates a function of a matrix by using an eigenvalue decomposition.

For the hermitian case:

\[ A = V D V^T \implies fun(A) = V fun(D) V^T \]

and in general

\[ A = V D V^-1 \implies fun(A) = V fun(D) V^-1 \]

where \(V\) are the eigenvectors, and \(D\) is a diagonal matrix containing the eigenvalues.

In addition, this function can compute \(fun(factor*A)\) for a complex factor.

This is slow but it is simple to implement, and for the moment it does not affect performance.

Parameters
[in]ndimension of the matrix A
[in]factorcomplex factor
[in]amatrix A
[in,out]fun_afun(A)
[in]hermitianis the matrix hermitian?

Definition at line 3515 of file lalg_adv.F90.

◆ zlalg_matrix_function()

subroutine lalg_adv_oct_m::lalg_matrix_function::zlalg_matrix_function ( integer, intent(in)  n,
complex(real64), intent(in)  factor,
complex(real64), dimension(:, :), intent(in)  a,
complex(real64), dimension(:, :), intent(inout)  fun_a,
  fun,
logical, intent(in)  hermitian 
)
private

This routine calculates a function of a matrix by using an eigenvalue decomposition.

For the hermitian case:

\[ A = V D V^T \implies fun(A) = V fun(D) V^T \]

and in general

\[ A = V D V^-1 \implies fun(A) = V fun(D) V^-1 \]

where \(V\) are the eigenvectors, and \(D\) is a diagonal matrix containing the eigenvalues.

In addition, this function can compute \(fun(factor*A)\) for a complex factor.

This is slow but it is simple to implement, and for the moment it does not affect performance.

Parameters
[in]ndimension of the matrix A
[in]factorcomplex factor
[in]amatrix A
[in,out]fun_afun(A)
[in]hermitianis the matrix hermitian?

Definition at line 2088 of file lalg_adv.F90.


The documentation for this interface was generated from the following file: