SpECTRE  v2024.03.19
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 double expiration_after (double time) const =0
 The first expiration time after time. 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 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

◆ expiration_after()

virtual double domain::FunctionsOfTime::FunctionOfTime::expiration_after ( double  time) const
pure virtual

The first expiration time after time.

Details

For non-updatable functions, this returns infinity. For updatable functions, the first expiration time after time is found by determining the update immediately before time. The expiration time of this update is what is returned. If time happens to be an update itself, then the expiration of that update is returned.

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

◆ func()

◆ func_and_2_derivs()

◆ func_and_deriv()

◆ 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 >, domain::FunctionsOfTime::SettleToConstant, and domain::FunctionsOfTime::SettleToConstantQuaternion.

◆ 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: