(git:f2099e5)
Loading...
Searching...
No Matches
gw_utils_dbcsr Module Reference

Common DBCSR matrix operations used by GW modules. More...

Functions/Subroutines

subroutine, public hadamard_product (matrix_a, matrix_b, matrix_c, factor)
 Computes the scaled element-wise product C = factor (A ◦ B) while preserving the block structure of A. Blocks absent from B are retained in C with zero values.
subroutine, public hadamard_product_inplace (matrix_a, matrix_b, factor)
 Form A = factor * (A element-wise B) without changing A's block structure.
subroutine, public dbcsr_contract_aba (trans_a_left, trans_a_right, matrix_a, matrix_b, matrix_c, eps_filter, retain_sparsity)
 Computes C=A B A^T or C=A^T B A for DBCSR matrices.

Detailed Description

Common DBCSR matrix operations used by GW modules.

History
09.2026 created Jan Wilhelm

Function/Subroutine Documentation

◆ hadamard_product()

subroutine, public gw_utils_dbcsr::hadamard_product ( type(dbcsr_type), intent(inout) matrix_a,
type(dbcsr_type), intent(inout) matrix_b,
type(dbcsr_type), intent(inout) matrix_c,
real(kind=dp), intent(in) factor )

Computes the scaled element-wise product C = factor (A ◦ B) while preserving the block structure of A. Blocks absent from B are retained in C with zero values.

Parameters
matrix_AFirst factor and source of the block structure
matrix_BSecond factor
matrix_CScaled element-wise product
factorScaling factor

Definition at line 38 of file gw_utils_dbcsr.F.

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

◆ hadamard_product_inplace()

subroutine, public gw_utils_dbcsr::hadamard_product_inplace ( type(dbcsr_type), intent(inout) matrix_a,
type(dbcsr_type), intent(inout) matrix_b,
real(kind=dp), intent(in) factor )

Form A = factor * (A element-wise B) without changing A's block structure.

Parameters
matrix_AFirst factor, overwritten by the product.
matrix_BSecond factor; a missing block represents zero.
factorProduct scale factor.

Definition at line 74 of file gw_utils_dbcsr.F.

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

◆ dbcsr_contract_aba()

subroutine, public gw_utils_dbcsr::dbcsr_contract_aba ( character(len=1), intent(in) trans_a_left,
character(len=1), intent(in) trans_a_right,
type(dbcsr_type), intent(inout) matrix_a,
type(dbcsr_type), intent(inout) matrix_b,
type(dbcsr_type), intent(inout) matrix_c,
real(kind=dp), intent(in) eps_filter,
logical, intent(in), optional retain_sparsity )

Computes C=A B A^T or C=A^T B A for DBCSR matrices.

Parameters
trans_A_lefttransposition applied to the left occurrence of A
trans_A_righttransposition applied to the right occurrence of A
matrix_Aleft and right matrix A
matrix_Binput matrix B
matrix_Coutput matrix C
eps_filterfiltering threshold for both matrix multiplications
retain_sparsityif true, only existing blocks of C are filled

Definition at line 112 of file gw_utils_dbcsr.F.

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