OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
|
#include <FieldSolver.h>
Public Member Functions | |
FieldSolver () | |
Exemplar constructor. More... | |
virtual | ~FieldSolver () |
virtual FieldSolver * | clone (const std::string &name) |
Make clone. More... | |
std::string | getType () |
double | getMX () const |
Return meshsize. More... | |
double | getMY () const |
Return meshsize. More... | |
double | getMT () const |
Return meshsize. More... | |
void | setMX (double) |
Store emittance for mode 1. More... | |
void | setMY (double) |
Store emittance for mode 2. More... | |
void | setMT (double) |
Store emittance for mode 3. More... | |
virtual void | update () |
Update the field solver data. More... | |
virtual void | execute () |
Execute (init) the field solver data. More... | |
void | initCartesianFields () |
void | initSolver (PartBunchBase< double, 3 > *b) |
bool | hasValidSolver () |
void | setFieldSolverType () |
FieldSolverType | getFieldSolverType () const |
Layout_t & | getParticleLayout () |
FieldLayout_t * | getFieldLayout () |
Inform & | printInfo (Inform &os) const |
unsigned int | getInteractionRadius () |
bool | hasPeriodicZ () |
bool | isAmrSolverType () const |
AmrObject * | getAmrObject () |
const AmrObject * | getAmrObject () const |
![]() | |
virtual | ~Definition () |
virtual const std::string | getCategory () const |
Return the object category as a string. More... | |
virtual bool | shouldTrace () const |
Trace flag. More... | |
virtual bool | shouldUpdate () const |
Update flag. More... | |
![]() | |
virtual | ~Object () |
virtual bool | canReplaceBy (Object *object) |
Test if replacement is allowed. More... | |
virtual Object * | clone (const std::string &name)=0 |
Return a clone. More... | |
void | copyAttributes (const Object &) |
Copy attributes from another object. More... | |
virtual void | execute () |
Execute the command. More... | |
virtual Attribute * | findAttribute (const std::string &name) |
Find an attribute by name. More... | |
virtual const Attribute * | findAttribute (const std::string &name) const |
Find an attribute by name. More... | |
virtual const std::string | getCategory () const =0 |
Return the object category as a string. More... | |
virtual bool | shouldTrace () const =0 |
Trace flag. More... | |
virtual bool | shouldUpdate () const =0 |
Update flag. More... | |
virtual Object * | makeTemplate (const std::string &, TokenStream &, Statement &) |
Macro handler function. More... | |
virtual Object * | makeInstance (const std::string &name, Statement &, const Parser *) |
Macro handler function. More... | |
virtual void | parse (Statement &) |
Parse the object. More... | |
virtual void | parseShortcut (Statement &, bool eval=true) |
Parser for single-attribute commands. More... | |
virtual void | print (std::ostream &) const |
Print the object. More... | |
virtual void | printValue (std::ostream &) const |
virtual void | printHelp (std::ostream &) const |
Print help. More... | |
virtual void | replace (Object *oldObject, Object *newObject) |
Replace references. More... | |
virtual void | update () |
Update this object. More... | |
bool | isBuiltin () const |
True, if [b]this[/b] is a built-in object. More... | |
virtual bool | isShared () const |
Shared flag. More... | |
virtual void | setShared (bool) |
Set/reset shared flag. More... | |
void | setDirty (bool) |
Set/reset the [b]modified[/b] flag. More... | |
bool | isDirty () const |
True, if the [b]modified[/b] flag is set. More... | |
void | setFlag (bool) |
Flag/unflag this object, e. g. to control output of objects for. More... | |
bool | isFlagged () const |
True, if [b]this[/b] is flagged by setFlag(true). More... | |
const Object * | getBaseObject () const |
Return the object's base type object. More... | |
const std::string & | getOpalName () const |
Return object name. More... | |
Object * | getParent () const |
Return parent pointer. More... | |
bool | isTreeMember (const Object *subTree) const |
Test for tree membership. More... | |
void | setOpalName (const std::string &name) |
Set object name. More... | |
void | setParent (Object *) |
Set parent object. More... | |
void | clear () |
Clear the occurrence counter. More... | |
int | increment () |
Increment and return the occurrence counter. More... | |
int | occurrenceCount () |
Return the occurrence counter. More... | |
void | registerReference (Invalidator *a) |
Register a reference to this object. More... | |
void | unregisterReference (Invalidator *a) |
Unegister a reference to this object. More... | |
void | registerOwnership (const AttributeHandler::OwnerType &itsClass) const |
![]() | |
int | addReference () const |
Increment reference count. More... | |
int | removeReference () const |
Decrement the reference count. More... | |
bool | isShared () const |
Test for sharing. More... | |
Static Public Member Functions | |
static FieldSolver * | find (const std::string &name) |
Find named FieldSolver. More... | |
Public Attributes | |
PoissonSolver * | solver_m |
the actual solver, should be a base object More... | |
![]() | |
std::vector< Attribute > | itsAttr |
The object attributes. More... | |
Private Member Functions | |
std::string | getTagging_m () const |
void | initAmrObject_m () |
void | initAmrSolver_m () |
FieldSolver (const FieldSolver &) | |
void | operator= (const FieldSolver &) |
FieldSolver (const std::string &name, FieldSolver *parent) | |
Private Attributes | |
std::unique_ptr< AmrObject > | itsAmrObject_mp |
Mesh_t * | mesh_m |
The cartesian mesh. More... | |
FieldLayout_t * | FL_m |
The field layout f. More... | |
std::unique_ptr< Layout_t > | PL_m |
The particle layout. More... | |
PartBunchBase< double, 3 > * | itsBunch_m |
all the particles are here ... More... | |
std::string | fsName_m |
FieldSolverType | fsType_m |
double | rpp_m |
Additional Inherited Members | |
![]() | |
Definition (int size, const char *name, const char *help) | |
Constructor for exemplars. More... | |
Definition (const std::string &name, Definition *parent) | |
Constructor for clones. More... | |
![]() | |
Object (int size, const char *name, const char *help) | |
Constructor for exemplars. More... | |
Object (const std::string &name, Object *parent) | |
Constructor for clones. More... | |
![]() | |
RCObject () | |
Default constructor. More... | |
RCObject (const RCObject &) | |
Copy constructor. More... | |
virtual | ~RCObject ()=0 |
RCObject & | operator= (const RCObject &right) |
![]() | |
bool | builtin |
Built-in flag. More... | |
bool | modified |
Dirty flag. More... | |
bool | flagged |
Object flag. More... | |
Definition at line 52 of file FieldSolver.h.
FieldSolver::FieldSolver | ( | ) |
Exemplar constructor.
Definition at line 130 of file FieldSolver.cpp.
References ALPHA, Physics::e, FL_m, Object::itsAttr, Attributes::makeBool(), Attributes::makePredefinedString(), Attributes::makeReal(), Attributes::makeRealArray(), Attributes::makeUpperCaseString(), mesh_m, Attrib::Distribution::MT, Attrib::Distribution::MX, Attrib::Distribution::MY, PL_m, Object::registerOwnership(), Attributes::setRealArray(), solver_m, and AttributeHandler::STATEMENT.
Referenced by clone().
|
virtual |
Definition at line 366 of file FieldSolver.cpp.
|
private |
|
private |
|
virtual |
Make clone.
Implements Object.
Definition at line 381 of file FieldSolver.cpp.
References FieldSolver(), and name.
|
virtual |
Execute (init) the field solver data.
Reimplemented from Object.
Definition at line 385 of file FieldSolver.cpp.
References setFieldSolverType(), and update().
|
static |
Find named FieldSolver.
Definition at line 390 of file FieldSolver.cpp.
References OpalData::find(), Hypervolume::fs, OpalData::getInstance(), and name.
Referenced by TrackRun::setupFieldsolver().
|
inline |
Definition at line 114 of file FieldSolver.h.
References itsAmrObject_mp.
Referenced by AmrPartBunch::setSolver().
|
inline |
Definition at line 118 of file FieldSolver.h.
References itsAmrObject_mp.
|
inline |
Definition at line 103 of file FieldSolver.h.
References FL_m.
|
inline |
Definition at line 164 of file FieldSolver.h.
References fsType_m.
Referenced by PartBunch::computeSelfFields(), PartBunch::computeSelfFields_cycl(), PartBunch::resizeMesh(), and TrackRun::setupFieldsolver().
|
inline |
Definition at line 107 of file FieldSolver.h.
References rpp_m.
double FieldSolver::getMT | ( | ) | const |
Return meshsize.
Definition at line 411 of file FieldSolver.cpp.
References Attributes::getReal(), Object::itsAttr, and Attrib::Distribution::MT.
Referenced by initAmrObject_m(), initCartesianFields(), and TrackRun::setupFieldsolver().
double FieldSolver::getMX | ( | ) | const |
Return meshsize.
Definition at line 403 of file FieldSolver.cpp.
References Attributes::getReal(), Object::itsAttr, and Attrib::Distribution::MX.
Referenced by initAmrObject_m(), initCartesianFields(), and TrackRun::setupFieldsolver().
double FieldSolver::getMY | ( | ) | const |
Return meshsize.
Definition at line 407 of file FieldSolver.cpp.
References Attributes::getReal(), Object::itsAttr, and Attrib::Distribution::MY.
Referenced by initAmrObject_m(), initCartesianFields(), and TrackRun::setupFieldsolver().
|
inline |
Definition at line 101 of file FieldSolver.h.
References PL_m.
|
private |
Definition at line 713 of file FieldSolver.cpp.
References Physics::c, AmrObject::enum2string(), PyOpal::PyPolynomialPatch::function(), Attributes::getString(), and Object::itsAttr.
Referenced by initAmrObject_m(), and printInfo().
std::string FieldSolver::getType | ( | ) |
Definition at line 399 of file FieldSolver.cpp.
References Attributes::getString(), and Object::itsAttr.
Referenced by initAmrSolver_m(), and setFieldSolverType().
bool FieldSolver::hasPeriodicZ | ( | ) |
Definition at line 463 of file FieldSolver.cpp.
References Attributes::getString(), and Object::itsAttr.
Referenced by TrackRun::setupFieldsolver().
bool FieldSolver::hasValidSolver | ( | ) |
Definition at line 594 of file FieldSolver.cpp.
References solver_m.
Referenced by AmrPartBunch::computeSelfFields(), PartBunch::computeSelfFields(), and PartBunch::computeSelfFields_cycl().
|
private |
Definition at line 729 of file FieldSolver.cpp.
References AmrBoxLib::create(), getMT(), getMX(), getMY(), Attributes::getReal(), Attributes::getRealArray(), getTagging_m(), AmrObject::AmrInfo::grid, Options::info, itsAmrObject_mp, Object::itsAttr, itsBunch_m, AmrObject::AmrInfo::maxgrid, and PartBunchBase< T, Dim >::set_meshEnlargement().
Referenced by initSolver().
|
private |
Definition at line 771 of file FieldSolver.cpp.
References AMRMG, FMG, fsType_m, Attributes::getBool(), Attributes::getReal(), Attributes::getString(), getType(), HPGMG, HYPRE, itsAmrObject_mp, Object::itsAttr, ML, and solver_m.
Referenced by initSolver().
void FieldSolver::initCartesianFields | ( | ) |
Definition at line 431 of file FieldSolver.cpp.
References FL_m, Attributes::getBool(), getMT(), getMX(), getMY(), Attributes::getString(), isAmrSolverType(), Object::itsAttr, mesh_m, PARALLEL, PL_m, and SERIAL.
Referenced by TrackRun::setupFieldsolver().
void FieldSolver::initSolver | ( | PartBunchBase< double, 3 > * | b | ) |
Definition at line 503 of file FieldSolver.cpp.
References ALPHA, Object::clear(), endl(), FFT, FFTBOX, BoundaryGeometry::find(), FL_m, fsName_m, fsType_m, BoundaryGeometry::getA(), OpalData::getGlobalGeometry(), OpalData::getInstance(), Attributes::getReal(), Attributes::getString(), INFOMSG, initAmrObject_m(), initAmrSolver_m(), isAmrSolverType(), Object::itsAttr, itsBunch_m, mesh_m, P3M, SAAMG, PartBunchBase< T, Dim >::set_meshEnlargement(), and solver_m.
bool FieldSolver::isAmrSolverType | ( | ) | const |
Definition at line 470 of file FieldSolver.cpp.
References Options::amr, AMRMG, FMG, fsType_m, and ML.
Referenced by initCartesianFields(), initSolver(), and printInfo().
|
private |
Definition at line 598 of file FieldSolver.cpp.
References ALPHA, Options::amr, AMRMG, endl(), FFT, fsName_m, fsType_m, Attributes::getBool(), IpplInfo::getNodes(), Object::getOpalName(), Attributes::getReal(), Attributes::getRealArray(), Attributes::getString(), getTagging_m(), INFOMSG, isAmrSolverType(), Object::itsAttr, level3(), mesh_m, Attrib::Distribution::MT, Attrib::Distribution::MX, Attrib::Distribution::MY, P3M, PL_m, SAAMG, and solver_m.
void FieldSolver::setFieldSolverType | ( | ) |
void FieldSolver::setMT | ( | double | value | ) |
Store emittance for mode 3.
Definition at line 423 of file FieldSolver.cpp.
References Object::itsAttr, Attrib::Distribution::MT, and Attributes::setReal().
void FieldSolver::setMX | ( | double | value | ) |
Store emittance for mode 1.
Definition at line 415 of file FieldSolver.cpp.
References Object::itsAttr, Attrib::Distribution::MX, and Attributes::setReal().
void FieldSolver::setMY | ( | double | value | ) |
Store emittance for mode 2.
Definition at line 419 of file FieldSolver.cpp.
References Object::itsAttr, Attrib::Distribution::MY, and Attributes::setReal().
|
virtual |
Update the field solver data.
Reimplemented from Object.
Definition at line 427 of file FieldSolver.cpp.
Referenced by execute().
|
private |
The field layout f.
Definition at line 149 of file FieldSolver.h.
Referenced by FieldSolver(), getFieldLayout(), initCartesianFields(), initSolver(), and ~FieldSolver().
|
private |
Definition at line 157 of file FieldSolver.h.
Referenced by initSolver(), printInfo(), and setFieldSolverType().
|
private |
Definition at line 158 of file FieldSolver.h.
Referenced by getFieldSolverType(), initAmrSolver_m(), initSolver(), isAmrSolverType(), printInfo(), and setFieldSolverType().
|
private |
Definition at line 135 of file FieldSolver.h.
Referenced by getAmrObject(), initAmrObject_m(), and initAmrSolver_m().
|
private |
all the particles are here ...
Definition at line 155 of file FieldSolver.h.
Referenced by initAmrObject_m(), and initSolver().
|
private |
The cartesian mesh.
Definition at line 146 of file FieldSolver.h.
Referenced by FieldSolver(), initCartesianFields(), initSolver(), printInfo(), and ~FieldSolver().
|
private |
The particle layout.
Definition at line 152 of file FieldSolver.h.
Referenced by FieldSolver(), getParticleLayout(), initCartesianFields(), and printInfo().
|
private |
Definition at line 160 of file FieldSolver.h.
Referenced by getInteractionRadius().
PoissonSolver* FieldSolver::solver_m |
the actual solver, should be a base object
Definition at line 124 of file FieldSolver.h.
Referenced by PartBunch::computeSelfFields(), PartBunch::computeSelfFields_cycl(), FieldSolver(), AmrPartBunch::getFieldSolver(), hasValidSolver(), initAmrSolver_m(), initSolver(), printInfo(), PartBunch::resizeMesh(), and ~FieldSolver().