SpECTRE
v2024.09.29
|
Base class for FunctionsOfTime. More...
#include <FunctionOfTime.hpp>
Public Member Functions | |
FunctionOfTime (FunctionOfTime &&)=default | |
FunctionOfTime & | operator= (FunctionOfTime &&)=default |
FunctionOfTime (const FunctionOfTime &)=default | |
FunctionOfTime & | operator= (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... | |
virtual std::vector< DataVector > | func_and_all_derivs (double t) const |
All derivatives a function of time has to offer (because it can be more than 2) More... | |
WRAPPED_PUPable_abstract (FunctionOfTime) | |
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
func
, that returns a std::array<DataVector, 1>
func_and_deriv
, that returns a std::array<DataVector, 2>
func_and_2_derivs
, that returns a std::array<DataVector, 3>
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.
|
pure virtual |
The first expiration time after time
.
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::IntegratedFunctionOfTime, domain::FunctionsOfTime::PiecewisePolynomial< MaxDeriv >, and domain::FunctionsOfTime::QuaternionFunctionOfTime< MaxDeriv >.
|
pure virtual |
The DataVector can be of any size.
Implemented in domain::FunctionsOfTime::FixedSpeedCubic, domain::FunctionsOfTime::QuaternionFunctionOfTime< MaxDeriv >, domain::FunctionsOfTime::SettleToConstant, domain::FunctionsOfTime::SettleToConstantQuaternion, domain::FunctionsOfTime::IntegratedFunctionOfTime, and domain::FunctionsOfTime::PiecewisePolynomial< MaxDeriv >.
|
pure virtual |
The DataVector can be of any size.
Implemented in domain::FunctionsOfTime::FixedSpeedCubic, domain::FunctionsOfTime::QuaternionFunctionOfTime< MaxDeriv >, domain::FunctionsOfTime::SettleToConstant, domain::FunctionsOfTime::SettleToConstantQuaternion, domain::FunctionsOfTime::PiecewisePolynomial< MaxDeriv >, and domain::FunctionsOfTime::IntegratedFunctionOfTime.
|
inlinevirtual |
All derivatives a function of time has to offer (because it can be more than 2)
Defaults to the return values from func_and_2_derivs
since some functions of time only go up to 2 derivatives by design
Reimplemented in domain::FunctionsOfTime::PiecewisePolynomial< MaxDeriv >.
|
pure virtual |
The DataVector can be of any size.
Implemented in domain::FunctionsOfTime::FixedSpeedCubic, domain::FunctionsOfTime::QuaternionFunctionOfTime< MaxDeriv >, domain::FunctionsOfTime::SettleToConstant, domain::FunctionsOfTime::SettleToConstantQuaternion, domain::FunctionsOfTime::IntegratedFunctionOfTime, and domain::FunctionsOfTime::PiecewisePolynomial< MaxDeriv >.
|
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::IntegratedFunctionOfTime, domain::FunctionsOfTime::PiecewisePolynomial< MaxDeriv >, domain::FunctionsOfTime::QuaternionFunctionOfTime< MaxDeriv >, domain::FunctionsOfTime::SettleToConstant, and domain::FunctionsOfTime::SettleToConstantQuaternion.
|
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 >, domain::FunctionsOfTime::QuaternionFunctionOfTime< MaxDeriv >, and domain::FunctionsOfTime::IntegratedFunctionOfTime.