Parallel_Kpoints class for k-point parallelization.
More...
#include <parallel_kpoints.h>
|
| | Parallel_Kpoints () |
| | Default constructor.
|
| | ~Parallel_Kpoints () |
| | Destructor.
|
| void | kinfo (int &nkstot_in, const int &kpar_in, const int &my_pool_in, const int &rank_in_pool_in, const int &nproc_in, const int &nspin_in) |
| | Initialize k-point parallelization information.
|
| void | pool_collection (double &value, const double *wk, const int &ik) |
| | Collect value from each pool to wk.
|
| void | pool_collection (double *valuea, double *valueb, const ModuleBase::realArray &a, const ModuleBase::realArray &b, const int &ik) |
| | Collect value from each pool to overlap.
|
| void | pool_collection (std::complex< double > *value, const ModuleBase::ComplexArray &w, const int &ik) const |
| | Collect complex value from each pool.
|
| template<class T, class V> |
| void | pool_collection_aux (T *value, const V &w, const int &dim, const int &ik) const |
| | Auxiliary template function for pool collection.
|
| void | gatherkvec (const std::vector< ModuleBase::Vector3< double > > &vec_local, std::vector< ModuleBase::Vector3< double > > &vec_global) const |
| | Gather k-points from all processors.
|
| int | get_startpro_pool (const int &pool) const |
| | Get the first processor in the pool.
|
| int | get_max_nks_pool () const |
| | Get the maximum number of k-points in all pools.
|
|
| std::vector< int > | nks_pool |
| | K-point information.
|
| std::vector< int > | startk_pool |
| | the first k-point in each pool (without spin)
|
| std::vector< int > | whichpool |
| | whichpool[k]: the pool which k belongs to, dim: nkstot_np
|
| int | nkstot_np = 0 |
| | number of k-points without spin
|
| int | nks_np = 0 |
| | number of k-points without spin in the present pool
|
| int | kpar = 0 |
| | number of pools
|
| int | my_pool = 0 |
| | the pool index of the present processor
|
| int | rank_in_pool = 0 |
| | the rank in the present pool
|
| int | nproc = 1 |
| | number of processors
|
| int | nspin = 1 |
| | number of spins
|
|
| void | get_nks_pool (const int &nkstot) |
| | Get number of k-points in each pool.
|
| void | get_startk_pool (const int &nkstot) |
| | Get start k-point index for each pool.
|
| void | get_whichpool (const int &nkstot) |
| | Get which pool each k-point belongs to.
|
| void | set_startpro_pool () |
| | Set first processor for each pool.
|
|
| std::vector< int > | startpro_pool |
| | the first processor in each pool
|
Parallel_Kpoints class for k-point parallelization.
◆ Parallel_Kpoints()
| Parallel_Kpoints::Parallel_Kpoints |
( |
| ) |
|
|
inline |
◆ ~Parallel_Kpoints()
| Parallel_Kpoints::~Parallel_Kpoints |
( |
| ) |
|
|
inline |
◆ gatherkvec()
Gather k-points from all processors.
- Parameters
-
| vec_local | k-point vector in local processor |
| vec_global | k-point vector in all processors |
◆ get_max_nks_pool()
| int Parallel_Kpoints::get_max_nks_pool |
( |
| ) |
const |
|
inline |
Get the maximum number of k-points in all pools.
- Returns
- maximum number of k-points
◆ get_nks_pool()
| void Parallel_Kpoints::get_nks_pool |
( |
const int & | nkstot | ) |
|
|
private |
Get number of k-points in each pool.
- Parameters
-
| nkstot | total number of k-points |
◆ get_startk_pool()
| void Parallel_Kpoints::get_startk_pool |
( |
const int & | nkstot | ) |
|
|
private |
Get start k-point index for each pool.
- Parameters
-
| nkstot | total number of k-points |
◆ get_startpro_pool()
| int Parallel_Kpoints::get_startpro_pool |
( |
const int & | pool | ) |
const |
|
inline |
Get the first processor in the pool.
- Parameters
-
- Returns
- first processor in the pool
◆ get_whichpool()
| void Parallel_Kpoints::get_whichpool |
( |
const int & | nkstot | ) |
|
|
private |
Get which pool each k-point belongs to.
- Parameters
-
| nkstot | total number of k-points |
◆ kinfo()
| void Parallel_Kpoints::kinfo |
( |
int & | nkstot_in, |
|
|
const int & | kpar_in, |
|
|
const int & | my_pool_in, |
|
|
const int & | rank_in_pool_in, |
|
|
const int & | nproc_in, |
|
|
const int & | nspin_in ) |
Initialize k-point parallelization information.
- Parameters
-
| nkstot_in | total number of k-points |
| kpar_in | number of pools |
| my_pool_in | pool index of current processor |
| rank_in_pool_in | rank within pool |
| nproc_in | number of processors |
| nspin_in | number of spin components |
- Note
- the kpoints here are reduced after symmetry applied.
◆ pool_collection() [1/3]
| void Parallel_Kpoints::pool_collection |
( |
double & | value, |
|
|
const double * | wk, |
|
|
const int & | ik ) |
Collect value from each pool to wk.
- Parameters
-
| value | output collected value |
| wk | k-point weights |
| ik | k-point index |
◆ pool_collection() [2/3]
Collect value from each pool to overlap.
- Parameters
-
| valuea | output collected value a |
| valueb | output collected value b |
| a | input array a |
| b | input array b |
| ik | k-point index |
◆ pool_collection() [3/3]
| void Parallel_Kpoints::pool_collection |
( |
std::complex< double > * | value, |
|
|
const ModuleBase::ComplexArray & | w, |
|
|
const int & | ik ) const |
Collect complex value from each pool.
- Parameters
-
| value | output collected value |
| w | input complex array |
| ik | k-point index |
◆ pool_collection_aux()
template<class
T, class V>
| void Parallel_Kpoints::pool_collection_aux |
( |
T * | value, |
|
|
const V & | w, |
|
|
const int & | dim, |
|
|
const int & | ik ) const |
Auxiliary template function for pool collection.
- Parameters
-
| value | output collected value |
| w | input array |
| dim | dimension |
| ik | k-point index |
◆ set_startpro_pool()
| void Parallel_Kpoints::set_startpro_pool |
( |
| ) |
|
|
private |
Set first processor for each pool.
◆ kpar
| int Parallel_Kpoints::kpar = 0 |
◆ my_pool
| int Parallel_Kpoints::my_pool = 0 |
the pool index of the present processor
◆ nks_np
| int Parallel_Kpoints::nks_np = 0 |
number of k-points without spin in the present pool
◆ nks_pool
| std::vector<int> Parallel_Kpoints::nks_pool |
K-point information.
number of k-points in each pool (without spin)
◆ nkstot_np
| int Parallel_Kpoints::nkstot_np = 0 |
number of k-points without spin
◆ nproc
| int Parallel_Kpoints::nproc = 1 |
◆ nspin
| int Parallel_Kpoints::nspin = 1 |
◆ rank_in_pool
| int Parallel_Kpoints::rank_in_pool = 0 |
the rank in the present pool
◆ startk_pool
| std::vector<int> Parallel_Kpoints::startk_pool |
the first k-point in each pool (without spin)
◆ startpro_pool
| std::vector<int> Parallel_Kpoints::startpro_pool |
|
private |
the first processor in each pool
◆ whichpool
| std::vector<int> Parallel_Kpoints::whichpool |
whichpool[k]: the pool which k belongs to, dim: nkstot_np
The documentation for this class was generated from the following files: