ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Parallel_K2D< TK > Class Template Reference

#include <parallel_k2d.h>

Collaboration diagram for Parallel_K2D< TK >:

Public Member Functions

 Parallel_K2D ()
 private constructor
 ~Parallel_K2D ()
 private destructor
void set_para_env (int nks, const int &nw, const int &nb2d, const int &nproc, const int &my_rank, const int &nspin)
void distribute_hsk (hsolver::HSMatrix< TK > &hs, const std::vector< int > &ik_kpar, const int &nw)
void unset_para_env ()
void set_kpar (int kpar)
 set the number of k-points
int get_kpar () const
 get the number of k-points
int get_my_pool () const
 get my pool
Parallel_Kpoints * get_pKpoints () const
 get pKpoints
Parallel_Blkcyclic * get_p2D_global () const
 get p2D_global
Parallel_Blkcyclic * get_p2D_pool () const
 get p2D_pool

Public Attributes

std::vector< TK > hk_pool
std::vector< TK > sk_pool
MPI_Comm POOL_WORLD_K2D

Private Attributes

int kpar_ = 0
int NPROC_IN_POOL
int MY_POOL
int RANK_IN_POOL
std::unique_ptr< Parallel_Kpoints > Pkpoints
std::unique_ptr< Parallel_Blkcyclic > P2D_global
std::unique_ptr< Parallel_Blkcyclic > P2D_pool

Constructor & Destructor Documentation

◆ Parallel_K2D()

template<typename TK>
Parallel_K2D< TK >::Parallel_K2D ( )
inline

private constructor

◆ ~Parallel_K2D()

template<typename TK>
Parallel_K2D< TK >::~Parallel_K2D ( )
inline

private destructor

Member Function Documentation

◆ distribute_hsk()

template<typename TK>
void Parallel_K2D< TK >::distribute_hsk ( hsolver::HSMatrix< TK > & hs,
const std::vector< int > & ik_kpar,
const int & nw )

this function distributes the Hk and Sk matrices to hk_pool and sk_pool; hs supplies H(k) and S(k) for one k point, this class only redistributes them

Here is the caller graph for this function:

◆ get_kpar()

template<typename TK>
int Parallel_K2D< TK >::get_kpar ( ) const
inline

get the number of k-points

Here is the caller graph for this function:

◆ get_my_pool()

template<typename TK>
int Parallel_K2D< TK >::get_my_pool ( ) const
inline

get my pool

Here is the caller graph for this function:

◆ get_p2D_global()

template<typename TK>
Parallel_Blkcyclic * Parallel_K2D< TK >::get_p2D_global ( ) const
inline

get p2D_global

Here is the caller graph for this function:

◆ get_p2D_pool()

template<typename TK>
Parallel_Blkcyclic * Parallel_K2D< TK >::get_p2D_pool ( ) const
inline

get p2D_pool

Here is the caller graph for this function:

◆ get_pKpoints()

template<typename TK>
Parallel_Kpoints * Parallel_K2D< TK >::get_pKpoints ( ) const
inline

get pKpoints

Here is the caller graph for this function:

◆ set_kpar()

template<typename TK>
void Parallel_K2D< TK >::set_kpar ( int kpar)

set the number of k-points

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

◆ set_para_env()

template<typename TK>
void Parallel_K2D< TK >::set_para_env ( int nks,
const int & nw,
const int & nb2d,
const int & nproc,
const int & my_rank,
const int & nspin )

Public member functions this function sets the parallel environment for k-points parallelism including the glabal and pool 2D parallel distribution

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

◆ unset_para_env()

template<typename TK>
void Parallel_K2D< TK >::unset_para_env ( )

this function unsets the parallel environment for k-points parallelism including the glabal and pool 2D parallel distribution

Here is the caller graph for this function:

Member Data Documentation

◆ hk_pool

template<typename TK>
std::vector<TK> Parallel_K2D< TK >::hk_pool

the local Hk, Sk matrices in POOL_WORLD_K2D

◆ kpar_

template<typename TK>
int Parallel_K2D< TK >::kpar_ = 0
private

Private member variables

◆ MY_POOL

template<typename TK>
int Parallel_K2D< TK >::MY_POOL
private

◆ NPROC_IN_POOL

template<typename TK>
int Parallel_K2D< TK >::NPROC_IN_POOL
private

mpi info

◆ P2D_global

template<typename TK>
std::unique_ptr<Parallel_Blkcyclic> Parallel_K2D< TK >::P2D_global
private

◆ P2D_pool

template<typename TK>
std::unique_ptr<Parallel_Blkcyclic> Parallel_K2D< TK >::P2D_pool
private

◆ Pkpoints

template<typename TK>
std::unique_ptr<Parallel_Kpoints> Parallel_K2D< TK >::Pkpoints
private

the pointer to Parallel_Kpoints

◆ POOL_WORLD_K2D

template<typename TK>
MPI_Comm Parallel_K2D< TK >::POOL_WORLD_K2D

◆ RANK_IN_POOL

template<typename TK>
int Parallel_K2D< TK >::RANK_IN_POOL
private

◆ sk_pool

template<typename TK>
std::vector<TK> Parallel_K2D< TK >::sk_pool

The documentation for this class was generated from the following files: