|
SpECTRE
v2025.08.19
|
Sets \(f(t)\) and derivatives using cubic rational functions, such that the first derivative approaches a constant and the second derivative approaches zero. More...
#include <FixedSpeedCubic.hpp>
Public Member Functions | |
| FixedSpeedCubic (double initial_function_value, double initial_time, double velocity, double decay_timescale) | |
| FixedSpeedCubic (FixedSpeedCubic &&)=default | |
| FixedSpeedCubic & | operator= (FixedSpeedCubic &&)=default |
| FixedSpeedCubic (const FixedSpeedCubic &)=default | |
| FixedSpeedCubic & | operator= (const FixedSpeedCubic &)=default |
| WRAPPED_PUPable_decl_template (FixedSpeedCubic) | |
| FixedSpeedCubic (CkMigrateMessage *) | |
| auto | get_clone () const -> std::unique_ptr< FunctionOfTime > override |
| std::array< DataVector, 1 > | func (const double t) const override |
Returns the function at an arbitrary time t. More... | |
| std::array< DataVector, 2 > | func_and_deriv (const double t) const override |
Returns the function and its first derivative at an arbitrary time t. More... | |
| std::array< DataVector, 3 > | func_and_2_derivs (const double t) const override |
Returns the function and the first two derivatives at an arbitrary time t. More... | |
| std::array< double, 2 > | time_bounds () const override |
| Returns the domain of validity of the function. More... | |
| double | expiration_after (const double) const override |
The first expiration time after time. More... | |
| double | velocity () const |
| Returns the velocity that the function approaches. | |
| double | decay_timescale () const |
| Returns the timescale at which the function approaches a constant velocity. | |
| void | pup (PUP::er &p) override |
Public Member Functions inherited from domain::FunctionsOfTime::FunctionOfTime | |
| 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::unique_ptr< FunctionOfTime > | create_at_time (const double, const double) const |
Create a FunctionOfTime at time t as if one had created a new FunctionOfTime with t as its initial time, except the initial values of new FunctionOfTime are the exact values of the old FunctionOfTime at time t, and the new expriation is expiration_time. More... | |
| 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) | |
Friends | |
| bool | operator== (const FixedSpeedCubic &lhs, const FixedSpeedCubic &rhs) |
| std::ostream & | operator<< (std::ostream &os, const FixedSpeedCubic &fixed_speed_cubic) |
Sets \(f(t)\) and derivatives using cubic rational functions, such that the first derivative approaches a constant and the second derivative approaches zero.
The resultant function of time is
\begin{align*} f(t) &= f_0 + \frac{v(t-t_0)^3}{\tau^2+(t-t_0)^2}, \end{align*}
where \(f_0\) is the value of the function \(f\) at the initial time \(t_0\), and \(v\) is the velocity that \(f^\prime(t)\) approaches on a timescale of \(\tau\).
|
inlineoverridevirtual |
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.
Implements domain::FunctionsOfTime::FunctionOfTime.
|
inlineoverridevirtual |
Returns the function at an arbitrary time t.
Implements domain::FunctionsOfTime::FunctionOfTime.
|
inlineoverridevirtual |
Returns the function and the first two derivatives at an arbitrary time t.
Implements domain::FunctionsOfTime::FunctionOfTime.
|
inlineoverridevirtual |
Returns the function and its first derivative at an arbitrary time t.
Implements domain::FunctionsOfTime::FunctionOfTime.
|
overridevirtual |
Implements domain::FunctionsOfTime::FunctionOfTime.
|
inlineoverridevirtual |
Returns the domain of validity of the function.
Implements domain::FunctionsOfTime::FunctionOfTime.