OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
BoxLibLayout< T, Dim > Class Template Reference

#include <BoxLibLayout.h>

Inheritance diagram for BoxLibLayout< T, Dim >:
Collaboration diagram for BoxLibLayout< T, Dim >:

Public Types

typedef ParticleAmrLayout< T, Dim >::pair_t pair_t
typedef ParticleAmrLayout< T, Dim >::pair_iterator pair_iterator
typedef ParticleAmrLayout< T, Dim >::SingleParticlePos_t SingleParticlePos_t
typedef ParticleAmrLayout< T, Dim >::Index_t Index_t
typedef amr::AmrField_t AmrField_t
typedef amr::AmrVectorField_t AmrVectorField_t
typedef amr::AmrScalarFieldContainer_t AmrScalarFieldContainer_t
typedef amr::AmrVectorFieldContainer_t AmrVectorFieldContainer_t
typedef ParticleAmrLayout< T, Dim >::ParticlePos_t ParticlePos_t
typedef ParticleAttrib< Index_tParticleIndex_t
typedef amr::AmrProcMap_t AmrProcMap_t
typedef amr::AmrGrid_t AmrGrid_t
typedef amr::AmrGeometry_t AmrGeometry_t
typedef amr::AmrGeomContainer_t AmrGeomContainer_t
typedef amr::AmrGridContainer_t AmrGridContainer_t
typedef amr::AmrProcMapContainer_t AmrProcMapContainer_t
typedef amr::AmrIntVect_t AmrIntVect_t
typedef amr::AmrIntVectContainer_t AmrIntVectContainer_t
typedef amr::AmrIntArray_t AmrIntArray_t
typedef amr::AmrDomain_t AmrDomain_t
typedef amr::AmrBox_t AmrBox_t
typedef amr::AmrReal_t AmrReal_t
typedef amrex::BaseFab< int > basefab_t
typedef amrex::FabArray< basefab_tmask_t
enum  { Dimension = Dim }
enum  UpdateFlags {
  SWAP , BCONDS , NUMFLAGS , OPTDESTROY ,
  ALL
}
typedef T Position_t

Public Member Functions

 BoxLibLayout ()
 BoxLibLayout (const BoxLibLayout *layout_p)
 BoxLibLayout (int nGridPoints, int maxGridSize)
 BoxLibLayout (const AmrGeometry_t &geom, const AmrProcMap_t &dmap, const AmrGrid_t &ba)
 BoxLibLayout (const AmrGeomContainer_t &geom, const AmrProcMapContainer_t &dmap, const AmrGridContainer_t &ba, const AmrIntArray_t &rr)
void setBoundingBox (double dh)
void setDomainRatio (const std::vector< double > &ratio)
void update (IpplParticleBase< BoxLibLayout< T, Dim > > &PData, const ParticleAttrib< char > *canSwap=0)
void update (AmrParticleBase< BoxLibLayout< T, Dim > > &PData, int lev_min=0, int lev_max=-1, bool isRegrid=false)
AmrIntVect_t Index (AmrParticleBase< BoxLibLayout< T, Dim > > &p, const unsigned int ip, int level) const
AmrIntVect_t Index (SingleParticlePos_t &R, int lev) const
void buildLevelMask (int lev, const int ncells=1)
void clearLevelMask (int lev)
const std::unique_ptr< mask_t > & getLevelMask (int lev) const
void resize (int maxLevel)
void define (const AmrGeomContainer_t &geom)
void define (const AmrIntVectContainer_t &refRatio)
bool LevelDefined (int level) const
int finestLevel () const
int maxLevel () const
AmrIntVect_t refRatio (int level) const
int MaxRefRatio (int level) const
void setFinestLevel (int finestLevel)
void setMaxLevel (int maxLevel)
void setUpdateFlag (UpdateFlags f, bool val)
bool getUpdateFlag (UpdateFlags f) const
ParticleBConds< T, Dim > & getBConds ()
void setBConds (const ParticleBConds< T, Dim > &bc)

Static Public Attributes

static Vector_t lowerBound
static Vector_t upperBound

Protected Member Functions

template<class PPT, class NDI>
void apply_bconds (unsigned n, PPT &R, const ParticleBConds< T, Dim > &bcs, const NDI &nr)

Protected Attributes

int finestLevel_m
 Current finest level of simluation.
int maxLevel_m
 Maximum level allowed.

Private Member Functions

void initBaseBox_m (int nGridPoints, int maxGridSize, double dh=0.04)
bool Where (AmrParticleBase< BoxLibLayout< T, Dim > > &p, const unsigned int ip, int lev_min=0, int lev_max=-1, int nGrow=0) const
bool EnforcePeriodicWhere (AmrParticleBase< BoxLibLayout< T, Dim > > &prt, const unsigned int ip, int lev_min=0, int lev_max=-1) const
bool PeriodicShift (SingleParticlePos_t R) const
void locateParticle (AmrParticleBase< BoxLibLayout< T, Dim > > &p, const unsigned int ip, int lev_min, int lev_max, int nGrow) const

Private Attributes

AmrIntVectContainer_t refRatio_m
std::vector< std::unique_ptr< mask_t > > masks_m
 Refinement ratios [0:finest_level-1].
ParticleBConds< T, DimBoundConds
unsigned int UpdateOptions

Detailed Description

template<class T, unsigned Dim>
class BoxLibLayout< T, Dim >

Definition at line 47 of file BoxLibLayout.h.

Member Typedef Documentation

◆ AmrBox_t

template<class T, unsigned Dim>
typedef amr::AmrBox_t BoxLibLayout< T, Dim >::AmrBox_t

Definition at line 74 of file BoxLibLayout.h.

◆ AmrDomain_t

template<class T, unsigned Dim>
typedef amr::AmrDomain_t BoxLibLayout< T, Dim >::AmrDomain_t

Definition at line 73 of file BoxLibLayout.h.

◆ AmrField_t

template<class T, unsigned Dim>
typedef amr::AmrField_t BoxLibLayout< T, Dim >::AmrField_t

Definition at line 57 of file BoxLibLayout.h.

◆ AmrGeomContainer_t

template<class T, unsigned Dim>
typedef amr::AmrGeomContainer_t BoxLibLayout< T, Dim >::AmrGeomContainer_t

Definition at line 67 of file BoxLibLayout.h.

◆ AmrGeometry_t

template<class T, unsigned Dim>
typedef amr::AmrGeometry_t BoxLibLayout< T, Dim >::AmrGeometry_t

Definition at line 66 of file BoxLibLayout.h.

◆ AmrGrid_t

template<class T, unsigned Dim>
typedef amr::AmrGrid_t BoxLibLayout< T, Dim >::AmrGrid_t

Definition at line 65 of file BoxLibLayout.h.

◆ AmrGridContainer_t

template<class T, unsigned Dim>
typedef amr::AmrGridContainer_t BoxLibLayout< T, Dim >::AmrGridContainer_t

Definition at line 68 of file BoxLibLayout.h.

◆ AmrIntArray_t

template<class T, unsigned Dim>
typedef amr::AmrIntArray_t BoxLibLayout< T, Dim >::AmrIntArray_t

Definition at line 72 of file BoxLibLayout.h.

◆ AmrIntVect_t

template<class T, unsigned Dim>
typedef amr::AmrIntVect_t BoxLibLayout< T, Dim >::AmrIntVect_t

Definition at line 70 of file BoxLibLayout.h.

◆ AmrIntVectContainer_t

template<class T, unsigned Dim>
typedef amr::AmrIntVectContainer_t BoxLibLayout< T, Dim >::AmrIntVectContainer_t

Definition at line 71 of file BoxLibLayout.h.

◆ AmrProcMap_t

template<class T, unsigned Dim>
typedef amr::AmrProcMap_t BoxLibLayout< T, Dim >::AmrProcMap_t

Definition at line 64 of file BoxLibLayout.h.

◆ AmrProcMapContainer_t

template<class T, unsigned Dim>
typedef amr::AmrProcMapContainer_t BoxLibLayout< T, Dim >::AmrProcMapContainer_t

Definition at line 69 of file BoxLibLayout.h.

◆ AmrReal_t

template<class T, unsigned Dim>
typedef amr::AmrReal_t BoxLibLayout< T, Dim >::AmrReal_t

Definition at line 75 of file BoxLibLayout.h.

◆ AmrScalarFieldContainer_t

template<class T, unsigned Dim>
typedef amr::AmrScalarFieldContainer_t BoxLibLayout< T, Dim >::AmrScalarFieldContainer_t

Definition at line 59 of file BoxLibLayout.h.

◆ AmrVectorField_t

template<class T, unsigned Dim>
typedef amr::AmrVectorField_t BoxLibLayout< T, Dim >::AmrVectorField_t

Definition at line 58 of file BoxLibLayout.h.

◆ AmrVectorFieldContainer_t

template<class T, unsigned Dim>
typedef amr::AmrVectorFieldContainer_t BoxLibLayout< T, Dim >::AmrVectorFieldContainer_t

Definition at line 60 of file BoxLibLayout.h.

◆ basefab_t

template<class T, unsigned Dim>
typedef amrex::BaseFab<int> BoxLibLayout< T, Dim >::basefab_t

Definition at line 77 of file BoxLibLayout.h.

◆ Index_t

template<class T, unsigned Dim>
typedef ParticleAmrLayout<T,Dim>::Index_t BoxLibLayout< T, Dim >::Index_t

Definition at line 55 of file BoxLibLayout.h.

◆ mask_t

template<class T, unsigned Dim>
typedef amrex::FabArray<basefab_t> BoxLibLayout< T, Dim >::mask_t

Definition at line 78 of file BoxLibLayout.h.

◆ pair_iterator

template<class T, unsigned Dim>
typedef ParticleAmrLayout<T,Dim>::pair_iterator BoxLibLayout< T, Dim >::pair_iterator

Definition at line 53 of file BoxLibLayout.h.

◆ pair_t

template<class T, unsigned Dim>
typedef ParticleAmrLayout<T,Dim>::pair_t BoxLibLayout< T, Dim >::pair_t

Definition at line 52 of file BoxLibLayout.h.

◆ ParticleIndex_t

template<class T, unsigned Dim>
typedef ParticleAttrib<Index_t> BoxLibLayout< T, Dim >::ParticleIndex_t

Definition at line 62 of file BoxLibLayout.h.

◆ ParticlePos_t

template<class T, unsigned Dim>
typedef ParticleAmrLayout<T,Dim>::ParticlePos_t BoxLibLayout< T, Dim >::ParticlePos_t

Definition at line 61 of file BoxLibLayout.h.

◆ Position_t

template<class T, unsigned Dim>
typedef T ParticleLayout< T, Dim >::Position_t
inherited

Definition at line 62 of file ParticleLayout.h.

◆ SingleParticlePos_t

template<class T, unsigned Dim>
typedef ParticleAmrLayout<T,Dim>::SingleParticlePos_t BoxLibLayout< T, Dim >::SingleParticlePos_t

Definition at line 54 of file BoxLibLayout.h.

Member Enumeration Documentation

◆ anonymous enum

template<class T, unsigned Dim>
anonymous enum
inherited
Enumerator
Dimension 

Definition at line 58 of file ParticleLayout.h.

◆ UpdateFlags

template<class T, unsigned Dim>
enum ParticleLayout::UpdateFlags
inherited
Enumerator
SWAP 
BCONDS 
NUMFLAGS 
OPTDESTROY 
ALL 

Definition at line 59 of file ParticleLayout.h.

Constructor & Destructor Documentation

◆ BoxLibLayout() [1/5]

template<class T, unsigned Dim>
BoxLibLayout< T, Dim >::BoxLibLayout ( )

Initializes default Geometry, DistributionMapping and BoxArray.

Definition at line 61 of file BoxLibLayout.hpp.

References Dim, IpplInfo::getNodes(), initBaseBox_m(), ParticleAmrLayout< T, Dim >::ParticleAmrLayout(), and refRatio_m.

Referenced by BoxLibLayout(), EnforcePeriodicWhere(), Index(), locateParticle(), update(), update(), and Where().

Here is the call graph for this function:

◆ BoxLibLayout() [2/5]

template<class T, unsigned Dim>
BoxLibLayout< T, Dim >::BoxLibLayout ( const BoxLibLayout< T, Dim > * layout_p)

Given a layout it copies that.

Definition at line 85 of file BoxLibLayout.hpp.

References BoxLibLayout(), Dim, ParticleAmrLayout< T, Dim >::maxLevel_m, ParticleAmrLayout< T, Dim >::ParticleAmrLayout(), refRatio(), and refRatio_m.

Here is the call graph for this function:

◆ BoxLibLayout() [3/5]

template<class T, unsigned Dim>
BoxLibLayout< T, Dim >::BoxLibLayout ( int nGridPoints,
int maxGridSize )
Parameters
nGridPointsper dimension (nx, ny, nz / nt)
maxGridSizefor all levels.

Definition at line 100 of file BoxLibLayout.hpp.

References Dim, initBaseBox_m(), ParticleAmrLayout< T, Dim >::ParticleAmrLayout(), and refRatio_m.

Here is the call graph for this function:

◆ BoxLibLayout() [4/5]

template<class T, unsigned Dim>
BoxLibLayout< T, Dim >::BoxLibLayout ( const AmrGeometry_t & geom,
const AmrProcMap_t & dmap,
const AmrGrid_t & ba )

Single-level constructor.

Parameters
geomspecifies the box domain
dmapis the distribution map for grids
bais the array of boxes for a level

Definition at line 110 of file BoxLibLayout.hpp.

References Dim, ParticleAmrLayout< T, Dim >::ParticleAmrLayout(), and refRatio_m.

Here is the call graph for this function:

◆ BoxLibLayout() [5/5]

template<class T, unsigned Dim>
BoxLibLayout< T, Dim >::BoxLibLayout ( const AmrGeomContainer_t & geom,
const AmrProcMapContainer_t & dmap,
const AmrGridContainer_t & ba,
const AmrIntArray_t & rr )

Multi-level constructor.

Parameters
geomis basically the physical domain storing the mesh spacing per level
dmapare all distribution maps of grids to core
baare all boxes of all levels
rris the refinement ratio among the levels (always the ratio from l to l+1)

Definition at line 120 of file BoxLibLayout.hpp.

References Dim, ParticleAmrLayout< T, Dim >::ParticleAmrLayout(), and refRatio_m.

Here is the call graph for this function:

Member Function Documentation

◆ apply_bconds()

template<class T, unsigned Dim>
template<class PPT, class NDI>
void ParticleLayout< T, Dim >::apply_bconds ( unsigned n,
PPT & R,
const ParticleBConds< T, Dim > & bcs,
const NDI & nr )
inlineprotectedinherited

◆ buildLevelMask()

template<class T, unsigned Dim>
void BoxLibLayout< T, Dim >::buildLevelMask ( int lev,
const int ncells = 1 )

Build mask for a level used for interpolation from grid to particles to reduce spurious self field forces near coarse-fine interfaces.

Definition at line 416 of file BoxLibLayout.hpp.

References masks_m.

◆ clearLevelMask()

template<class T, unsigned Dim>
void BoxLibLayout< T, Dim >::clearLevelMask ( int lev)

Definition at line 477 of file BoxLibLayout.hpp.

References masks_m, and PAssert.

◆ define() [1/2]

template<class T, unsigned Dim>
void BoxLibLayout< T, Dim >::define ( const AmrGeomContainer_t & geom)
inline

Set the geometry of the problem. It is called in AmrBoxLib::initBaseLevel_m().

Parameters
geomgeometry of all levels

Definition at line 252 of file BoxLibLayout.h.

◆ define() [2/2]

template<class T, unsigned Dim>
void BoxLibLayout< T, Dim >::define ( const AmrIntVectContainer_t & refRatio)
inline

Set the refinement ratios. It is called in AmrBoxLib::initBaseLevel_m().

Parameters
refRatioamong levels

Definition at line 263 of file BoxLibLayout.h.

◆ EnforcePeriodicWhere()

template<class T, unsigned Dim>
bool BoxLibLayout< T, Dim >::EnforcePeriodicWhere ( AmrParticleBase< BoxLibLayout< T, Dim > > & prt,
const unsigned int ip,
int lev_min = 0,
int lev_max = -1 ) const
private

Function from AMReX adjusted to work with Ippl AmrParticleBase class Checks/sets whether the particle has crossed a periodic boundary in such a way that it is on levels lev_min and higher.

Parameters
prtis the bunch information
ipis the local (i.e. to a core) particle index
lev_minto check
lev_maxto check
Returns
true if mapped to the other side.

Definition at line 597 of file BoxLibLayout.hpp.

References BoxLibLayout(), finestLevel(), Index(), PAssert, and PeriodicShift().

Referenced by locateParticle().

Here is the call graph for this function:

◆ finestLevel()

template<class T, unsigned Dim>
int BoxLibLayout< T, Dim >::finestLevel ( ) const
inline
Returns
the current finest level

Definition at line 763 of file BoxLibLayout.hpp.

References ParticleAmrLayout< T, Dim >::finestLevel_m.

Referenced by EnforcePeriodicWhere(), update(), Where(), and AmrYtWriter::writeBunch().

◆ getBConds()

◆ getLevelMask()

template<class T, unsigned Dim>
const std::unique_ptr< typename BoxLibLayout< T, Dim >::mask_t > & BoxLibLayout< T, Dim >::getLevelMask ( int lev) const

Definition at line 485 of file BoxLibLayout.hpp.

References masks_m.

◆ getUpdateFlag()

◆ Index() [1/2]

template<class T, unsigned Dim>
BoxLibLayout< T, Dim >::AmrIntVect_t BoxLibLayout< T, Dim >::Index ( AmrParticleBase< BoxLibLayout< T, Dim > > & p,
const unsigned int ip,
int level ) const

Get the cell of a particle

Parameters
pis the particle data
ipis the local index of the particle in the container
levelof the particle

Definition at line 389 of file BoxLibLayout.hpp.

References BoxLibLayout(), and Index().

Referenced by EnforcePeriodicWhere(), Index(), PeriodicShift(), and Where().

Here is the call graph for this function:

◆ Index() [2/2]

template<class T, unsigned Dim>
BoxLibLayout< T, Dim >::AmrIntVect_t BoxLibLayout< T, Dim >::Index ( SingleParticlePos_t & R,
int lev ) const

Get the cell of a particle

Parameters
Ris the position of a particle
levis the level

Definition at line 399 of file BoxLibLayout.hpp.

References floor().

Here is the call graph for this function:

◆ initBaseBox_m()

template<class T, unsigned Dim>
void BoxLibLayout< T, Dim >::initBaseBox_m ( int nGridPoints,
int maxGridSize,
double dh = 0.04 )
private

Set up the box for the whole computation. The AMR object owning the bunch is not yet initialized.

Parameters
nGridPointsper dimension (nx, ny, nz / nt)
maxGridSizefor all levels
dhis the mesh enlargement factor

Definition at line 791 of file BoxLibLayout.hpp.

References IpplInfo::getNodes(), lowerBound, PAssert, and upperBound.

Referenced by BoxLibLayout(), BoxLibLayout(), and setBoundingBox().

Here is the call graph for this function:

◆ LevelDefined()

template<class T, unsigned Dim>
bool BoxLibLayout< T, Dim >::LevelDefined ( int level) const
inline

Check if an AMR level is well defined

Parameters
levelto check

Definition at line 757 of file BoxLibLayout.hpp.

References ParticleAmrLayout< T, Dim >::maxLevel_m.

Referenced by update().

◆ locateParticle()

template<class T, unsigned Dim>
void BoxLibLayout< T, Dim >::locateParticle ( AmrParticleBase< BoxLibLayout< T, Dim > > & p,
const unsigned int ip,
int lev_min,
int lev_max,
int nGrow ) const
private

Function from AMReX adjusted to work with Ippl AmrParticleBase class

Parameters
pis basically the bunch
ipis the local particle index
lev_minto check
lev_maxto check
nGrowis the number of ghost cells

Definition at line 710 of file BoxLibLayout.hpp.

References BoxLibLayout(), EnforcePeriodicWhere(), and Where().

Referenced by update().

Here is the call graph for this function:

◆ maxLevel()

template<class T, unsigned Dim>
int BoxLibLayout< T, Dim >::maxLevel ( ) const
inline
Returns
the maximum level of simulation

Definition at line 769 of file BoxLibLayout.hpp.

References ParticleAmrLayout< T, Dim >::maxLevel_m.

◆ MaxRefRatio()

template<class T, unsigned Dim>
int BoxLibLayout< T, Dim >::MaxRefRatio ( int level) const
inline
Parameters
level
Returns
the maximum refinement ratio among all directions for the given level.

Definition at line 782 of file BoxLibLayout.hpp.

References refRatio_m.

◆ PeriodicShift()

template<class T, unsigned Dim>
bool BoxLibLayout< T, Dim >::PeriodicShift ( SingleParticlePos_t R) const
private

Function from AMReX adjusted to work with Ippl AmrParticleBase class

Move the particle to the opposite side of the domain

Parameters
Ris the particle position
Returns
true if the particle was shifted.

Definition at line 642 of file BoxLibLayout.hpp.

References Index(), and PAssert.

Referenced by EnforcePeriodicWhere().

Here is the call graph for this function:

◆ refRatio()

template<class T, unsigned Dim>
BoxLibLayout< T, Dim >::AmrIntVect_t BoxLibLayout< T, Dim >::refRatio ( int level) const
inline
Parameters
level
Returns
the refinement ratio of this level to the next higher one

Definition at line 776 of file BoxLibLayout.hpp.

References refRatio_m.

Referenced by BoxLibLayout().

◆ resize()

template<class T, unsigned Dim>
void BoxLibLayout< T, Dim >::resize ( int maxLevel)
inline

The particles live initially on the coarsest level. Furthermore, the order the OPAL input file is parsed does not allow us to know the maximum level of the computation. This is known after that the FieldSolver is initialized. Therefore, we need to update the size of the ParGDB containers.

Parameters
maxLevelis set when the FieldSolver is initialized

Definition at line 235 of file BoxLibLayout.h.

◆ setBConds()

template<class T, unsigned Dim>
void ParticleLayout< T, Dim >::setBConds ( const ParticleBConds< T, Dim > & bc)
inlineinherited

Definition at line 94 of file ParticleLayout.h.

◆ setBoundingBox()

template<class T, unsigned Dim>
void BoxLibLayout< T, Dim >::setBoundingBox ( double dh)
virtual

This method is used when creating the AMR object. OPAL takes the input argument BBOXINCR that is specified in the field solver command. Up to this point the AMR object is not yet initialized. After that this method shouldn't be called anymore.

Parameters
dhis the mesh enlargement factor

Implements ParticleAmrLayout< T, Dim >.

Definition at line 131 of file BoxLibLayout.hpp.

References initBaseBox_m().

Referenced by AmrPartBunch::set_meshEnlargement().

Here is the call graph for this function:

◆ setDomainRatio()

template<class T, unsigned Dim>
void BoxLibLayout< T, Dim >::setDomainRatio ( const std::vector< double > & ratio)

The Poisson computation domain is per default [-1,1]^3. With this method this can be changed in order to account for the different extent per direction.

Parameters
ratio,ife.g. ratio = [1, 2, 0.75], then the box is [-1, 1] x [-2, 2] x [-0.75, 0.75]

Definition at line 142 of file BoxLibLayout.hpp.

References Dim, lowerBound, and upperBound.

Referenced by AmrPartBunch::setAmrDomainRatio().

◆ setFinestLevel()

template<class T, unsigned Dim>
void ParticleAmrLayout< T, Dim >::setFinestLevel ( int finestLevel)
inherited
Parameters
finestLevelof current simulation state

Definition at line 79 of file ParticleAmrLayout.h.

References finestLevel_m.

◆ setMaxLevel()

template<class T, unsigned Dim>
void ParticleAmrLayout< T, Dim >::setMaxLevel ( int maxLevel)
inherited
Parameters
maxLevelallowed during simulation run

Definition at line 85 of file ParticleAmrLayout.h.

References maxLevel_m.

◆ setUpdateFlag()

template<class T, unsigned Dim>
void ParticleLayout< T, Dim >::setUpdateFlag ( UpdateFlags f,
bool val )
inlineinherited

Definition at line 76 of file ParticleLayout.h.

Referenced by ParticleLayout(), and IpplParticleBase< Layout_t >::setUpdateFlag().

◆ update() [1/2]

template<class T, unsigned Dim>
void BoxLibLayout< T, Dim >::update ( AmrParticleBase< BoxLibLayout< T, Dim > > & PData,
int lev_min = 0,
int lev_max = -1,
bool isRegrid = false )

The proper update method for AMR.

Parameters
PDatais basically the bunch
lev_minbase level to update
lev_maxfinest level to update (if -1 update all levels starting from lev_min)
isRegridin regrid mode a level might be deleted, thus the particle level counter might be invalidated --> we need to iterate through all particles.

Definition at line 185 of file BoxLibLayout.hpp.

References MsgBuffer::add(), allreduce(), BoxLibLayout(), IpplInfo::Comm, Communicate::COMM_ANY_NODE, finestLevel(), MsgBuffer::get(), MsgBuffer::getBuffer(), IpplInfo::getNodes(), MsgBuffer::getSize(), LevelDefined(), locateParticle(), IpplInfo::myNode(), P_LAYOUT_CYCLE, and P_SPATIAL_TRANSFER_TAG.

Here is the call graph for this function:

◆ update() [2/2]

template<class T, unsigned Dim>
void BoxLibLayout< T, Dim >::update ( IpplParticleBase< BoxLibLayout< T, Dim > > & PData,
const ParticleAttrib< char > * canSwap = 0 )

This method shouldn't be called. Otherwise it throws an exception.

Definition at line 171 of file BoxLibLayout.hpp.

References BoxLibLayout().

Here is the call graph for this function:

◆ Where()

template<class T, unsigned Dim>
bool BoxLibLayout< T, Dim >::Where ( AmrParticleBase< BoxLibLayout< T, Dim > > & p,
const unsigned int ip,
int lev_min = 0,
int lev_max = -1,
int nGrow = 0 ) const
private

Function from AMReX adjusted to work with Ippl AmrParticleBase class Checks/sets a particles location on levels lev_min and higher.

Parameters
pis the bunch information
ipis the local (i.e. to a core) particle index
lev_minto check
lev_maxto check
nGrowis the number of ghost cells
Returns
false if the particle does not exist on that level.

Definition at line 543 of file BoxLibLayout.hpp.

References BoxLibLayout(), finestLevel(), Index(), and PAssert.

Referenced by locateParticle().

Here is the call graph for this function:

Member Data Documentation

◆ BoundConds

template<class T, unsigned Dim>
ParticleBConds<T,Dim> ParticleLayout< T, Dim >::BoundConds
privateinherited

Definition at line 118 of file ParticleLayout.h.

◆ finestLevel_m

template<class T, unsigned Dim>
int ParticleAmrLayout< T, Dim >::finestLevel_m
protectedinherited

Current finest level of simluation.

Definition at line 63 of file ParticleAmrLayout.h.

Referenced by BoxLibLayout< T, Dim >::finestLevel(), ParticleAmrLayout(), and setFinestLevel().

◆ lowerBound

template<class T, unsigned Dim>
Vector_t BoxLibLayout< T, Dim >::lowerBound
static

Lower physical domain boundary (each dimension). It has to be smaller than -1 since all particles are within \([-1, 1]^3\). The real computational domain is multiplied with the mesh enlargement factor (in [%]) in BoxLibLayout::initBaseBox_m().

Definition at line 86 of file BoxLibLayout.h.

Referenced by initBaseBox_m(), and setDomainRatio().

◆ masks_m

template<class T, unsigned Dim>
std::vector<std::unique_ptr<mask_t> > BoxLibLayout< T, Dim >::masks_m
private

Refinement ratios [0:finest_level-1].

Definition at line 382 of file BoxLibLayout.h.

Referenced by buildLevelMask(), clearLevelMask(), and getLevelMask().

◆ maxLevel_m

template<class T, unsigned Dim>
int ParticleAmrLayout< T, Dim >::maxLevel_m
protectedinherited

◆ refRatio_m

template<class T, unsigned Dim>
AmrIntVectContainer_t BoxLibLayout< T, Dim >::refRatio_m
private

◆ UpdateOptions

template<class T, unsigned Dim>
unsigned int ParticleLayout< T, Dim >::UpdateOptions
privateinherited

Definition at line 121 of file ParticleLayout.h.

◆ upperBound

template<class T, unsigned Dim>
Vector_t BoxLibLayout< T, Dim >::upperBound
static

Upper physical domain boundary (each dimension). It has to be greater than 1 since all particles are within \([-1, 1]^3\). The real computational domain is multiplied with the mesh enlargement factor (in [%]) in BoxLibLayout::initBaseBox_m().

Definition at line 93 of file BoxLibLayout.h.

Referenced by initBaseBox_m(), and setDomainRatio().


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