|
OPAL (Object Oriented Parallel Accelerator Library)
2024.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 |
Public Member Functions inherited from Definition | |
| 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... | |
Public Member Functions inherited from Object | |
| virtual | ~Object () |
| virtual bool | canReplaceBy (Object *object) |
| Test if replacement is allowed. More... | |
| void | copyAttributes (const Object &) |
| Copy attributes from another object. 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 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... | |
| 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 |
Public Member Functions inherited from RCObject | |
| 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... | |
Public Attributes inherited from Object | |
| 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 | |
Protected Member Functions inherited from Definition | |
| Definition (int size, const char *name, const char *help) | |
| Constructor for exemplars. More... | |
| Definition (const std::string &name, Definition *parent) | |
| Constructor for clones. More... | |
Protected Member Functions inherited from Object | |
| Object (int size, const char *name, const char *help) | |
| Constructor for exemplars. More... | |
| Object (const std::string &name, Object *parent) | |
| Constructor for clones. More... | |
Protected Member Functions inherited from RCObject | |
| RCObject () | |
| Default constructor. More... | |
| RCObject (const RCObject &) | |
| Copy constructor. More... | |
| virtual | ~RCObject ()=0 |
| RCObject & | operator= (const RCObject &right) |
Protected Attributes inherited from Object | |
| 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 126 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 362 of file FieldSolver.cpp.
|
private |
|
private |
|
virtual |
Make clone.
Implements Object.
Definition at line 377 of file FieldSolver.cpp.
References FieldSolver().

|
virtual |
Execute (init) the field solver data.
Reimplemented from Object.
Definition at line 381 of file FieldSolver.cpp.
References setFieldSolverType(), and update().
Referenced by PyOpal::PyFieldSolverNS::registerFieldSolver().

|
static |
Find named FieldSolver.
Definition at line 386 of file FieldSolver.cpp.
References OpalData::find(), Hypervolume::fs, and OpalData::getInstance().
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.
Referenced by PartBunchBase< T, Dim >::setSolver().
|
inline |
Definition at line 164 of file FieldSolver.h.
References fsType_m.
Referenced by PartBunchBase< T, Dim >::boundp(), PartBunch::computeSelfFields(), PartBunch::computeSelfFields_cycl(), PartBunchBase< T, Dim >::getFieldSolverType(), 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 407 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 399 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 403 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 709 of file FieldSolver.cpp.
References Attributes::getString(), AmrObject::getTaggingString(), Util::isAllDigits(), and Object::itsAttr.
Referenced by initAmrObject_m(), and printInfo().

| std::string FieldSolver::getType | ( | ) |
Definition at line 395 of file FieldSolver.cpp.
References Attributes::getString(), and Object::itsAttr.
Referenced by initAmrSolver_m(), and setFieldSolverType().

| bool FieldSolver::hasPeriodicZ | ( | ) |
Definition at line 459 of file FieldSolver.cpp.
References Attributes::getString(), and Object::itsAttr.
Referenced by TrackRun::setupFieldsolver().

| bool FieldSolver::hasValidSolver | ( | ) |
Definition at line 590 of file FieldSolver.cpp.
References solver_m.
Referenced by AmrPartBunch::computeSelfFields(), PartBunch::computeSelfFields(), PartBunch::computeSelfFields_cycl(), and PartBunchBase< T, Dim >::hasFieldSolver().
|
private |
Definition at line 720 of file FieldSolver.cpp.
References AmrObject::AmrInfo::bf, 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, AmrObject::AmrInfo::maxlevel, AmrObject::AmrInfo::refratio, and PartBunchBase< T, Dim >::set_meshEnlargement().
Referenced by initSolver().

|
private |
Definition at line 762 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 427 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 499 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.
Referenced by PartBunchBase< T, Dim >::setSolver().

| bool FieldSolver::isAmrSolverType | ( | ) | const |
Definition at line 466 of file FieldSolver.cpp.
References Options::amr, AMRMG, FMG, fsType_m, and ML.
Referenced by initCartesianFields(), initSolver(), and printInfo().
|
private |
Definition at line 594 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.
Referenced by operator<<().

| void FieldSolver::setFieldSolverType | ( | ) |
| void FieldSolver::setMT | ( | double | value | ) |
Store emittance for mode 3.
Definition at line 419 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 411 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 415 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 423 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 PartBunchBase< T, Dim >::boundp(), PartBunch::computeSelfFields(), PartBunch::computeSelfFields_cycl(), FieldSolver(), AmrPartBunch::getFieldSolver(), hasValidSolver(), initAmrSolver_m(), initSolver(), printInfo(), PartBunch::resizeMesh(), and ~FieldSolver().
1.8.5