OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
#include <AbstractTimeDependence.h>
Public Member Functions | |
virtual | ~AbstractTimeDependence () |
virtual AbstractTimeDependence * | clone ()=0 |
virtual double | getValue (double time)=0 |
Static Public Member Functions | |
static std::shared_ptr< AbstractTimeDependence > | getTimeDependence (std::string name) |
static void | setTimeDependence (std::string name, std::shared_ptr< AbstractTimeDependence > time_dep) |
static std::string | getName (std::shared_ptr< AbstractTimeDependence > time_dep) |
Static Private Attributes | |
static std::map< std::string, std::shared_ptr< AbstractTimeDependence > > | td_map |
Time dependence abstraction for field parameters that vary slowly with time; for example, in RF cavities for synchrotrons the RF frequency varies to match the time-of-flight of the particles
This base class stores a mapping of string to time dependence. At Visit time, we do a map look-up to assign the appropriate TimeDependence to the relevant field Elements.
Definition at line 45 of file AbstractTimeDependence.h.
|
inlinevirtual |
Destructor does nothing
Definition at line 49 of file AbstractTimeDependence.h.
|
pure virtual |
Inheritable copy constructor
Implemented in SplineTimeDependence, and PolynomialTimeDependence.
|
static |
Get the name corresponding to a given time_dep
time_dep | time dependence to lookup |
GeneralClassicException | if time_dep is not recognised |
Definition at line 50 of file AbstractTimeDependence.cpp.
References td_map.
|
static |
Look up the time dependence that has a given name
name | name of the time dependence |
GeneralClassicException | if name is not recognised |
Definition at line 36 of file AbstractTimeDependence.cpp.
Referenced by VariableRFCavity::initialise(), and ParallelCyclotronTracker::visitRFCavity().
|
pure virtual |
getValue(time) returns the value as a function of time.
This could represent RF voltage or frequency, magnetic field strength etc
Implemented in SplineTimeDependence, and PolynomialTimeDependence.
|
static |
Add a value to the lookup table
name | name of the time dependence. If name already exists in the map, it is overwritten with the new value. |
time_dep | shared_ptr to the time dependence. |
Definition at line 45 of file AbstractTimeDependence.cpp.
Referenced by OpalPolynomialTimeDependence::update().
|
staticprivate |
Definition at line 95 of file AbstractTimeDependence.h.
Referenced by getName(), getTimeDependence(), and setTimeDependence().