ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
chg_parallel.h
Go to the documentation of this file.
1#ifndef CHG_PARALLEL_H
2#define CHG_PARALLEL_H
3
4// MPI reductions of charge-density arrays across k-point pools and band
5// groups. Stateless free functions extracted from Charge member functions;
6// the charge buffers and the parallel grid are supplied by the Charge
7// argument. The pool/band parallelization settings are passed explicitly
8// by the callers instead of reading GlobalV/PARAM.
9
10#ifdef __MPI
11
12class Charge;
13
14namespace module_charge
15{
16
26void reduce_diff_pools(double* array_rho, const Charge& chr, const int kpar,
27 const bool all_ks_run, const int bndpar);
28
39void rho_mpi(Charge& chr, const int kpar, const bool all_ks_run,
40 const int bndpar, const int nspin);
41
52void kin_r_mpi(Charge& chr, const int kpar, const bool all_ks_run,
53 const int bndpar, const int nspin);
54
55} // namespace module_charge
56
57#endif
58
59#endif // CHG_PARALLEL_H
Definition charge.h:24
Charge-density symmetrization free functions.
Definition charge.h:18
void rho_mpi(Charge &chr, const int kpar, const bool all_ks_run, const int bndpar, const int nspin)
Reduce rho across pools; also reduce kin_r when its buffer is allocated (meta-GGA functionals,...
Definition chg_parallel.cpp:41
void kin_r_mpi(Charge &chr, const int kpar, const bool all_ks_run, const int bndpar, const int nspin)
Reduce kin_r across pools when its buffer is allocated (meta-GGA functionals, or ELF output requested...
Definition chg_parallel.cpp:68
void reduce_diff_pools(double *array_rho, const Charge &chr, const int kpar, const bool all_ks_run, const int bndpar)
Reduce a real-space array across k-point pools and band groups.
Definition chg_parallel.cpp:16