|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
|
#include <AbstractTimeDependence.h>


Public Member Functions | |
| virtual | ~AbstractTimeDependence ()=default |
| virtual AbstractTimeDependence * | clone ()=0 |
| virtual double | getValue (double time)=0 |
| virtual double | getIntegral (double time)=0 |
Static Public Member Functions | |
| static std::shared_ptr< AbstractTimeDependence > | getTimeDependence (const std::string &name) |
| static void | setTimeDependence (const std::string &name, std::shared_ptr< AbstractTimeDependence > time_dep) |
| static std::string | getName (const 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 33 of file AbstractTimeDependence.h.
|
virtualdefault |
Destructor does nothing
|
pure virtual |
Inheritable copy constructor
Implemented in PolynomialTimeDependence, SinusoidalTimeDependence, and SplineTimeDependence.
|
pure virtual |
getIntegral(time) returns the integral from 0 to time of the function.
Implemented in PolynomialTimeDependence, SinusoidalTimeDependence, and SplineTimeDependence.
|
static |
Get the name corresponding to a given time_dep
| time_dep | time dependence to lookup |
| GeneralOpalException | if time_dep is not recognised |
Definition at line 40 of file AbstractTimeDependence.cpp.
References td_map.
|
static |
Look up the time dependence that has a given name
| name | name of the time dependence |
| GeneralOpalException | if name is not recognised |
Definition at line 24 of file AbstractTimeDependence.cpp.
References td_map.
Referenced by MultipoleT::initialiseTimeDependencies(), VariableRFCavity::initialiseTimeDependencies(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
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 PolynomialTimeDependence, SinusoidalTimeDependence, and SplineTimeDependence.
|
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 35 of file AbstractTimeDependence.cpp.
References td_map.
Referenced by TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), OpalPolynomialTimeDependence::update(), OpalSinusoidalTimeDependence::update(), and OpalSplineTimeDependence::update().
|
staticprivate |
Definition at line 87 of file AbstractTimeDependence.h.
Referenced by getName(), getTimeDependence(), and setTimeDependence().