OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
FieldSolver Class Reference

#include <FieldSolver.h>

Inheritance diagram for FieldSolver:
Inheritance graph
[legend]
Collaboration diagram for FieldSolver:
Collaboration graph
[legend]

Public Member Functions

 FieldSolver ()
 Exemplar constructor.
 
virtual ~FieldSolver ()
 
virtual FieldSolver * clone (const std::string &name)
 Make clone.
 
std::string getType ()
 
double getMX () const
 Return meshsize.
 
double getMY () const
 Return meshsize.
 
double getMT () const
 Return meshsize.
 
void setMX (double)
 Store emittance for mode 1.
 
void setMY (double)
 Store emittance for mode 2.
 
void setMT (double)
 Store emittance for mode 3.
 
virtual void update ()
 Update the field solver data.
 
virtual void execute ()
 Execute (init) the field solver data.
 
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 ()
 
const Attribute & getBCZAttribute () const
 
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.
 
virtual bool shouldTrace () const
 Trace flag.
 
virtual bool shouldUpdate () const
 Update flag.
 
- Public Member Functions inherited from Object
virtual ~Object ()
 
virtual bool canReplaceBy (Object *object)
 Test if replacement is allowed.
 
void copyAttributes (const Object &)
 Copy attributes from another object.
 
virtual Attribute * findAttribute (const std::string &name)
 Find an attribute by name.
 
virtual const Attribute * findAttribute (const std::string &name) const
 Find an attribute by name.
 
virtual Object * makeTemplate (const std::string &, TokenStream &, Statement &)
 Macro handler function.
 
virtual Object * makeInstance (const std::string &name, Statement &, const Parser *)
 Macro handler function.
 
virtual void parse (Statement &)
 Parse the object.
 
virtual void parseShortcut (Statement &, bool eval=true)
 Parser for single-attribute commands.
 
virtual void print (std::ostream &) const
 Print the object.
 
virtual void printValue (std::ostream &) const
 
virtual void printHelp (std::ostream &) const
 Print help.
 
virtual void replace (Object *oldObject, Object *newObject)
 Replace references.
 
bool isBuiltin () const
 True, if [b]this[/b] is a built-in object.
 
virtual bool isShared () const
 Shared flag.
 
virtual void setShared (bool)
 Set/reset shared flag.
 
void setDirty (bool)
 Set/reset the [b]modified[/b] flag.
 
bool isDirty () const
 True, if the [b]modified[/b] flag is set.
 
void setFlag (bool)
 Flag/unflag this object, e. g. to control output of objects for.
 
bool isFlagged () const
 True, if [b]this[/b] is flagged by setFlag(true).
 
const Object * getBaseObject () const
 Return the object's base type object.
 
const std::string & getOpalName () const
 Return object name.
 
Object * getParent () const
 Return parent pointer.
 
bool isTreeMember (const Object *subTree) const
 Test for tree membership.
 
void setOpalName (const std::string &name)
 Set object name.
 
void setParent (Object *)
 Set parent object.
 
void clear ()
 Clear the occurrence counter.
 
int increment ()
 Increment and return the occurrence counter.
 
int occurrenceCount ()
 Return the occurrence counter.
 
void registerReference (Invalidator *a)
 Register a reference to this object.
 
void unregisterReference (Invalidator *a)
 Unegister a reference to this object.
 
void registerOwnership (const AttributeHandler::OwnerType &itsClass) const
 
- Public Member Functions inherited from RCObject
int addReference () const
 Increment reference count.
 
int removeReference () const
 Decrement the reference count.
 
bool isShared () const
 Test for sharing.
 

Static Public Member Functions

static FieldSolver * find (const std::string &name)
 Find named FieldSolver.
 

Public Attributes

PoissonSolver * solver_m
 the actual solver, should be a base object
 
- Public Attributes inherited from Object
std::vector< Attribute > itsAttr
 The object attributes.
 

Private Member Functions

std::string getTagging_m () const
 
void initAmrObject_m ()
 
void initAmrSolver_m ()
 
MeshFitParameters getMeshFitParameters_m () const
 MESHFIT and its parameters; throws if they are invalid or CORE is not available.
 
 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.
 
FieldLayout_t * FL_m
 The field layout f.
 
std::unique_ptr< Layout_t > PL_m
 The particle layout.
 
PartBunchBase< double, 3 > * itsBunch_m
 all the particles are here ...
 
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.
 
 Definition (const std::string &name, Definition *parent)
 Constructor for clones.
 
- Protected Member Functions inherited from Object
 Object (int size, const char *name, const char *help)
 Constructor for exemplars.
 
 Object (const std::string &name, Object *parent)
 Constructor for clones.
 
- Protected Member Functions inherited from RCObject
 RCObject ()
 Default constructor.
 
 RCObject (const RCObject &)
 Copy constructor.
 
virtual ~RCObject ()=0
 
RCObject & operator= (const RCObject &right)
 
- Protected Attributes inherited from Object
bool builtin
 Built-in flag.
 
bool modified
 Dirty flag.
 
bool flagged
 Object flag.
 

Detailed Description

Definition at line 75 of file FieldSolver.h.

Constructor & Destructor Documentation

◆ FieldSolver() [1/3]

FieldSolver::FieldSolver ( )

◆ ~FieldSolver()

FieldSolver::~FieldSolver ( )
virtual

Definition at line 395 of file FieldSolver.cpp.

References FL_m, mesh_m, and solver_m.

◆ FieldSolver() [2/3]

FieldSolver::FieldSolver ( const FieldSolver &  )
private

◆ FieldSolver() [3/3]

FieldSolver::FieldSolver ( const std::string &  name,
FieldSolver *  parent 
)
private

Definition at line 385 of file FieldSolver.cpp.

References FL_m, mesh_m, PL_m, and solver_m.

Member Function Documentation

◆ clone()

FieldSolver * FieldSolver::clone ( const std::string &  name)
virtual

Make clone.

Implements Object.

Definition at line 410 of file FieldSolver.cpp.

References FieldSolver(), and name.

Here is the call graph for this function:

◆ execute()

void FieldSolver::execute ( )
virtual

Execute (init) the field solver data.

Reimplemented from Object.

Definition at line 414 of file FieldSolver.cpp.

References setFieldSolverType(), and update().

Here is the call graph for this function:

◆ find()

FieldSolver * FieldSolver::find ( const std::string &  name)
static

Find named FieldSolver.

Definition at line 419 of file FieldSolver.cpp.

References OpalData::find(), OpalData::getInstance(), and name.

Referenced by TrackRun::setupFieldsolver().

Here is the call graph for this function:

◆ getAmrObject() [1/2]

AmrObject * FieldSolver::getAmrObject ( )
inline

Definition at line 139 of file FieldSolver.h.

References itsAmrObject_mp.

Referenced by AmrPartBunch::setSolver().

◆ getAmrObject() [2/2]

const AmrObject * FieldSolver::getAmrObject ( ) const
inline

Definition at line 143 of file FieldSolver.h.

References itsAmrObject_mp.

◆ getBCZAttribute()

const Attribute & FieldSolver::getBCZAttribute ( ) const

◆ getFieldLayout()

FieldLayout_t * FieldSolver::getFieldLayout ( )
inline

Definition at line 126 of file FieldSolver.h.

References FL_m.

◆ getFieldSolverType()

FieldSolverType FieldSolver::getFieldSolverType ( ) const
inline

◆ getInteractionRadius()

unsigned int FieldSolver::getInteractionRadius ( )
inline

Definition at line 130 of file FieldSolver.h.

References rpp_m.

◆ getMeshFitParameters_m()

MeshFitParameters FieldSolver::getMeshFitParameters_m ( ) const
private

◆ getMT()

double FieldSolver::getMT ( ) const

Return meshsize.

Definition at line 440 of file FieldSolver.cpp.

References Attributes::getReal(), and Object::itsAttr.

Referenced by initAmrObject_m(), initCartesianFields(), and TrackRun::setupFieldsolver().

Here is the call graph for this function:

◆ getMX()

double FieldSolver::getMX ( ) const

Return meshsize.

Definition at line 432 of file FieldSolver.cpp.

References Attributes::getReal(), and Object::itsAttr.

Referenced by initAmrObject_m(), initCartesianFields(), and TrackRun::setupFieldsolver().

Here is the call graph for this function:

◆ getMY()

double FieldSolver::getMY ( ) const

Return meshsize.

Definition at line 436 of file FieldSolver.cpp.

References Attributes::getReal(), and Object::itsAttr.

Referenced by initAmrObject_m(), initCartesianFields(), and TrackRun::setupFieldsolver().

Here is the call graph for this function:

◆ getParticleLayout()

Layout_t & FieldSolver::getParticleLayout ( )
inline

Definition at line 124 of file FieldSolver.h.

References PL_m.

◆ getTagging_m()

std::string FieldSolver::getTagging_m ( ) const
private

Definition at line 806 of file FieldSolver.cpp.

References Attributes::getString(), AmrObject::getTaggingString(), Util::isAllDigits(), and Object::itsAttr.

Referenced by initAmrObject_m(), and printInfo().

Here is the call graph for this function:

◆ getType()

std::string FieldSolver::getType ( )

Definition at line 428 of file FieldSolver.cpp.

References Attributes::getString(), and Object::itsAttr.

Referenced by initAmrSolver_m(), and setFieldSolverType().

Here is the call graph for this function:

◆ hasPeriodicZ()

bool FieldSolver::hasPeriodicZ ( )

Definition at line 501 of file FieldSolver.cpp.

References getBCZAttribute(), and Attributes::getString().

Referenced by TrackRun::setupFieldsolver().

Here is the call graph for this function:

◆ hasValidSolver()

bool FieldSolver::hasValidSolver ( )

◆ initAmrObject_m()

void FieldSolver::initAmrObject_m ( )
private

◆ initAmrSolver_m()

void FieldSolver::initAmrSolver_m ( )
private

Definition at line 859 of file FieldSolver.cpp.

References AMRMG, FMG, fsType_m, getBCZAttribute(), Attributes::getBool(), Attributes::getReal(), Attributes::getString(), getType(), HPGMG, HYPRE, itsAmrObject_mp, Object::itsAttr, ML, and solver_m.

Referenced by initSolver().

Here is the call graph for this function:

◆ initCartesianFields()

void FieldSolver::initCartesianFields ( )

Definition at line 460 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().

Here is the call graph for this function:

◆ initSolver()

void FieldSolver::initSolver ( PartBunchBase< double, 3 > *  b)

◆ isAmrSolverType()

bool FieldSolver::isAmrSolverType ( ) const

Definition at line 507 of file FieldSolver.cpp.

References Options::amr, AMRMG, FMG, fsType_m, and ML.

Referenced by initCartesianFields(), initSolver(), and printInfo().

◆ operator=()

void FieldSolver::operator= ( const FieldSolver &  )
private

◆ printInfo()

Inform & FieldSolver::printInfo ( Inform &  os) const

◆ setFieldSolverType()

void FieldSolver::setFieldSolverType ( )

Definition at line 518 of file FieldSolver.cpp.

References AMRMG, FFT, FFTBOX, FMG, fsName_m, fsType_m, getType(), HPGMG, HYPRE, ML, NONE, P3M, and SAAMG.

Referenced by execute().

Here is the call graph for this function:

◆ setMT()

void FieldSolver::setMT ( double  value)

Store emittance for mode 3.

Definition at line 452 of file FieldSolver.cpp.

References Object::itsAttr, and Attributes::setReal().

Here is the call graph for this function:

◆ setMX()

void FieldSolver::setMX ( double  value)

Store emittance for mode 1.

Definition at line 444 of file FieldSolver.cpp.

References Object::itsAttr, and Attributes::setReal().

Here is the call graph for this function:

◆ setMY()

void FieldSolver::setMY ( double  value)

Store emittance for mode 2.

Definition at line 448 of file FieldSolver.cpp.

References Object::itsAttr, and Attributes::setReal().

Here is the call graph for this function:

◆ update()

void FieldSolver::update ( )
virtual

Update the field solver data.

Reimplemented from Object.

Definition at line 456 of file FieldSolver.cpp.

Referenced by execute().

Member Data Documentation

◆ FL_m

FieldLayout_t* FieldSolver::FL_m
private

The field layout f.

Definition at line 177 of file FieldSolver.h.

Referenced by FieldSolver(), FieldSolver(), getFieldLayout(), initCartesianFields(), initSolver(), and ~FieldSolver().

◆ fsName_m

std::string FieldSolver::fsName_m
private

Definition at line 185 of file FieldSolver.h.

Referenced by getMeshFitParameters_m(), initSolver(), printInfo(), and setFieldSolverType().

◆ fsType_m

FieldSolverType FieldSolver::fsType_m
private

◆ itsAmrObject_mp

std::unique_ptr<AmrObject> FieldSolver::itsAmrObject_mp
private

Definition at line 160 of file FieldSolver.h.

Referenced by getAmrObject(), getAmrObject(), initAmrObject_m(), and initAmrSolver_m().

◆ itsBunch_m

PartBunchBase<double, 3>* FieldSolver::itsBunch_m
private

all the particles are here ...

Definition at line 183 of file FieldSolver.h.

Referenced by getMeshFitParameters_m(), initAmrObject_m(), and initSolver().

◆ mesh_m

Mesh_t* FieldSolver::mesh_m
private

The cartesian mesh.

Definition at line 174 of file FieldSolver.h.

Referenced by FieldSolver(), FieldSolver(), initCartesianFields(), initSolver(), printInfo(), and ~FieldSolver().

◆ PL_m

std::unique_ptr<Layout_t> FieldSolver::PL_m
private

The particle layout.

Definition at line 180 of file FieldSolver.h.

Referenced by FieldSolver(), FieldSolver(), getParticleLayout(), initCartesianFields(), and printInfo().

◆ rpp_m

double FieldSolver::rpp_m
private

Definition at line 188 of file FieldSolver.h.

Referenced by getInteractionRadius().

◆ solver_m

PoissonSolver* FieldSolver::solver_m

The documentation for this class was generated from the following files: