SpECTRE
v2023.05.16
|
A function that has a piecewise-constant MaxDeriv
th derivative.
More...
#include <PiecewisePolynomial.hpp>
Public Member Functions | |
PiecewisePolynomial (double t, std::array< DataVector, MaxDeriv+1 > initial_func_and_derivs, double expiration_time) | |
PiecewisePolynomial (PiecewisePolynomial &&)=default | |
PiecewisePolynomial & | operator= (PiecewisePolynomial &&)=default |
PiecewisePolynomial (const PiecewisePolynomial &)=default | |
PiecewisePolynomial & | operator= (const PiecewisePolynomial &)=default |
PiecewisePolynomial (CkMigrateMessage *) | |
auto | get_clone () const -> std::unique_ptr< FunctionOfTime > override |
WRAPPED_PUPable_decl_template (PiecewisePolynomial< MaxDeriv >) | |
std::array< DataVector, 1 > | func (double t) const override |
Returns the function at an arbitrary time t . If MaxDeriv is 0 and update has been called for time t , the updated value is ignored. More... | |
std::array< DataVector, 2 > | func_and_deriv (double t) const override |
Returns the function and its first derivative at an arbitrary time t . If MaxDeriv is 1 and update has been called for time t , the updated value is ignored. More... | |
std::array< DataVector, 3 > | func_and_2_derivs (double t) const override |
Returns the function and the first two derivatives at an arbitrary time t . If MaxDeriv is 2 and update has been called for time t , the updated value is ignored. More... | |
void | update (double time_of_update, DataVector updated_max_deriv, double next_expiration_time) override |
Updates the MaxDeriv th derivative of the function at the given time. updated_max_deriv is a vector of the MaxDeriv ths for each component. next_expiration_time is the next expiration time. More... | |
void | reset_expiration_time (double next_expiration_time) override |
Resets the expiration time to a later time. More... | |
std::array< double, 2 > | time_bounds () const override |
Returns the domain of validity of the function, including the extrapolation region. More... | |
const std::vector< FunctionOfTimeHelpers::StoredInfo< MaxDeriv+1 > > & | get_deriv_info () const |
Return a const reference to the stored deriv info so external classes can read the stored times and derivatives (mostly for QuaternionFunctionOfTime). | |
void | pup (PUP::er &p) override |
![]() | |
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 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) | |
Friends | |
template<size_t LocalMaxDeriv> | |
bool | operator== (const PiecewisePolynomial< LocalMaxDeriv > &lhs, const PiecewisePolynomial< LocalMaxDeriv > &rhs) |
template<size_t LocalMaxDeriv> | |
std::ostream & | operator<< (std::ostream &os, const PiecewisePolynomial< LocalMaxDeriv > &piecewise_polynomial) |
A function that has a piecewise-constant MaxDeriv
th derivative.
|
inlineoverridevirtual |
Returns the function at an arbitrary time t
. If MaxDeriv
is 0 and update
has been called for time t
, the updated value is ignored.
Implements domain::FunctionsOfTime::FunctionOfTime.
|
inlineoverridevirtual |
Returns the function and the first two derivatives at an arbitrary time t
. If MaxDeriv
is 2 and update
has been called for time t
, the updated value is ignored.
Implements domain::FunctionsOfTime::FunctionOfTime.
|
inlineoverridevirtual |
Returns the function and its first derivative at an arbitrary time t
. If MaxDeriv
is 1 and update
has been called for time t
, the updated value is ignored.
Implements domain::FunctionsOfTime::FunctionOfTime.
|
overridevirtual |
Implements domain::FunctionsOfTime::FunctionOfTime.
|
overridevirtual |
Resets the expiration time to a later time.
Reimplemented from domain::FunctionsOfTime::FunctionOfTime.
|
inlineoverridevirtual |
Returns the domain of validity of the function, including the extrapolation region.
Implements domain::FunctionsOfTime::FunctionOfTime.
|
overridevirtual |
Updates the MaxDeriv
th derivative of the function at the given time. updated_max_deriv
is a vector of the MaxDeriv
ths for each component. next_expiration_time
is the next expiration time.
Reimplemented from domain::FunctionsOfTime::FunctionOfTime.