OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
#include <BoxLibParticle.h>
Public Member Functions | |
BoxLibParticle () | |
BoxLibParticle (PLayout *layout) | |
template<class FT , unsigned Dim, class PT > | |
void | scatter (ParticleAttrib< FT > &attrib, AmrScalarFieldContainer_t &f, ParticleAttrib< Vektor< PT, Dim > > &pp, int lbase, int lfine, const ParticleAttrib< int > &pbin, int bin=-1) |
template<class FT , unsigned Dim, class PT > | |
void | scatter (ParticleAttrib< FT > &attrib, AmrField_t &f, ParticleAttrib< Vektor< PT, Dim > > &pp, const ParticleAttrib< int > &pbin, int bin=-1, int level=0) |
template<class FT , unsigned Dim, class PT > | |
void | gather (ParticleAttrib< FT > &attrib, AmrVectorFieldContainer_t &f, ParticleAttrib< Vektor< PT, Dim > > &pp, int lbase, int lfine) |
![]() | |
AmrParticleBase () | |
AmrParticleBase (PLayout *layout) | |
~AmrParticleBase () | |
void | initializeAmr () |
const ParticleLevelCounter_t & | getLocalNumPerLevel () const |
ParticleLevelCounter_t & | getLocalNumPerLevel () |
void | setLocalNumPerLevel (const ParticleLevelCounter_t &LocalNumPerLevel) |
void | createWithID (unsigned id) |
void | create (size_t M) |
void | destroy (size_t M, size_t I, bool doNow=false) |
void | performDestroy (bool updateLocalNum=false) |
void | update () |
void | update (int lev_min, int lev_max, bool isRegrid=false) |
void | update (const ParticleAttrib< char > &canSwap) |
void | sort () |
void | sort (SortList_t &sortlist) |
PLayout & | getAmrLayout () |
const PLayout & | getAmrLayout () const |
void | setForbidTransform (bool forbidTransform) |
bool | isForbidTransform () const |
const double & | domainMapping (bool inverse=false) |
const double & | getScalingFactor () const |
void | setLorentzFactor (const Vector_t &lorentzFactor) |
![]() | |
IpplParticleBase () | |
IpplParticleBase (PLayout *layout) | |
~IpplParticleBase () | |
void | initialize (PLayout *) |
size_t | getTotalNum () const |
size_t | getLocalNum () const |
size_t | getDestroyNum () const |
size_t | getGhostNum () const |
void | setTotalNum (size_t n) |
void | setLocalNum (size_t n) |
unsigned int | getMinimumNumberOfParticlesPerCore () const |
void | setMinimumNumberOfParticlesPerCore (unsigned int n) |
PLayout & | getLayout () |
const PLayout & | getLayout () const |
ParticleBConds< Position_t, PLayout::Dimension > & | getBConds () |
void | setBConds (const ParticleBConds< Position_t, PLayout::Dimension > &bc) |
bool | singleInitNode () const |
bool | getUpdateFlag (UpdateFlags f) const |
void | setUpdateFlag (UpdateFlags f, bool val) |
void | addAttribute (ParticleAttribBase &pa) |
ParticleAttribBase & | getAttribute (attrib_container_t::size_type N) |
attrib_container_t::size_type | numAttributes () const |
attrib_iterator | begin () |
attrib_iterator | end () |
void | resetID () |
void | createWithID (unsigned id) |
void | create (size_t) |
void | globalCreate (size_t np) |
void | destroy (size_t, size_t, bool=false) |
size_t | putMessage (Message &, size_t, size_t) |
size_t | putMessage (Message &, const std::vector< size_t > &) |
size_t | putMessage (Message &, size_t) |
Format * | getFormat () |
size_t | writeMsgBuffer (MsgBuffer *&, const std::vector< size_t > &) |
template<class O > | |
size_t | writeMsgBufferWithOffsets (MsgBuffer *&, const std::vector< size_t > &, const std::vector< O > &) |
size_t | readMsgBuffer (MsgBuffer *) |
size_t | readGhostMsgBuffer (MsgBuffer *, int) |
size_t | getMessage (Message &) |
size_t | getSingleMessage (Message &) |
size_t | getMessageAndCreate (Message &) |
void | performDestroy (bool updateLocalNum=false) |
void | sort (SortList_t &) |
size_t | ghostPutMessage (Message &, size_t, size_t) |
size_t | ghostPutMessage (Message &, const std::vector< size_t > &) |
size_t | ghostGetMessage (Message &, int) |
size_t | ghostGetSingleMessage (Message &, int) |
void | ghostDestroy (size_t, size_t) |
void | printDebug (Inform &) |
![]() | |
DataSource () | |
virtual | ~DataSource () |
bool | connected (DataConnect *=0) const |
DataSourceObject * | findDataSourceObject (DataConnect *) const |
DataConnect * | connect (const char *, DataConnect *=0, int=DataSource::DEFAULT) |
bool | connect (DataSourceObject *) |
bool | disconnect (DataConnect *=0) |
bool | updateConnection (DataConnect *=0) |
void | interact (DataConnect *=0) |
void | interact (const char *, DataConnect *=0) |
![]() | |
AbstractParticle () | |
virtual | ~AbstractParticle () |
virtual bool | getUpdateFlag (UpdateFlags f) const =0 |
virtual void | setUpdateFlag (UpdateFlags f, bool val)=0 |
virtual void | setBConds (const ParticleBConds< Position_t, Dim > &bc)=0 |
Private Member Functions | |
template<class AType > | |
void | AssignDensityFort (ParticleAttrib< AType > &pa, AmrScalarFieldContainer_t &mf_to_be_filled, int lev_min, int ncomp, int finest_level, const ParticleAttrib< int > &pbin, int bin=-1) const |
template<class AType > | |
void | InterpolateFort (ParticleAttrib< AType > &pa, AmrVectorFieldContainer_t &mesh_data, int lev_min, int lev_max) |
template<class AType > | |
void | InterpolateSingleLevelFort (ParticleAttrib< AType > &pa, AmrVectorField_t &mesh_data, int lev) |
template<class AType > | |
void | InterpolateMultiLevelFort (ParticleAttrib< AType > &pa, AmrVectorFieldContainer_t &mesh_data, int lev) |
template<class AType > | |
void | AssignCellDensitySingleLevelFort (ParticleAttrib< AType > &pa, AmrField_t &mf, int level, const ParticleAttrib< int > &pbin, int bin=-1, int ncomp=1, int particle_lvl_offset=0) const |
Private Attributes | |
IpplTimings::TimerRef | AssignDensityTimer_m |
Additional Inherited Members | |
![]() | |
ParticleIndex_t | Level |
ParticleIndex_t | Grid |
![]() | |
unsigned int | MIN_NUM_PART_PER_CORE |
ParticlePos_t | R |
ParticleIndex_t | ID |
![]() | |
ParticlePos_t * | R_p |
ParticleIndex_t * | ID_p |
![]() | |
virtual DataSourceObject * | createDataSourceObject (const char *nm, DataConnect *dc, int tm) |
![]() | |
IpplTimings::TimerRef | updateParticlesTimer_m |
IpplTimings::TimerRef | sortParticlesTimer_m |
IpplTimings::TimerRef | domainMappingTimer_m |
bool | forbidTransform_m |
To avoid multiple transformations during regrid. More... | |
double | scale_m |
Vector_t | lorentzFactor_m |
![]() | |
std::vector< std::pair< size_t, size_t > > | DestroyList |
Particle class for AMReX. It works together with BoxLibLayout.
Particle class that does the scatter and gather operations of attributes to and from grid. In contrast to Ippl where it is implemented in the attribute class, i.e. src/ippl/src/Particle/ParticleAttrib.h we do it in the particle class. This way Ippl does not need to be modified if another AMR framework is used.
Definition at line 23 of file BoxLibParticle.h.
typedef PLayout::AmrBox_t BoxLibParticle< PLayout >::AmrBox_t |
Definition at line 40 of file BoxLibParticle.h.
typedef AmrParticleBase<PLayout>::AmrField_t BoxLibParticle< PLayout >::AmrField_t |
Definition at line 29 of file BoxLibParticle.h.
typedef PLayout::AmrGeometry_t BoxLibParticle< PLayout >::AmrGeometry_t |
Definition at line 38 of file BoxLibParticle.h.
typedef PLayout::AmrGrid_t BoxLibParticle< PLayout >::AmrGrid_t |
Definition at line 37 of file BoxLibParticle.h.
typedef PLayout::AmrIntVect_t BoxLibParticle< PLayout >::AmrIntVect_t |
Definition at line 39 of file BoxLibParticle.h.
typedef PLayout::AmrProcMap_t BoxLibParticle< PLayout >::AmrProcMap_t |
Definition at line 36 of file BoxLibParticle.h.
typedef PLayout::AmrReal_t BoxLibParticle< PLayout >::AmrReal_t |
Definition at line 41 of file BoxLibParticle.h.
typedef AmrParticleBase<PLayout>::AmrScalarFieldContainer_t BoxLibParticle< PLayout >::AmrScalarFieldContainer_t |
Definition at line 31 of file BoxLibParticle.h.
typedef AmrParticleBase<PLayout>::AmrVectorField_t BoxLibParticle< PLayout >::AmrVectorField_t |
Definition at line 33 of file BoxLibParticle.h.
typedef AmrParticleBase<PLayout>::AmrVectorFieldContainer_t BoxLibParticle< PLayout >::AmrVectorFieldContainer_t |
Definition at line 32 of file BoxLibParticle.h.
typedef amrex::FArrayBox BoxLibParticle< PLayout >::FArrayBox_t |
Definition at line 43 of file BoxLibParticle.h.
typedef AmrParticleBase<PLayout>::ParticleIndex_t BoxLibParticle< PLayout >::ParticleIndex_t |
Definition at line 27 of file BoxLibParticle.h.
typedef AmrParticleBase<PLayout>::ParticleLevelCounter_t BoxLibParticle< PLayout >::ParticleLevelCounter_t |
Definition at line 34 of file BoxLibParticle.h.
typedef AmrParticleBase<PLayout>::ParticlePos_t BoxLibParticle< PLayout >::ParticlePos_t |
Definition at line 26 of file BoxLibParticle.h.
typedef AmrParticleBase<PLayout>::SingleParticlePos_t BoxLibParticle< PLayout >::SingleParticlePos_t |
Definition at line 28 of file BoxLibParticle.h.
BoxLibParticle< PLayout >::BoxLibParticle | ( | ) |
Definition at line 13 of file BoxLibParticle.hpp.
References BoxLibParticle< PLayout >::AssignDensityTimer_m, and IpplTimings::getTimer().
BoxLibParticle< PLayout >::BoxLibParticle | ( | PLayout * | layout | ) |
layout | that does the particle-to-core management |
Definition at line 20 of file BoxLibParticle.hpp.
References BoxLibParticle< PLayout >::AssignDensityTimer_m, and IpplTimings::getTimer().
|
private |
Single-level scatter (adjusted from AMReX).
pa | is the attribute to scatter onto the grid |
mf | where attribute is scatterd to |
level | where we want to scatter |
ncomp | is the number of the component in the MultiFab (ncomp = 1) |
particle_lvl_offset | is zero |
Definition at line 156 of file BoxLibParticle.hpp.
References AmrParticleLevelCounter< Key, T, Compare, Allocator >::begin(), AmrParticleLevelCounter< Key, T, Compare, Allocator >::end(), and Attrib::Distribution::R.
|
private |
Multi-level scatter (adjusted from AMReX).
pa | is the attribute to scatter onto the grid |
mf_to_be_filled | is the MultiFab container to be filled (i.e. grid data) |
lev_min | level we want to start |
ncomp | is the number of components of MultiFab (equal to 1) |
finest_level | level we want to end |
Definition at line 94 of file BoxLibParticle.hpp.
References IpplTimings::startTimer(), and IpplTimings::stopTimer().
void BoxLibParticle< PLayout >::gather | ( | ParticleAttrib< FT > & | attrib, |
AmrVectorFieldContainer_t & | f, | ||
ParticleAttrib< Vektor< PT, Dim > > & | pp, | ||
int | lbase, | ||
int | lfine | ||
) |
Multi-level gather. Gather the data from the given Field into the given attribute, using the given Position attribute.
attrib | to gather from grid |
f | vector field on grid |
pp | particle position (not used for AMReX call) |
lbase | base level to gather from |
lfine | finest level to gather from |
Definition at line 82 of file BoxLibParticle.hpp.
Referenced by AmrBoxLib::computeSelfFields_cycl().
|
private |
Multi-level gather (adjusted from AMReX).
pa | is the attribute to gather to. |
mesh_data | where the information is |
lev_min | level to start |
lev_max | level to end |
Definition at line 278 of file BoxLibParticle.hpp.
|
private |
Multi-level gather.
pa | is the attribute to be updated |
mesh_data | where the information is taken from |
lev | for which we get the mesh data |
Definition at line 386 of file BoxLibParticle.hpp.
References AmrParticleLevelCounter< Key, T, Compare, Allocator >::begin(), AmrParticleLevelCounter< Key, T, Compare, Allocator >::end(), and Attrib::Distribution::R.
|
private |
Single-level gather (adjusted from AMReX).
pa | is the attribute to be updated |
mesh_data | where the information is taken from |
lev | for which we get the mesh data |
Definition at line 293 of file BoxLibParticle.hpp.
References AmrParticleLevelCounter< Key, T, Compare, Allocator >::begin(), AmrParticleLevelCounter< Key, T, Compare, Allocator >::end(), and Attrib::Distribution::R.
void BoxLibParticle< PLayout >::scatter | ( | ParticleAttrib< FT > & | attrib, |
AmrScalarFieldContainer_t & | f, | ||
ParticleAttrib< Vektor< PT, Dim > > & | pp, | ||
int | lbase, | ||
int | lfine, | ||
const ParticleAttrib< int > & | pbin, | ||
int | bin = -1 |
||
) |
Multi-level scatter. Scatter the data from the given attribute onto the given field, using the given position attribute. It calls the AMReX method.
attrib | to scatter onto grid |
f | field on grid |
pp | particle position (not used for AMReX call) |
lbase | base level we want to start |
lfine | finest level we want to stop |
pbin | the particle bin attribute |
bin | to scatter (default: -1 –> scatter all particles) |
Definition at line 28 of file BoxLibParticle.hpp.
References scatter().
Referenced by AmrBoxLib::computeSelfFields_cycl(), and AmrBoxLib::tagForChargeDensity_m().
void BoxLibParticle< PLayout >::scatter | ( | ParticleAttrib< FT > & | attrib, |
AmrField_t & | f, | ||
ParticleAttrib< Vektor< PT, Dim > > & | pp, | ||
const ParticleAttrib< int > & | pbin, | ||
int | bin = -1 , |
||
int | level = 0 |
||
) |
Single-level scatter. Scatter the data from the given attribute onto the given field, using the given position attribute. It calls the AMReX methods.
attrib | to scatter onto grid |
f | field on grid |
pp | particle position (not used for AMReX call) |
pbin | the particle bin attribute |
bin | to scatter (default: -1 –> scatter all particles) |
level | for which we put particles onto the grid |
Definition at line 61 of file BoxLibParticle.hpp.
|
private |
Definition at line 180 of file BoxLibParticle.h.
Referenced by BoxLibParticle< PLayout >::BoxLibParticle().