|
OPALX (Object Oriented Parallel Accelerator Library for Exascale) MINIorX
OPALX
|
Time dependence that follows a polynomial, like p_0 + p_1*t + p_2*t^2 + ... + p_i*t^i + ... More...
#include <PolynomialTimeDependence.h>


Public Member Functions | |
| PolynomialTimeDependence (std::vector< double > ptd) | |
| Constructor. More... | |
| PolynomialTimeDependence () | |
| Default Constructor makes a 0 length polynomial. More... | |
| ~PolynomialTimeDependence () | |
| Destructor does nothing. More... | |
| double | getValue (double time) |
| Return the polynomial Sum_i p_i t^i; returns 0 if p is of 0 length. More... | |
| PolynomialTimeDependence * | clone () |
| Inheritable copy constructor. More... | |
| Inform & | print (Inform &os) |
| Print the polynomials. More... | |
Static Public Member Functions | |
| static std::shared_ptr< AbstractTimeDependence > | getTimeDependence (std::string name) |
| Look up the time dependence that has a given name. More... | |
| static void | setTimeDependence (std::string name, std::shared_ptr< AbstractTimeDependence > time_dep) |
| Add a value to the lookup table. More... | |
| static std::string | getName (std::shared_ptr< AbstractTimeDependence > time_dep) |
| Get the name corresponding to a given time_dep. More... | |
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 42 of file PolynomialTimeDependence.h.
|
inline |
Constructor.
| ptd | the polynomial coefficients p_i; can be of arbitrary length (user is responsible for issues like floating point precision). |
Definition at line 49 of file PolynomialTimeDependence.h.
|
inline |
Default Constructor makes a 0 length polynomial.
Definition at line 52 of file PolynomialTimeDependence.h.
Referenced by clone().
|
inline |
Destructor does nothing.
Definition at line 54 of file PolynomialTimeDependence.h.
|
inlinevirtual |
Inheritable copy constructor.
Implements AbstractTimeDependence.
Definition at line 62 of file PolynomialTimeDependence.h.
References coeffs, and PolynomialTimeDependence().

|
staticinherited |
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 AbstractTimeDependence::td_map.
|
staticinherited |
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.
References AbstractTimeDependence::td_map.
|
inlinevirtual |
Return the polynomial Sum_i p_i t^i; returns 0 if p is of 0 length.
Implements AbstractTimeDependence.
Definition at line 78 of file PolynomialTimeDependence.h.
References coeffs.
Print the polynomials.
| os | "Inform" stream to which the polynomials are printed. |
Definition at line 32 of file PolynomialTimeDependence.cpp.
References coeffs, endl(), and Inform::flags().
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 45 of file AbstractTimeDependence.cpp.
References AbstractTimeDependence::td_map.
|
private |
Definition at line 75 of file PolynomialTimeDependence.h.
Referenced by clone(), getValue(), and print().
|
staticprivateinherited |
Definition at line 95 of file AbstractTimeDependence.h.
Referenced by AbstractTimeDependence::getName(), AbstractTimeDependence::getTimeDependence(), and AbstractTimeDependence::setTimeDependence().