ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Parallel_Grid Class Reference

#include <parallel_grid.h>

Collaboration diagram for Parallel_Grid:

Public Member Functions

 Parallel_Grid ()
 Parallel_Grid (const int ncx_in, const int ncy_in, const int ncz_in, const int nczp_in, const int nrxx_in, const int nbz_in, const int bz_in)
 ~Parallel_Grid ()
void init (const int &ncx, const int &ncy, const int &ncz, const int &nczp, const int &nrxx, const int &nbz, const int &bz, const int nprocgroup)
void reduce_across_pools (double *data) const
 Sum a distributed real-space grid across k-point pools.
void bcast (const double *const data_global, double *data_local, const int &rank, const bool is_sdft) const
 Broadcast data from root to all processors. The index order is [x][y][z].
void reduce (double *rhotot, const double *constrhoin, const bool reduce_all_pool) const
 Reduce data from all processors to root. The index order is [x][y][z].
int get_nx () const
int get_ny () const
int get_nz () const
int get_nrxx () const

Private Member Functions

void z_distribution (const int kpar)
void init_serial (const int &ncx_in, const int &ncy_in, const int &ncz_in, const int &nczp_in, const int &nrxx_in, const int &nbz_in, const int &bz_in)
void init_parallel (const int nprocgroup)
void zpiece_distribute (double *zpiece, const int &iz, double *rho, const bool is_sdft) const

Private Attributes

std::vector< int > nproc_in_pool
std::vector< std::vector< int > > numz
std::vector< std::vector< int > > startz
std::vector< std::vector< int > > whichpro
std::vector< std::vector< int > > whichpro_loc
int ncx =0
int ncy =0
int ncz =0
int ncxy =0
int ncxyz =0
int nczp =0
int nrxx =0
int nbz =0
int bz =0

Constructor & Destructor Documentation

◆ Parallel_Grid() [1/2]

Parallel_Grid::Parallel_Grid ( )

◆ Parallel_Grid() [2/2]

Parallel_Grid::Parallel_Grid ( const int ncx_in,
const int ncy_in,
const int ncz_in,
const int nczp_in,
const int nrxx_in,
const int nbz_in,
const int bz_in )
inline

◆ ~Parallel_Grid()

Parallel_Grid::~Parallel_Grid ( )

Member Function Documentation

◆ bcast()

void Parallel_Grid::bcast ( const double *const data_global,
double * data_local,
const int & rank,
const bool is_sdft ) const

Broadcast data from root to all processors. The index order is [x][y][z].

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

◆ get_nrxx()

int Parallel_Grid::get_nrxx ( ) const
inline
Here is the caller graph for this function:

◆ get_nx()

int Parallel_Grid::get_nx ( ) const
inline
Here is the caller graph for this function:

◆ get_ny()

int Parallel_Grid::get_ny ( ) const
inline
Here is the caller graph for this function:

◆ get_nz()

int Parallel_Grid::get_nz ( ) const
inline
Here is the caller graph for this function:

◆ init()

void Parallel_Grid::init ( const int & ncx,
const int & ncy,
const int & ncz,
const int & nczp,
const int & nrxx,
const int & nbz,
const int & bz,
const int nprocgroup )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_parallel()

void Parallel_Grid::init_parallel ( const int nprocgroup)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_serial()

void Parallel_Grid::init_serial ( const int & ncx_in,
const int & ncy_in,
const int & ncz_in,
const int & nczp_in,
const int & nrxx_in,
const int & nbz_in,
const int & bz_in )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduce()

void Parallel_Grid::reduce ( double * rhotot,
const double * constrhoin,
const bool reduce_all_pool ) const

Reduce data from all processors to root. The index order is [x][y][z].

Here is the caller graph for this function:

◆ reduce_across_pools()

void Parallel_Grid::reduce_across_pools ( double * data) const

Sum a distributed real-space grid across k-point pools.

Uses a direct local-slab reduction for equal-sized pools. For uneven pools, reconstructs a common global layout before the cross-pool sum.

Parameters
dataLocal real-space grid data ordered as [x][y][z].
Here is the caller graph for this function:

◆ z_distribution()

void Parallel_Grid::z_distribution ( const int kpar)
private
Here is the caller graph for this function:

◆ zpiece_distribute()

void Parallel_Grid::zpiece_distribute ( double * zpiece,
const int & iz,
double * rho,
const bool is_sdft ) const
private
Here is the caller graph for this function:

Member Data Documentation

◆ bz

int Parallel_Grid::bz =0
private

◆ nbz

int Parallel_Grid::nbz =0
private

◆ ncx

int Parallel_Grid::ncx =0
private

◆ ncxy

int Parallel_Grid::ncxy =0
private

◆ ncxyz

int Parallel_Grid::ncxyz =0
private

◆ ncy

int Parallel_Grid::ncy =0
private

◆ ncz

int Parallel_Grid::ncz =0
private

◆ nczp

int Parallel_Grid::nczp =0
private

◆ nproc_in_pool

std::vector<int> Parallel_Grid::nproc_in_pool
private

◆ nrxx

int Parallel_Grid::nrxx =0
private

◆ numz

std::vector<std::vector<int> > Parallel_Grid::numz
private

◆ startz

std::vector<std::vector<int> > Parallel_Grid::startz
private

◆ whichpro

std::vector<std::vector<int> > Parallel_Grid::whichpro
private

◆ whichpro_loc

std::vector<std::vector<int> > Parallel_Grid::whichpro_loc
private

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