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


Public Member Functions | |
| PolynomialTimeDependence (const std::vector< double > &ptd) | |
| PolynomialTimeDependence ()=default | |
| ~PolynomialTimeDependence () override=default | |
| double | getValue (double time) override |
| double | getIntegral (double time) override |
| PolynomialTimeDependence * | clone () override |
| Inform & | print (Inform &os) const |
| const std::vector< double > & | getCoefficients () const |
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) |
Private Attributes | |
| std::vector< double > | coeffs |
Static Private Attributes | |
| static std::map< std::string, std::shared_ptr< AbstractTimeDependence > > | td_map |
Time dependence that follows a polynomial, like p_0 + p_1*t + p_2*t^2 + ... + p_i*t^i + ...
Definition at line 29 of file PolynomialTimeDependence.h.
|
inlineexplicit |
Constructor
| ptd | the polynomial coefficients p_i; can be of arbitrary length (user is responsible for issues like floating point precision). |
Definition at line 36 of file PolynomialTimeDependence.h.
|
default |
Default Constructor makes a 0 length polynomial
Referenced by clone().
|
overridedefault |
Destructor does nothing
|
overridevirtual |
Inheritable copy constructor
Implements AbstractTimeDependence.
Definition at line 20 of file PolynomialTimeDependence.cpp.
References coeffs, and PolynomialTimeDependence().
Referenced by TEST(), and TEST().

|
inline |
Return the polynomial coefficients
Definition at line 64 of file PolynomialTimeDependence.h.
References coeffs.
|
overridevirtual |
Return the integral of the polynomial from 0 to time
Implements AbstractTimeDependence.
Definition at line 36 of file PolynomialTimeDependence.cpp.
References coeffs.
|
staticinherited |
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 AbstractTimeDependence::td_map.
|
staticinherited |
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 AbstractTimeDependence::td_map.
Referenced by MultipoleT::initialiseTimeDependencies(), VariableRFCavity::initialiseTimeDependencies(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
overridevirtual |
Return the polynomial Sum_i p_i t^i; returns 0 if p is of 0 length
Implements AbstractTimeDependence.
Definition at line 26 of file PolynomialTimeDependence.cpp.
References coeffs.
Referenced by TEST().
| Inform & PolynomialTimeDependence::print | ( | Inform & | os | ) | const |
Print the polynomials
| os | "Inform" stream to which the polynomials are printed. |
Definition at line 46 of file PolynomialTimeDependence.cpp.
References coeffs.
Referenced by operator<<().
|
staticinherited |
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 AbstractTimeDependence::td_map.
Referenced by TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), OpalPolynomialTimeDependence::update(), OpalSinusoidalTimeDependence::update(), and OpalSplineTimeDependence::update().
|
private |
Definition at line 67 of file PolynomialTimeDependence.h.
Referenced by clone(), getCoefficients(), getIntegral(), getValue(), and print().
|
staticprivateinherited |
Definition at line 87 of file AbstractTimeDependence.h.
Referenced by AbstractTimeDependence::getName(), AbstractTimeDependence::getTimeDependence(), and AbstractTimeDependence::setTimeDependence().