IPPL API Reference
Independent Parallel Particle Layer C++ API
Loading...
Searching...
No Matches
ippl::OrthogonalRecursiveBisection< Field, Tp > Class Template Reference
+ Collaboration diagram for ippl::OrthogonalRecursiveBisection< Field, Tp >:

Public Member Functions

void initialize (FieldLayout< Dim > &fl, mesh_type &mesh, const Field &rho)
 
template<typename Attrib >
bool binaryRepartition (const Attrib &R, FieldLayout< Dim > &fl, const bool &isFirstRepartition)
 
int findCutAxis (NDIndex< Dim > &dom)
 
void perpendicularReduction (std::vector< Tf > &rankWeights, unsigned int cutAxis, NDIndex< Dim > &dom)
 
int findMedian (std::vector< Tf > &w)
 
void cutDomain (std::vector< NDIndex< Dim > > &domains, std::vector< int > &procs, int it, int cutAxis, int median)
 
template<typename Attrib >
void scatterR (const Attrib &r)
 

Public Attributes

Field bf_m
 

Member Function Documentation

◆ binaryRepartition()

template<class Field , class Tp >
template<typename Attrib >
bool ippl::OrthogonalRecursiveBisection< Field, Tp >::binaryRepartition ( const Attrib &  R,
FieldLayout< Dim > &  fl,
const bool &  isFirstRepartition 
)

Performs scatter operation of particle positions in field (weights) and repartitions FieldLayout's global domain

Template Parameters
Attribthe particle attribute type (memory space must be accessible to field memory)
Parameters
RWeights to scatter
flFieldLayout
isFirstRepartitionboolean which tells whether to scatter or not

◆ cutDomain()

template<class Field , class Tp >
void ippl::OrthogonalRecursiveBisection< Field, Tp >::cutDomain ( std::vector< NDIndex< Dim > > &  domains,
std::vector< int > &  procs,
int  it,
int  cutAxis,
int  median 
)

Splits the domain given by the iterator along the cut axis at the median, the corresponding index will be cut between median and median+1

Parameters
domainsSet of subdomains which will be cut
procsSet of ranks count associated to each subdomain
itIterator
cutAxisIndex of cut axis
medianMedian

◆ findCutAxis()

template<class Field , class Tp >
int ippl::OrthogonalRecursiveBisection< Field, Tp >::findCutAxis ( NDIndex< Dim > &  dom)

Find cutting axis as the longest axis of the field layout.

Parameters
domDomain to reduce

◆ findMedian()

template<class Field , class Tp >
int ippl::OrthogonalRecursiveBisection< Field, Tp >::findMedian ( std::vector< Tf > &  w)

Find median of array

Parameters
wArray of real numbers

◆ initialize()

template<class Field , class Tp >
void ippl::OrthogonalRecursiveBisection< Field, Tp >::initialize ( FieldLayout< Dim > &  fl,
mesh_type &  mesh,
const Field rho 
)

Initialize member field with mesh and field layout

Parameters
fl
meshMesh
rhoDensity field

◆ perpendicularReduction()

template<class Field , class Tp >
void ippl::OrthogonalRecursiveBisection< Field, Tp >::perpendicularReduction ( std::vector< Tf > &  rankWeights,
unsigned int  cutAxis,
NDIndex< Dim > &  dom 
)

Performs reduction on local field in all dimension except that determined by cutAxis, stores result in res

Parameters
rankWeightsArray giving the result of reduction
cutAxisIndex of cut axis
domDomain to reduce

◆ scatterR()

template<class Field , class Tp >
template<typename Attrib >
void ippl::OrthogonalRecursiveBisection< Field, Tp >::scatterR ( const Attrib &  r)

Scattering of particle positions in field using a CIC method

Template Parameters
Attribthe particle attribute type (memory space must be accessible to field memory)
Parameters
rWeights

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