![]() |
(git:27c966b)
|
Full-matrix operations not provided by the CP2K FM packages. More...
Data Types | |
| interface | fm_contract_aba |
Functions/Subroutines | |
| subroutine, public | cfm_contract_aba (matrix_a, matrix_b, matrix_c, workspace) |
| Computes A^H B A for complex full matrices. | |
| subroutine, public | local_add_on_diag (matrix, alpha) |
| Add a scalar to the diagonal of a local complex matrix. | |
| subroutine, public | local_complex_power (matrix, exponent, eps, cond_nr, min_ev, max_ev, relative_eps) |
| Compute a spectral power of a local complex Hermitian matrix. Eigenvalues not larger than eps (or relative_eps times the largest one) are discarded. | |
| subroutine, public | fm_invert (matrix_a, eigenvalue_threshold, unit_nr) |
| Inverts a symmetric matrix. First, Cholesky decomposition is tried. If it fails, the matrix is diagonalized and inverted by taking inverse eigenvalues. | |
| subroutine, public | fm_sqrt (matrix_a, matrix_b, eigenvalue_threshold, unit_nr) |
| For input A, computes B such that B^T B=A. First, Cholesky decomposition is tried. If it fails, B is computed by diagonalizing A. | |
| subroutine, public | fm_contract_aba (matrix_a, matrix_b, matrix_c) |
| Computes A^T B A. | |
Full-matrix operations not provided by the CP2K FM packages.
| subroutine, public gw_utils_fm::cfm_contract_aba | ( | type(cp_cfm_type), intent(in) | matrix_a, |
| type(cp_cfm_type), intent(inout) | matrix_b, | ||
| type(cp_cfm_type), intent(inout), optional | matrix_c, | ||
| type(cp_cfm_type), intent(inout), optional | workspace ) |
Computes A^H B A for complex full matrices.
| matrix_A | left and right matrix A; H denotes its Hermitian transpose |
| matrix_B | input matrix B; overwritten by A^H B A if matrix_C is absent |
| matrix_C | optional output matrix C=A^H B A |
| workspace | optional reusable scratch matrix with the same layout as A; its contents are overwritten and it must not alias the input or output matrices |
Definition at line 58 of file gw_utils_fm.F.
| subroutine, public gw_utils_fm::local_add_on_diag | ( | complex(kind=dp), dimension(:, :), intent(inout) | matrix, |
| complex(kind=dp), intent(in) | alpha ) |
Add a scalar to the diagonal of a local complex matrix.
| matrix | input/output matrix |
| alpha | scalar added to each diagonal element |
Definition at line 107 of file gw_utils_fm.F.
| subroutine, public gw_utils_fm::local_complex_power | ( | complex(kind=dp), dimension(:, :), intent(inout) | matrix, |
| real(kind=dp), intent(in) | exponent, | ||
| real(kind=dp), intent(in) | eps, | ||
| real(kind=dp), intent(out), optional | cond_nr, | ||
| real(kind=dp), intent(out), optional | min_ev, | ||
| real(kind=dp), intent(out), optional | max_ev, | ||
| real(kind=dp), intent(in), optional | relative_eps ) |
Compute a spectral power of a local complex Hermitian matrix. Eigenvalues not larger than eps (or relative_eps times the largest one) are discarded.
| matrix | input/output matrix |
| exponent | matrix exponent |
| eps | eigenvalue threshold |
| cond_nr | optional condition number |
| min_ev | optional minimum absolute eigenvalue |
| max_ev | optional maximum absolute eigenvalue |
| relative_eps | optional threshold relative to the largest eigenvalue |
Definition at line 133 of file gw_utils_fm.F.
| subroutine, public gw_utils_fm::fm_invert | ( | type(cp_fm_type), intent(inout) | matrix_a, |
| real(kind=dp), intent(in), optional | eigenvalue_threshold, | ||
| integer, intent(in), optional | unit_nr ) |
Inverts a symmetric matrix. First, Cholesky decomposition is tried. If it fails, the matrix is diagonalized and inverted by taking inverse eigenvalues.
| matrix_A | input A; output inverse or filtered pseudoinverse |
| eigenvalue_threshold | optional relative eigenvalue threshold |
| unit_nr | optional output unit for a failed Cholesky decomposition |
Definition at line 189 of file gw_utils_fm.F.
| subroutine, public gw_utils_fm::fm_sqrt | ( | type(cp_fm_type), intent(in) | matrix_a, |
| type(cp_fm_type), intent(inout) | matrix_b, | ||
| real(kind=dp), intent(in), optional | eigenvalue_threshold, | ||
| integer, intent(in), optional | unit_nr ) |
For input A, computes B such that B^T B=A. First, Cholesky decomposition is tried. If it fails, B is computed by diagonalizing A.
| matrix_A | symmetric input matrix A, retained unchanged |
| matrix_B | output matrix B |
| eigenvalue_threshold | optional relative eigenvalue threshold |
| unit_nr | optional output unit for a failed Cholesky decomposition |
Definition at line 235 of file gw_utils_fm.F.
| subroutine, public gw_utils_fm::fm_contract_aba | ( | type(cp_fm_type), intent(in) | matrix_a, |
| type(cp_fm_type), intent(inout) | matrix_b, | ||
| type(cp_fm_type), intent(inout), optional | matrix_c ) |
Computes A^T B A.
| matrix_A | left and right matrix A |
| matrix_B | input matrix B; overwritten by A^T B A if matrix_C is absent |
| matrix_C | optional output matrix C=A^T B A |
Definition at line 287 of file gw_utils_fm.F.