|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
|
#include <PolynomialTimeDependence.h>
Public Member Functions | |
| PolynomialTimeDependence (std::vector< double > ptd) | |
| PolynomialTimeDependence () | |
| ~PolynomialTimeDependence () | |
| double | getValue (double time) |
| PolynomialTimeDependence * | clone () |
| Inform & | print (Inform &os) |
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) |
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.
References coeffs.
Referenced by clone().
|
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, PolynomialTimeDependence(), 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 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 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.
| Inform & PolynomialTimeDependence::print | ( | Inform & | os | ) |
Print the polynomials
| os | "Inform" stream to which the polynomials are printed. |
Definition at line 32 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 45 of file AbstractTimeDependence.cpp.
References td_map.
|
private |
Definition at line 75 of file PolynomialTimeDependence.h.
Referenced by clone(), getValue(), PolynomialTimeDependence(), and print().
|
staticprivateinherited |
Definition at line 95 of file AbstractTimeDependence.h.
Referenced by getName(), getTimeDependence(), and setTimeDependence().