(git:d18deda)
Loading...
Searching...
No Matches
smeagol_matrix_utils Module Reference

Routines to convert sparse matrices between DBCSR (distributed-blocks compressed sparse rows) and SIESTA (distributed compressed sparse columns) formats. More...

Data Types

type  siesta_distrib_csc_struct_type
 Sparsity pattern of replicated SIESTA compressed sparse column (CSC) matrices. More...
 

Functions/Subroutines

subroutine, public siesta_struct_create (siesta_struct, matrix_dbcsr_kp, subsys, cell_to_index, sab_nl, para_env, max_ij_cell_image, do_merge, gather_root)
 Map non-zero matrix blocks between sparse matrices in DBCSR and SIESTA formats.
 
subroutine, public siesta_struct_release (siesta_struct)
 Release a SIESTA matrix structure.
 
subroutine, public convert_dbcsr_to_distributed_siesta (matrix_siesta, matrix_dbcsr_kp, siesta_struct, para_env)
 Convert matrix from DBCSR to sparse SIESTA format.
 
subroutine, public convert_distributed_siesta_to_dbcsr (matrix_dbcsr_kp, matrix_siesta, siesta_struct, para_env)
 Convert matrix from DBCSR to sparse SIESTA format.
 

Detailed Description

Routines to convert sparse matrices between DBCSR (distributed-blocks compressed sparse rows) and SIESTA (distributed compressed sparse columns) formats.

Author
Sergey Chulkov
Christian Ahart
Clotilde Cucinotta

Function/Subroutine Documentation

◆ siesta_struct_create()

subroutine, public smeagol_matrix_utils::siesta_struct_create ( type(siesta_distrib_csc_struct_type), intent(inout)  siesta_struct,
type(dbcsr_p_type), dimension(:), intent(in)  matrix_dbcsr_kp,
type(qs_subsys_type), pointer  subsys,
integer, dimension(:, :, :), pointer  cell_to_index,
type(neighbor_list_set_p_type), dimension(:), pointer  sab_nl,
type(mp_para_env_type), pointer  para_env,
integer, dimension(2), intent(inout)  max_ij_cell_image,
logical, intent(in)  do_merge,
integer, intent(in)  gather_root 
)

Map non-zero matrix blocks between sparse matrices in DBCSR and SIESTA formats.

Parameters
siesta_structstructure that stores metadata (sparsity pattern) of sparse SIESTA matrices
matrix_dbcsr_kpDBCSR matrices for each cell image
subsysQuickStep molecular system
cell_to_indexarray to convert 3-D cell indices to 1-D DBCSR image indices
sab_nlpair-wise neighbour list
para_envMPI parallel environment
max_ij_cell_imagelargest index of cell images along i and j cell vectors (e.g. (2,0) in case of 5 cell images (0,0), (1,0), (-1,0), (2,0), and (-2,0))
do_mergemerge DBCSR images along transport direction (k cell vector)
gather_rootdistribute non-zero matrix elements of SIESTA matrices across all parallel processes (-1), or gather them on the given MPI rank (>= 0).

Definition at line 161 of file smeagol_matrix_utils.F.

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

◆ siesta_struct_release()

subroutine, public smeagol_matrix_utils::siesta_struct_release ( type(siesta_distrib_csc_struct_type), intent(inout)  siesta_struct)

Release a SIESTA matrix structure.

Parameters
siesta_structstructure to release

Definition at line 378 of file smeagol_matrix_utils.F.

Here is the caller graph for this function:

◆ convert_dbcsr_to_distributed_siesta()

subroutine, public smeagol_matrix_utils::convert_dbcsr_to_distributed_siesta ( real(kind=dp), dimension(:), intent(out)  matrix_siesta,
type(dbcsr_p_type), dimension(:), intent(in)  matrix_dbcsr_kp,
type(siesta_distrib_csc_struct_type), intent(in)  siesta_struct,
type(mp_para_env_type), intent(in), pointer  para_env 
)

Convert matrix from DBCSR to sparse SIESTA format.

Parameters
matrix_siestamatrix in SIESTA format [out]
matrix_dbcsr_kpDBCSR matrix [in]
siesta_structstructure to map matrix blocks between formats
para_envMPI parallel environment

Definition at line 420 of file smeagol_matrix_utils.F.

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

◆ convert_distributed_siesta_to_dbcsr()

subroutine, public smeagol_matrix_utils::convert_distributed_siesta_to_dbcsr ( type(dbcsr_p_type), dimension(:), intent(in)  matrix_dbcsr_kp,
real(kind=dp), dimension(:), intent(in)  matrix_siesta,
type(siesta_distrib_csc_struct_type), intent(in)  siesta_struct,
type(mp_para_env_type), intent(in), pointer  para_env 
)

Convert matrix from DBCSR to sparse SIESTA format.

Parameters
matrix_dbcsr_kpDBCSR matrix [out]. The matrix is declared as INTENT(in) as pointers to dbcsr matrices remain intact. However we have intention to update matrix elements
matrix_siestamatrix in SIESTA format [in]
siesta_structstructure to map matrix blocks between formats
para_envMPI parallel environment

Definition at line 798 of file smeagol_matrix_utils.F.

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