SpECTRE  v2021.11.01
domain::FunctionsOfTime::FunctionOfTime Class Referenceabstract

Base class for FunctionsOfTime. More...

#include <FunctionOfTime.hpp>

Public Member Functions

 FunctionOfTime (FunctionOfTime &&)=default
 
FunctionOfTimeoperator= (FunctionOfTime &&)=default
 
 FunctionOfTime (const FunctionOfTime &)=default
 
FunctionOfTimeoperator= (const FunctionOfTime &)=default
 
virtual auto get_clone () const -> std::unique_ptr< FunctionOfTime >=0
 
virtual std::array< double, 2 > time_bounds () const =0
 Returns the domain of validity of the function. For FunctionsOfTime that allow a small amount of time extrapolation, time_bounds tells you the bounds including the allowed extrapolation interval. More...
 
virtual void update (double, DataVector, double)
 Updates the maximum derivative of the FunctionOfTime at a given time while also resetting the expiration. By default, a FunctionOfTime cannot be updated. More...
 
virtual void reset_expiration_time (double)
 Resets the expiration time to a new value. By default, the expiration time of a FunctionOfTime cannot be reset. More...
 
virtual std::array< DataVector, 1 > func (double t) const =0
 The DataVector can be of any size. More...
 
virtual std::array< DataVector, 2 > func_and_deriv (double t) const =0
 The DataVector can be of any size. More...
 
virtual std::array< DataVector, 3 > func_and_2_derivs (double t) const =0
 The DataVector can be of any size. More...
 
 WRAPPED_PUPable_abstract (FunctionOfTime)
 

Detailed Description

Base class for FunctionsOfTime.

A FunctionOfTime is a function that will return the same value for a time t, regardless of when that function is called during a run (provided that the time t is in the domain of validity of the function). All FunctionsOfTime have members

The DataVectors that are returned can be of any size: e.g. a scalar FunctionOfTime will have DataVectors with one component and a 3-vector FunctionOfTime will have DataVectors with three components.

The domain of validity of the function is given by the time_bounds member function.

The function and all of its derivatives are left-continuous, that is, when evaluated at a time when the function was updated, they return the values just before the update, ignoring the updated value.

Member Function Documentation

◆ func()

◆ func_and_2_derivs()

virtual std::array< DataVector, 3 > domain::FunctionsOfTime::FunctionOfTime::func_and_2_derivs ( double  t) const
pure virtual

◆ func_and_deriv()

virtual std::array< DataVector, 2 > domain::FunctionsOfTime::FunctionOfTime::func_and_deriv ( double  t) const
pure virtual

◆ reset_expiration_time()

virtual void domain::FunctionsOfTime::FunctionOfTime::reset_expiration_time ( double  )
inlinevirtual

Resets the expiration time to a new value. By default, the expiration time of a FunctionOfTime cannot be reset.

Reimplemented in domain::FunctionsOfTime::QuaternionFunctionOfTime< MaxDeriv >, and domain::FunctionsOfTime::PiecewisePolynomial< MaxDeriv >.

◆ time_bounds()

virtual std::array< double, 2 > domain::FunctionsOfTime::FunctionOfTime::time_bounds ( ) const
pure virtual

Returns the domain of validity of the function. For FunctionsOfTime that allow a small amount of time extrapolation, time_bounds tells you the bounds including the allowed extrapolation interval.

Implemented in domain::FunctionsOfTime::FixedSpeedCubic, domain::FunctionsOfTime::PiecewisePolynomial< MaxDeriv >, domain::FunctionsOfTime::QuaternionFunctionOfTime< MaxDeriv >, and domain::FunctionsOfTime::SettleToConstant.

◆ update()

virtual void domain::FunctionsOfTime::FunctionOfTime::update ( double  ,
DataVector  ,
double   
)
inlinevirtual

Updates the maximum derivative of the FunctionOfTime at a given time while also resetting the expiration. By default, a FunctionOfTime cannot be updated.

Reimplemented in domain::FunctionsOfTime::PiecewisePolynomial< MaxDeriv >, and domain::FunctionsOfTime::QuaternionFunctionOfTime< MaxDeriv >.


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