(git:691081d)
Loading...
Searching...
No Matches
gw_compute_z_lp_utils Module Reference

Shared numerical operations for computing the RI-RS matrix Z_lP. More...

Functions/Subroutines

subroutine, public build_gram_jacobi_blas (phi_local, n_local_grid, n_ao_used, tikhonov, d_local, d_vec_local)
 Forms the conditioned dense RI-RS matrix.
subroutine, public build_jacobi_diag_from_phi (phi_local, n_local_grid, n_ao_used, d_vec_local)
 Computes d_l = 1/sqrt(D_ll) = 1/Σ_μ Φ_μ(r_l)² without forming D.
subroutine, public scale_rows_by_diag (matrix, diagonal, nrow, ncol)
 Multiplies every matrix row by the corresponding diagonal entry: A(l, :) <- d_l A(l, :).
subroutine, public store_z_lp_columns (mat_z_lp, z_local, local_grid_idx, n_local_grid, n_loc_ri, atom_p, r_blk_sizes, row_offset, eps_filter)
 Stores dense Z_lP columns in the distributed block-sparse matrix.
subroutine, public solve_d_lp_distributed (phi_local, d_vec, d_lp, n_loc, n_ao, n_rhs, tikhonov, para_env_sub, blacs_env_sub, fm_struct_d, fm_struct_b, fm_d, fm_b, info)
 Solves D Z = d with ScaLAPACK for one RI atom and replicated inputs.

Detailed Description

Shared numerical operations for computing the RI-RS matrix Z_lP.

History
09.2026 created Jan Wilhelm

Function/Subroutine Documentation

◆ build_gram_jacobi_blas()

subroutine, public gw_compute_z_lp_utils::build_gram_jacobi_blas ( real(kind=dp), dimension(:, :), intent(in) phi_local,
integer, intent(in) n_local_grid,
integer, intent(in) n_ao_used,
real(kind=dp), intent(in) tikhonov,
real(kind=dp), dimension(:, :), intent(out), allocatable d_local,
real(kind=dp), dimension(:), intent(out) d_vec_local )

Forms the conditioned dense RI-RS matrix.

    D_ll'  = [Σ_μ Φ_μ(r_l) Φ_μ(r_l')]²,
    d_l    = 1/sqrt(D_ll),
    D'_ll' = d_l D_ll' d_l' + λ δ_ll'.

  Only the dense single-rank solve needs the complete matrix D'.
Parameters
phi_local...
n_local_grid...
n_ao_used...
tikhonov...
D_local...
d_vec_local...

Definition at line 61 of file gw_compute_Z_lP_utils.F.

Here is the caller graph for this function:

◆ build_jacobi_diag_from_phi()

subroutine, public gw_compute_z_lp_utils::build_jacobi_diag_from_phi ( real(kind=dp), dimension(:, :), intent(in) phi_local,
integer, intent(in) n_local_grid,
integer, intent(in) n_ao_used,
real(kind=dp), dimension(:), intent(out) d_vec_local )

Computes d_l = 1/sqrt(D_ll) = 1/Σ_μ Φ_μ(r_l)² without forming D.

Parameters
phi_local...
n_local_grid...
n_ao_used...
d_vec_local...

Definition at line 120 of file gw_compute_Z_lP_utils.F.

Here is the caller graph for this function:

◆ scale_rows_by_diag()

subroutine, public gw_compute_z_lp_utils::scale_rows_by_diag ( real(kind=dp), dimension(:, :), intent(inout) matrix,
real(kind=dp), dimension(:), intent(in) diagonal,
integer, intent(in) nrow,
integer, intent(in) ncol )

Multiplies every matrix row by the corresponding diagonal entry: A(l, :) <- d_l A(l, :).

Parameters
matrix...
diagonal...
nrow...
ncol...

Definition at line 157 of file gw_compute_Z_lP_utils.F.

Here is the caller graph for this function:

◆ store_z_lp_columns()

subroutine, public gw_compute_z_lp_utils::store_z_lp_columns ( type(dbcsr_type), intent(inout) mat_z_lp,
real(kind=dp), dimension(:, :), intent(in) z_local,
integer, dimension(:), intent(in) local_grid_idx,
integer, intent(in) n_local_grid,
integer, intent(in) n_loc_ri,
integer, intent(in) atom_p,
integer, dimension(:), intent(in) r_blk_sizes,
integer, dimension(:), intent(in) row_offset,
real(kind=dp), intent(in) eps_filter )

Stores dense Z_lP columns in the distributed block-sparse matrix.

Parameters
mat_Z_lP...
Z_local...
local_grid_idx...
n_local_grid...
n_loc_ri...
atom_P...
r_blk_sizes...
row_offset...
eps_filter...

Definition at line 196 of file gw_compute_Z_lP_utils.F.

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

◆ solve_d_lp_distributed()

subroutine, public gw_compute_z_lp_utils::solve_d_lp_distributed ( real(kind=dp), dimension(:, :), intent(in) phi_local,
real(kind=dp), dimension(:), intent(in) d_vec,
real(kind=dp), dimension(:, :), intent(inout) d_lp,
integer, intent(in) n_loc,
integer, intent(in) n_ao,
integer, intent(in) n_rhs,
real(kind=dp), intent(in) tikhonov,
type(mp_para_env_type), pointer para_env_sub,
type(cp_blacs_env_type), pointer blacs_env_sub,
type(cp_fm_struct_type), pointer fm_struct_d,
type(cp_fm_struct_type), pointer fm_struct_b,
type(cp_fm_type), intent(inout) fm_d,
type(cp_fm_type), intent(inout) fm_b,
integer, intent(out) info )

Solves D Z = d with ScaLAPACK for one RI atom and replicated inputs.

  Each rank builds its block-cyclic part of

    D'_ll' = d_l [Σ_μ Φ_μ(r_l) Φ_μ(r_l')]² d_l' + λ δ_ll'.

  The Cholesky solution is gathered into the replicated right-hand side.
Parameters
phi_local...
d_vec...
d_lp...
n_loc...
n_ao...
n_rhs...
tikhonov...
para_env_sub...
blacs_env_sub...
fm_struct_D...
fm_struct_b...
fm_D...
fm_b...
info...

Definition at line 265 of file gw_compute_Z_lP_utils.F.

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