Documentation for module qs_fb_atomic_matrix_methods

...

source: qs_fb_atomic_matrix_methods.F
Loading...

public Subroutines/Functions:

Calculates the atomic matrix size from a given DBCSR matrix and atomic halo. It also calculates the first row (col) or the row (col) atomic blocks in the atomic matrix
Constructs atomic matrix for filter basis method from a given DBCSR matrix and a set of atomic send and recv pairs corresponding to the matrix blocks that needs to be included in the atomic matrix. This version is for when we do MPI communications at every step, for each atomic matrix.
Constructs atomic matrix for filter basis method from a given DBCSR matrix and a set of atomic send and recv pairs corresponding to the matrix blocks that needs to be included in the atomic matrix. This version is for when we do MPI communications collectively in one go at the beginning.
generate list of blocks (atom pairs) of a DBCSR matrix to be sent and recived in order to construct all local atomic matrices corresponding to the atomic halos. This version is for the case when we do MPI communications collectively in one go at the beginning.

SUBROUTINEfb_atmatrix_calc_size(dbcsr_mat, atomic_halo, nrows, ncols, blk_row_start, blk_col_start)

Calculates the atomic matrix size from a given DBCSR matrix and atomic halo. It also calculates the first row (col) or the row (col) atomic blocks in the atomic matrix

Arguments:
TYPE(dbcsr_type),
POINTER
:: dbcsr_mat pointer to the DBCSR matrix the atomic matrix is to be constructed from
INTENT(in)
:: atomic_halo the atomic halo used for defining the atomic matrix from the DBCSR matrix
INTEGER,
INTENT(out)
:: nrows outputs total number of rows in the atomic matrix
INTEGER,
INTENT(out)
:: ncols outputs total number of cols in the atomic matrix
INTEGER,
INTENT(out)
:: blk_row_start(:) first row in each atomic blk row in the atomic matrix
INTEGER,
INTENT(out)
:: blk_col_start(:) first col in each atomic blk col in the atomic matrix

SUBROUTINEfb_atmatrix_construct(dbcsr_mat, atomic_halo, para_env, atomic_matrix, blk_row_start, blk_col_start)

Constructs atomic matrix for filter basis method from a given DBCSR matrix and a set of atomic send and recv pairs corresponding to the matrix blocks that needs to be included in the atomic matrix. This version is for when we do MPI communications at every step, for each atomic matrix.

Arguments:
TYPE(dbcsr_type),
POINTER
:: dbcsr_mat the DBCSR matrix the atomic matrix is to be constructed from
INTENT(in)
:: atomic_halo the atomic halo conrresponding to this atomic matrix
POINTER
:: para_env cp2k parallel environment
REAL(dp),
INTENT(out)
:: atomic_matrix(:,:) the atomic matrix to be constructed, it should have already been allocated prior entering this subroutine
INTEGER,
INTENT(in)
:: blk_row_start(:) first row in each atomic blk row in the atomic matrix
INTEGER,
INTENT(in)
:: blk_col_start(:) first col in each atomic blk col in the atomic matrix

SUBROUTINEfb_atmatrix_construct_2(matrix_storage, atomic_halo, atomic_matrix, blk_row_start, blk_col_start)

Constructs atomic matrix for filter basis method from a given DBCSR matrix and a set of atomic send and recv pairs corresponding to the matrix blocks that needs to be included in the atomic matrix. This version is for when we do MPI communications collectively in one go at the beginning.

Arguments:
INTENT(in)
:: matrix_storage data storing the relevant DBCSR matrix blocks needed for constructing the atomic matrix
INTENT(in)
:: atomic_halo the atomic halo conrresponding to this atomic matrix
REAL(dp),
INTENT(out)
:: atomic_matrix(:,:) the atomic matrix to be constructed, it should have already been allocated prior entering this subroutine
INTEGER,
INTENT(in)
:: blk_row_start(:) first row in each atomic blk row in the atomic matrix
INTEGER,
INTENT(in)
:: blk_col_start(:) first col in each atomic blk col in the atomic matrix

SUBROUTINEfb_atmatrix_generate_com_pairs_2(dbcsr_mat, atomic_halos, para_env, atom_pairs_send, atom_pairs_recv)

generate list of blocks (atom pairs) of a DBCSR matrix to be sent and recived in order to construct all local atomic matrices corresponding to the atomic halos. This version is for the case when we do MPI communications collectively in one go at the beginning.

Arguments:
TYPE(dbcsr_type),
POINTER
:: dbcsr_mat The DBCSR matrix the atom blocks come from
INTENT(in)
:: atomic_halos the list of all atomic halos local to the process
POINTER
:: para_env cp2k parallel environment
INTENT(inout)
:: atom_pairs_send list of atom blocks from local DBCSR matrix data to be sent
INTENT(inout)
:: atom_pairs_recv list of atom blocks from remote DBCSR matrix data to be recveived