ergo
BoxPartitioner Class Reference

"Block" partitioning is the only one implemented now... More...

Public Member Functions

 BoxPartitioner ()
 Initializez the BoxPartitioner object. More...
 
 ~BoxPartitioner ()
 
unsigned process (unsigned atomNumber, const std::vector< AtomicGrid > &atomGrids, int noOfRelevantAtoms, const unsigned *relevantAtoms, unsigned batchLength, real(*coor)[3], real *w)
 Applies the partitioning factors to the the grid points associated with given atom. More...
 

Private Member Functions

void prepare (const std::vector< AtomicGrid > &atoms, unsigned noOfRelevantAtoms, const unsigned *relevantAtoms, unsigned pointCnt, const real(*gridPoints)[3])
 
real getInvDistanceBetweenAtoms (int i, int j) const
 return distance between given pair of relevant atoms. More...
 
real getFactor (int i, int j) const
 

Private Attributes

const real(* coor )[3]
 
realrj
 
long_realp_kg
 
long_realvec
 
realinvAtomDistances
 a triangular array More...
 
realatomFactors
 a triangular array More...
 
real xpasc [HARDNESS]
 
real apasc
 
unsigned maxPointCnt
 
unsigned maxAtomPointCnt
 
unsigned maxRelevantAtoms
 
int LDA
 

Static Private Attributes

static const int HARDNESS = 11
 

Detailed Description

"Block" partitioning is the only one implemented now...

We rename it here to Box partitioner to avoid name space conflicts.

Constructor & Destructor Documentation

◆ BoxPartitioner()

BoxPartitioner::BoxPartitioner ( )

Initializez the BoxPartitioner object.

References apasc, HARDNESS, and xpasc.

◆ ~BoxPartitioner()

BoxPartitioner::~BoxPartitioner ( )

References atomFactors, invAtomDistances, p_kg, rj, and vec.

Member Function Documentation

◆ getFactor()

real BoxPartitioner::getFactor ( int  i,
int  j 
) const
inlineprivate

References atomFactors.

Referenced by process().

◆ getInvDistanceBetweenAtoms()

real BoxPartitioner::getInvDistanceBetweenAtoms ( int  i,
int  j 
) const
inlineprivate

return distance between given pair of relevant atoms.

Arguments i and j specify the number of the atoms on the list of relevant atoms.

References invAtomDistances.

Referenced by process().

◆ prepare()

void BoxPartitioner::prepare ( const std::vector< AtomicGrid > &  atoms,
unsigned  noOfRelevantAtoms,
const unsigned *  relevantAtoms,
unsigned  pointCnt,
const real(*)  gridPoints[3] 
)
private

◆ process()

unsigned BoxPartitioner::process ( unsigned  atomNumber,
const std::vector< AtomicGrid > &  atomGrids,
int  noOfRelevantAtoms,
const unsigned *  relevantAtoms,
unsigned  batchLength,
real(*)  coor[3],
real w 
)

Applies the partitioning factors to the the grid points associated with given atom.

Parameters
atomNumberindex of the atom that the grid points are associated with, in the relevantAtoms array.
atomGridsthe list of all atom grids.
noOfRelevantAtomsthe number of atoms relevant for the box being processed. They need to be taken into account when computing the partitioning weights.
relevantAtomsthe indices of the relevant atoms in the atomGrids vector.
batchLengthnumber of the grid points the partitioning weights have to be computed for.
coortheir cartesian coordinates. Will be modified if the grid point compression occurs.
wTheir weights - they will be modified.
Returns
new batch length after compression.

References apasc, coor, getFactor(), getInvDistanceBetweenAtoms(), HARDNESS, LDA, p_kg, prepare(), rj, vec, WEIGHT_THRESHOLD, and xpasc.

Referenced by Stream::saveAtomGridInBox().

Member Data Documentation

◆ apasc

real BoxPartitioner::apasc
private

Referenced by BoxPartitioner(), and process().

◆ atomFactors

real* BoxPartitioner::atomFactors
private

a triangular array

Referenced by getFactor(), prepare(), and ~BoxPartitioner().

◆ coor

const real(* BoxPartitioner::coor)[3]
private

Referenced by prepare(), and process().

◆ HARDNESS

const int BoxPartitioner::HARDNESS = 11
staticprivate

Referenced by BoxPartitioner(), and process().

◆ invAtomDistances

real* BoxPartitioner::invAtomDistances
private

a triangular array

Referenced by getInvDistanceBetweenAtoms(), prepare(), and ~BoxPartitioner().

◆ LDA

int BoxPartitioner::LDA
private

Referenced by prepare(), and process().

◆ maxAtomPointCnt

unsigned BoxPartitioner::maxAtomPointCnt
private

Referenced by prepare().

◆ maxPointCnt

unsigned BoxPartitioner::maxPointCnt
private

Referenced by prepare().

◆ maxRelevantAtoms

unsigned BoxPartitioner::maxRelevantAtoms
private

Referenced by prepare().

◆ p_kg

long_real* BoxPartitioner::p_kg
private

Referenced by prepare(), process(), and ~BoxPartitioner().

◆ rj

real* BoxPartitioner::rj
private

Referenced by prepare(), process(), and ~BoxPartitioner().

◆ vec

long_real* BoxPartitioner::vec
private

Referenced by prepare(), process(), and ~BoxPartitioner().

◆ xpasc

real BoxPartitioner::xpasc[HARDNESS]
private

Referenced by BoxPartitioner(), and process().


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