OPAL (Object Oriented Parallel Accelerator Library)
2024.1
OPAL
|
#include <AmrParticleBase.h>
Public Attributes | |
ParticleIndex_t | Level |
ParticleIndex_t | Grid |
![]() | |
ParticlePos_t | R |
ParticleIndex_t | ID |
![]() | |
ParticlePos_t * | R_p |
ParticleIndex_t * | ID_p |
Protected Attributes | |
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 |
Private Member Functions | |
void | getLocalBounds_m (Vector_t &rmin, Vector_t &rmax) |
void | getGlobalBounds_m (Vector_t &rmin, Vector_t &rmax) |
Private Attributes | |
ParticleLevelCounter_t | LocalNumPerLevel_m |
Additional Inherited Members | |
![]() | |
virtual DataSourceObject * | createDataSourceObject (const char *nm, DataConnect *dc, int tm) |
Definition at line 46 of file AmrParticleBase.h.
typedef PLayout::AmrField_t AmrParticleBase< PLayout >::AmrField_t |
Definition at line 52 of file AmrParticleBase.h.
typedef PLayout::AmrScalarFieldContainer_t AmrParticleBase< PLayout >::AmrScalarFieldContainer_t |
Definition at line 54 of file AmrParticleBase.h.
typedef PLayout::AmrVectorField_t AmrParticleBase< PLayout >::AmrVectorField_t |
Definition at line 53 of file AmrParticleBase.h.
typedef PLayout::AmrVectorFieldContainer_t AmrParticleBase< PLayout >::AmrVectorFieldContainer_t |
Definition at line 55 of file AmrParticleBase.h.
typedef std::vector<ParticleAttribBase *> AmrParticleBase< PLayout >::attrib_container_t |
Definition at line 59 of file AmrParticleBase.h.
typedef PLayout::ParticleIndex_t AmrParticleBase< PLayout >::ParticleIndex_t |
Definition at line 50 of file AmrParticleBase.h.
typedef AmrParticleLevelCounter<size_t, size_t> AmrParticleBase< PLayout >::ParticleLevelCounter_t |
Definition at line 64 of file AmrParticleBase.h.
typedef PLayout::ParticlePos_t AmrParticleBase< PLayout >::ParticlePos_t |
Definition at line 49 of file AmrParticleBase.h.
typedef PLayout::SingleParticlePos_t AmrParticleBase< PLayout >::SingleParticlePos_t |
Definition at line 51 of file AmrParticleBase.h.
typedef std::vector<SortListIndex_t> AmrParticleBase< PLayout >::SortList_t |
Definition at line 58 of file AmrParticleBase.h.
typedef long AmrParticleBase< PLayout >::SortListIndex_t |
Definition at line 57 of file AmrParticleBase.h.
AmrParticleBase< PLayout >::AmrParticleBase | ( | ) |
Definition at line 43 of file AmrParticleBase.hpp.
References AmrParticleBase< PLayout >::domainMappingTimer_m, IpplTimings::getTimer(), AmrParticleBase< PLayout >::sortParticlesTimer_m, and AmrParticleBase< PLayout >::updateParticlesTimer_m.
AmrParticleBase< PLayout >::AmrParticleBase | ( | PLayout * | layout | ) |
Definition at line 56 of file AmrParticleBase.hpp.
References AmrParticleBase< PLayout >::domainMappingTimer_m, IpplTimings::getTimer(), AmrParticleBase< PLayout >::sortParticlesTimer_m, and AmrParticleBase< PLayout >::updateParticlesTimer_m.
|
inline |
Definition at line 72 of file AmrParticleBase.h.
|
virtual |
Implements AbstractParticle< PLayout::Position_t, PLayout::Dimension >.
Definition at line 135 of file AmrParticleBase.hpp.
References IpplParticleBase< PLayout >::create().
|
virtual |
Implements AbstractParticle< PLayout::Position_t, PLayout::Dimension >.
Definition at line 152 of file AmrParticleBase.hpp.
References IpplParticleBase< PLayout >::createWithID().
|
virtual |
Implements AbstractParticle< PLayout::Position_t, PLayout::Dimension >.
Definition at line 95 of file AmrParticleBase.hpp.
References IpplParticleBase< PLayout >::destroy().
const double & AmrParticleBase< PLayout >::domainMapping | ( | bool | inverse = false | ) |
Linear mapping to AMReX computation domain [-1, 1]^3 including the Lorentz transform. All dimensions are mapped by the same scaling factor. The potential and electric field need to be scaled afterwards appropriately.
PData | is the particle data |
inverse | is true if we want to do the inverse operation |
Definition at line 265 of file AmrParticleBase.hpp.
References abs(), matheval::detail::math::isinf(), matheval::detail::math::isnan(), max(), IpplInfo::myNode(), Attrib::Distribution::R, IpplTimings::startTimer(), and IpplTimings::stopTimer().
Referenced by AmrPartBunch::boundp(), AmrBoxLib::computeSelfFields_cycl(), AmrPartBunch::do_binaryRepart(), and AmrBoxLib::initFineLevels().
|
inline |
Definition at line 125 of file AmrParticleBase.h.
References IpplParticleBase< PLayout >::getLayout().
Referenced by AmrPartBunch::set_meshEnlargement(), AmrPartBunch::setAmrDomainRatio(), and AmrYtWriter::writeBunch().
|
inline |
Definition at line 126 of file AmrParticleBase.h.
References IpplParticleBase< PLayout >::getLayout().
|
private |
Definition at line 370 of file AmrParticleBase.hpp.
References allreduce(), and min().
|
private |
Definition at line 349 of file AmrParticleBase.hpp.
References max(), and Attrib::Distribution::R.
const AmrParticleBase< PLayout >::ParticleLevelCounter_t & AmrParticleBase< PLayout >::getLocalNumPerLevel | ( | ) | const |
Definition at line 72 of file AmrParticleBase.hpp.
Referenced by AmrPartBunch::gatherLevelStatistics(), AmrBoxLib::postRegrid_m(), AmrBoxLib::tagForMaxNumParticles_m(), AmrBoxLib::tagForMinNumParticles_m(), AmrBoxLib::tagForMomenta_m(), AmrYtWriter::writeBunch(), and AmrYtWriter::writeParticles_m().
AmrParticleBase< PLayout >::ParticleLevelCounter_t & AmrParticleBase< PLayout >::getLocalNumPerLevel | ( | ) |
Definition at line 80 of file AmrParticleBase.hpp.
|
inline |
This function is used during the cell tagging routines.
Definition at line 338 of file AmrParticleBase.hpp.
Referenced by AmrPartBunch::get_hr(), and AmrBoxLib::tagForChargeDensity_m().
|
inline |
Definition at line 75 of file AmrParticleBase.h.
References IpplParticleBase< PLayout >::addAttribute(), AmrParticleBase< PLayout >::Grid, and AmrParticleBase< PLayout >::Level.
Referenced by AmrPartBunch::AmrPartBunch().
|
inline |
Definition at line 259 of file AmrParticleBase.hpp.
Referenced by AmrPartBunch::boundp(), AmrPartBunch::do_binaryRepart(), and AmrBoxLib::initFineLevels().
|
virtual |
Implements AbstractParticle< PLayout::Position_t, PLayout::Dimension >.
Definition at line 110 of file AmrParticleBase.hpp.
References IpplParticleBase< PLayout >::performDestroy().
|
inline |
This method is used in the AmrPartBunch::boundp() function in order to avoid multpile particle mappings during the mesh regridding process.
forbidTransform | true if we don't want to map particles onto \([-1, 1]^3\) |
Definition at line 253 of file AmrParticleBase.hpp.
Referenced by AmrPartBunch::boundp(), AmrBoxLib::computeSelfFields_cycl(), AmrPartBunch::do_binaryRepart(), and AmrBoxLib::initFineLevels().
void AmrParticleBase< PLayout >::setLocalNumPerLevel | ( | const ParticleLevelCounter_t & | LocalNumPerLevel | ) |
Definition at line 87 of file AmrParticleBase.hpp.
void AmrParticleBase< PLayout >::setLorentzFactor | ( | const Vector_t & | lorentzFactor | ) |
Definition at line 343 of file AmrParticleBase.hpp.
Referenced by AmrPartBunch::updateLorentzFactor().
void AmrParticleBase< PLayout >::sort | ( | ) |
Definition at line 215 of file AmrParticleBase.hpp.
References IpplTimings::startTimer(), and IpplTimings::stopTimer().
void AmrParticleBase< PLayout >::sort | ( | SortList_t & | sortlist | ) |
Definition at line 244 of file AmrParticleBase.hpp.
|
virtual |
Reimplemented from IpplParticleBase< PLayout >.
Definition at line 166 of file AmrParticleBase.hpp.
References PyOpal::PyOpalObjectNS::update().
Referenced by AmrBoxLib::computeSelfFields_cycl(), AmrBoxLib::postRegrid_m(), AmrBoxLib::tagForChargeDensity_m(), AmrBoxLib::tagForMaxNumParticles_m(), AmrBoxLib::tagForMinNumParticles_m(), and AmrBoxLib::tagForMomenta_m().
void AmrParticleBase< PLayout >::update | ( | int | lev_min, |
int | lev_max, | ||
bool | isRegrid = false |
||
) |
There's is NO check performed if lev_min <= lev_max and lev_min >= 0.
lev_min | is the start level to update |
lev_max | is the last level to update |
isRegrid | is true if we are updating the grids (default: false) |
Definition at line 173 of file AmrParticleBase.hpp.
References INCIPPLSTAT, PAssert, IpplTimings::startTimer(), and IpplTimings::stopTimer().
|
virtual |
Reimplemented from IpplParticleBase< PLayout >.
Definition at line 194 of file AmrParticleBase.hpp.
References INCIPPLSTAT, PAssert, IpplTimings::startTimer(), and IpplTimings::stopTimer().
|
protected |
Definition at line 173 of file AmrParticleBase.h.
Referenced by AmrParticleBase< PLayout >::AmrParticleBase().
|
protected |
To avoid multiple transformations during regrid.
Definition at line 175 of file AmrParticleBase.h.
ParticleIndex_t AmrParticleBase< PLayout >::Grid |
Definition at line 62 of file AmrParticleBase.h.
Referenced by AmrParticleBase< PLayout >::initializeAmr(), and AmrYtWriter::writeParticles_m().
ParticleIndex_t AmrParticleBase< PLayout >::Level |
Definition at line 61 of file AmrParticleBase.h.
Referenced by AmrParticleBase< PLayout >::initializeAmr().
|
private |
Definition at line 194 of file AmrParticleBase.h.
|
protected |
Lorentz factor used for the domain mapping. Is updated in AmrBoxLib
Definition at line 188 of file AmrParticleBase.h.
|
protected |
Scaling factor for particle coordinate transform (used for Poisson solve and particle-to-core distribution)
Definition at line 181 of file AmrParticleBase.h.
|
protected |
Definition at line 172 of file AmrParticleBase.h.
Referenced by AmrParticleBase< PLayout >::AmrParticleBase().
|
protected |
Definition at line 171 of file AmrParticleBase.h.
Referenced by AmrParticleBase< PLayout >::AmrParticleBase().