OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
|
#include <AmrObject.h>
Classes | |
struct | AmrInfo |
Public Types | |
enum | TaggingCriteria { CHARGE_DENSITY = 0 , POTENTIAL , EFIELD , MOMENTA , MIN_NUM_PARTICLES , MAX_NUM_PARTICLES } |
Methods for tagging cells for refinement. More... | |
typedef std::pair< Vector_t, Vector_t > | VectorPair_t |
Public Member Functions | |
AmrObject () | |
AmrObject (TaggingCriteria tagging, double scaling, double chargedensity) | |
virtual | ~AmrObject () |
virtual void | getGridStatistics (std::map< int, long > &gridPtsPerCore, std::vector< int > &gridsPerLevel) const =0 |
virtual void | initFineLevels ()=0 |
virtual void | regrid (double time)=0 |
void | setTagging (TaggingCriteria tagging) |
void | setTagging (const std::string &tagging) |
void | setScalingFactor (double scaling) |
void | setChargeDensity (double chargedensity) |
void | setMaxNumParticles (size_t maxNumPart) |
void | setMinNumParticles (size_t minNumPart) |
virtual VectorPair_t | getEExtrema ()=0 |
virtual double | getRho (int x, int y, int z)=0 |
virtual void | computeSelfFields ()=0 |
virtual void | computeSelfFields (int b)=0 |
virtual void | computeSelfFields_cycl (double gamma)=0 |
virtual void | computeSelfFields_cycl (int b)=0 |
virtual void | updateMesh ()=0 |
virtual Vektor< int, 3 > | getBaseLevelGridPoints () const =0 |
virtual const int & | maxLevel () const =0 |
virtual const int & | finestLevel () const =0 |
virtual double | getT () const =0 |
virtual void | redistributeGrids (int) |
const bool & | isRefined () const |
Static Public Member Functions | |
static std::string | enum2string (int number) |
Protected Attributes | |
TaggingCriteria | tagging_m |
Tagging strategy. More... | |
double | scaling_m |
Scaling factor for tagging [0, 1]. More... | |
double | chargedensity_m |
Tagging value for CHARGE_DENSITY. More... | |
size_t | maxNumPart_m |
Tagging value for MAX_NUM_PARTICLES. More... | |
size_t | minNumPart_m |
Tagging value for MIN_NUM_PARTICLES. More... | |
bool | refined_m |
Only set to true in AmrObject::initFineLevels() More... | |
IpplTimings::TimerRef | amrSolveTimer_m |
timer for selfField calculation (used in concrete AmrObject classes) More... | |
IpplTimings::TimerRef | amrRegridTimer_m |
Definition at line 31 of file AmrObject.h.
typedef std::pair<Vector_t, Vector_t> AmrObject::VectorPair_t |
Definition at line 35 of file AmrObject.h.
Methods for tagging cells for refinement.
Enumerator | |
---|---|
CHARGE_DENSITY | |
POTENTIAL | |
EFIELD | |
MOMENTA | |
MIN_NUM_PARTICLES | min. #particles per cell |
MAX_NUM_PARTICLES | max. #particles per cell |
Definition at line 39 of file AmrObject.h.
AmrObject::AmrObject | ( | ) |
Definition at line 26 of file AmrObject.cpp.
AmrObject::AmrObject | ( | TaggingCriteria | tagging, |
double | scaling, | ||
double | chargedensity | ||
) |
Definition at line 31 of file AmrObject.cpp.
|
virtual |
Definition at line 45 of file AmrObject.cpp.
|
pure virtual |
Implemented in AmrBoxLib.
Referenced by AmrPartBunch::computeSelfFields().
|
pure virtual |
Implemented in AmrBoxLib.
|
pure virtual |
Implemented in AmrBoxLib.
Referenced by AmrPartBunch::computeSelfFields_cycl().
|
pure virtual |
Implemented in AmrBoxLib.
|
static |
Used in Fieldsolver in order to convert a number that specifies the tagging to the corresponding string. Check enum TaggingCriteria for ordering.
number | of tagging |
Definition at line 100 of file AmrObject.cpp.
Referenced by FieldSolver::getTagging_m().
|
pure virtual |
Implemented in AmrBoxLib.
|
pure virtual |
Implemented in AmrBoxLib.
Referenced by AmrPartBunch::updateDomainLength().
|
pure virtual |
Implemented in AmrBoxLib.
Referenced by AmrPartBunch::getEExtrema().
|
pure virtual |
Collect information about grid load balancing.
gridPtsPerCore | is filled. |
gridsPerLevel | is filled |
Implemented in AmrBoxLib.
Referenced by GridLBalWriter::write().
|
pure virtual |
Implemented in AmrBoxLib.
Referenced by AmrPartBunch::getRho().
|
pure virtual |
Implemented in AmrBoxLib.
|
pure virtual |
Setup all fine levels after object creation.
Implemented in AmrBoxLib.
Referenced by AmrPartBunch::computeSelfFields_cycl(), and AmrPartBunch::do_binaryRepart().
const bool & AmrObject::isRefined | ( | ) | const |
Used in AmrPartBunch to check if we need to refine first.
Definition at line 95 of file AmrObject.cpp.
References refined_m.
Referenced by AmrPartBunch::computeSelfFields_cycl(), and AmrPartBunch::do_binaryRepart().
|
pure virtual |
Implemented in AmrBoxLib.
Referenced by AmrPartBunch::gatherLevelStatistics().
|
inlinevirtual |
Rebalance the grids among the cores
Reimplemented in AmrBoxLib.
Definition at line 163 of file AmrObject.h.
|
pure virtual |
Update of mesh according to chosen refinement strategy.
time | of regrid |
Implemented in AmrBoxLib.
void AmrObject::setChargeDensity | ( | double | chargedensity | ) |
Charge density for tagging with CHARGE_DENSITY
chargedensity | >= 0.0 (e.g. 1e-14) |
Definition at line 80 of file AmrObject.cpp.
References chargedensity_m.
void AmrObject::setMaxNumParticles | ( | size_t | maxNumPart | ) |
Maximum number of particles per cell for tagging
maxNumPart | is upper bound for a cell to be marked for refinement |
Definition at line 85 of file AmrObject.cpp.
References maxNumPart_m.
void AmrObject::setMinNumParticles | ( | size_t | minNumPart | ) |
Minimum number of particles per cell for tagging
minNumPart | is lower bound for a cell to be marked for refinement |
Definition at line 90 of file AmrObject.cpp.
References minNumPart_m.
void AmrObject::setScalingFactor | ( | double | scaling | ) |
Scaling factor for tagging. It is used with POTENTIAL and EFIELD
scaling | factor in [0, 1] |
Definition at line 75 of file AmrObject.cpp.
References scaling_m.
void AmrObject::setTagging | ( | const std::string & | tagging | ) |
Choose a new tagging strategy (string version). Is used in src/Structure/FieldSolver.cpp
tagging | strategy |
Definition at line 54 of file AmrObject.cpp.
References tagging_m.
void AmrObject::setTagging | ( | TaggingCriteria | tagging | ) |
Choose a new tagging strategy. Is used in src/Structure/FieldSolver.cpp
tagging | strategy |
Definition at line 49 of file AmrObject.cpp.
References tagging_m.
|
pure virtual |
Implemented in AmrBoxLib.
|
protected |
Definition at line 196 of file AmrObject.h.
Referenced by AmrBoxLib::regrid().
|
protected |
timer for selfField calculation (used in concrete AmrObject classes)
Definition at line 195 of file AmrObject.h.
Referenced by AmrBoxLib::computeSelfFields_cycl(), and AmrBoxLib::solvePoisson_m().
|
protected |
Tagging value for CHARGE_DENSITY.
Definition at line 186 of file AmrObject.h.
Referenced by setChargeDensity(), and AmrBoxLib::tagForChargeDensity_m().
|
protected |
Tagging value for MAX_NUM_PARTICLES.
Definition at line 188 of file AmrObject.h.
Referenced by setMaxNumParticles(), and AmrBoxLib::tagForMaxNumParticles_m().
|
protected |
Tagging value for MIN_NUM_PARTICLES.
Definition at line 190 of file AmrObject.h.
Referenced by setMinNumParticles(), and AmrBoxLib::tagForMinNumParticles_m().
|
protected |
Only set to true in AmrObject::initFineLevels()
Definition at line 192 of file AmrObject.h.
Referenced by AmrBoxLib::initFineLevels(), and isRefined().
|
protected |
Scaling factor for tagging [0, 1].
Definition at line 184 of file AmrObject.h.
Referenced by setScalingFactor(), AmrBoxLib::tagForEfield_m(), AmrBoxLib::tagForMomenta_m(), and AmrBoxLib::tagForPotentialStrength_m().
|
protected |
Tagging strategy.
Definition at line 182 of file AmrObject.h.
Referenced by AmrBoxLib::ErrorEst(), AmrBoxLib::preRegrid_m(), and setTagging().