OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Private Attributes | List of all members
PolynomialTimeDependence Class Reference

#include <PolynomialTimeDependence.h>

Inheritance diagram for PolynomialTimeDependence:
Inheritance graph
[legend]
Collaboration diagram for PolynomialTimeDependence:
Collaboration graph
[legend]

Public Member Functions

 PolynomialTimeDependence (std::vector< double > ptd)
 
 PolynomialTimeDependence ()
 
 ~PolynomialTimeDependence ()
 
double getValue (double time)
 
PolynomialTimeDependenceclone ()
 
Informprint (Inform &os)
 
- Public Member Functions inherited from AbstractTimeDependence
virtual ~AbstractTimeDependence ()
 

Private Attributes

std::vector< double > coeffs
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractTimeDependence
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)
 

Detailed Description

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.

Constructor & Destructor Documentation

PolynomialTimeDependence::PolynomialTimeDependence ( std::vector< double >  ptd)
inline

Constructor

Parameters
ptdthe 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.

PolynomialTimeDependence::PolynomialTimeDependence ( )
inline

Default Constructor makes a 0 length polynomial

Definition at line 52 of file PolynomialTimeDependence.h.

Referenced by clone().

PolynomialTimeDependence::~PolynomialTimeDependence ( )
inline

Destructor does nothing

Definition at line 54 of file PolynomialTimeDependence.h.

Member Function Documentation

PolynomialTimeDependence* PolynomialTimeDependence::clone ( )
inlinevirtual

Inheritable copy constructor

Returns
new PolynomialTimeDependence that is a copy of this. User owns returned memory.

Implements AbstractTimeDependence.

Definition at line 62 of file PolynomialTimeDependence.h.

References coeffs, and PolynomialTimeDependence().

Here is the call graph for this function:

double PolynomialTimeDependence::getValue ( double  time)
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

Parameters
os"Inform" stream to which the polynomials are printed.

Definition at line 30 of file PolynomialTimeDependence.cpp.

References coeffs, endl(), and Inform::flags().

Referenced by operator<<().

Here is the call graph for this function:

Member Data Documentation

std::vector<double> PolynomialTimeDependence::coeffs
private

Definition at line 75 of file PolynomialTimeDependence.h.

Referenced by clone(), getValue(), and print().


The documentation for this class was generated from the following files: