Documentation for module hfx_communication

Routines for data exchange between MPI processes

source: hfx_communication.F
Loading...

public Subroutines/Functions:

- Distributes the local full Kohn-Sham matrix to all CPUS
create a several maps array that reflects the ks matrix sparsity
- Collects full density matrix from all CPUs
- Distributes the local full Kohn-Sham matrix to all CPUS. Is called in case of adiabatic rescaling. This is just a refactored version of distribute_ks_matrix

SUBROUTINEdistribute_ks_matrix(para_env, full_ks, ks_matrix, number_of_p_entries, block_offset, kind_of, basis_parameter, off_diag_fac, diag_fac)

- Distributes the local full Kohn-Sham matrix to all CPUS

Arguments:
POINTER
:: para_env ...
REAL(dp)
:: full_ks(:) The full Kohn-Sham matrix
TYPE(dbcsr_type),
POINTER
:: ks_matrix Distributed Kohn-Sham matrix
INTEGER,
INTENT(in)
:: number_of_p_entries Maximal buffer size
INTEGER,
POINTER
:: block_offset(:) ...
INTEGER
:: kind_of(*) ...
POINTER
:: basis_parameter(:) ...
REAL(dp),
INTENT(in),
OPTIONAL
:: off_diag_fac ...
REAL(dp),
INTENT(in),
OPTIONAL
:: diag_fac ...

SUBROUTINEget_atomic_block_maps(matrix, basis_parameter, kind_of, is_assoc_atomic_block, number_of_p_entries, para_env, atomic_block_offset, set_offset, block_offset, map_atoms_to_cpus, nkind)

create a several maps array that reflects the ks matrix sparsity

Arguments:
TYPE(dbcsr_type),
POINTER
:: matrix ...
:: basis_parameter(:) ...
INTEGER
:: kind_of(:) ...
INTEGER,
INTENT(out)
:: is_assoc_atomic_block(:,:) ...
INTEGER,
INTENT(out)
:: number_of_p_entries ...
POINTER
:: para_env ...
INTEGER,
POINTER
:: atomic_block_offset(:,:) ...
INTEGER,
POINTER
:: set_offset(:,:,:,:) ...
INTEGER,
POINTER
:: block_offset(:) ...
TYPE(hfx_2d_map),
POINTER
:: map_atoms_to_cpus(:) ...
INTEGER
:: nkind ...

SUBROUTINEget_full_density(para_env, full_density, rho, number_of_p_entries, block_offset, kind_of, basis_parameter, get_max_vals_spin, rho_beta, antisymmetric)

- Collects full density matrix from all CPUs

Arguments:
POINTER
:: para_env ...
REAL(dp)
:: full_density(:) The full Density matrix
TYPE(dbcsr_type),
POINTER
:: rho Distributed density
INTEGER,
INTENT(in)
:: number_of_p_entries Maximal buffer size
INTEGER,
POINTER
:: block_offset(:) ...
INTEGER
:: kind_of(*) ...
POINTER
:: basis_parameter(:) ...
LOGICAL,
INTENT(in)
:: get_max_vals_spin ...
TYPE(dbcsr_type),
OPTIONAL, POINTER
:: rho_beta ...
LOGICAL,
INTENT(in)
:: antisymmetric ...

SUBROUTINEscale_and_add_fock_to_ks_matrix(para_env, qs_env, ks_matrix, irep, scaling_factor)

- Distributes the local full Kohn-Sham matrix to all CPUS. Is called in case of adiabatic rescaling. This is just a refactored version of distribute_ks_matrix

Arguments:
POINTER
:: para_env ...
POINTER
:: qs_env ...
POINTER
:: ks_matrix(:,:) Distributed Kohn-Sham matrix
INTEGER,
INTENT(in)
:: irep ...
REAL(dp),
INTENT(in)
:: scaling_factor ...