SpECTRE  2021.08.02
FunctionOfTimeUpdater< DerivOrder > Class Template Reference

Responsible for updating the FunctionOfTime map parameters. modify: updates the FunctionOfTime map parameters, changing the maps. measure: provides updated information to the ControlSystem, without modifying the maps. More...

#include <FunctionOfTimeUpdater.hpp>

Public Member Functions

 FunctionOfTimeUpdater (Averager< DerivOrder > &&averager, Controller< DerivOrder > &&controller, TimescaleTuner &&timescale_tuner) noexcept
 
 FunctionOfTimeUpdater (FunctionOfTimeUpdater &&) noexcept=default
 
FunctionOfTimeUpdateroperator= (FunctionOfTimeUpdater &&) noexcept=default
 
 FunctionOfTimeUpdater (const FunctionOfTimeUpdater &)=delete
 
FunctionOfTimeUpdateroperator= (const FunctionOfTimeUpdater &)=delete
 
void measure (double time, const DataVector &raw_q) noexcept
 Provides \(Q(t)\) to the averager, which internally updates the averaged values of \(Q\) and derivatives stored by the averager.
 
void modify (gsl::not_null< domain::FunctionsOfTime::PiecewisePolynomial< DerivOrder > * > f_of_t, double time, double expiration_time) noexcept
 Computes the control signal, updates the FunctionOfTime and updates the TimescaleTuner expiration_time is the time at which the FunctionOfTime is supposed to expire, i.e. the time by which we demand that modify is called again.
 

Detailed Description

template<size_t DerivOrder>
class FunctionOfTimeUpdater< DerivOrder >

Responsible for updating the FunctionOfTime map parameters. modify: updates the FunctionOfTime map parameters, changing the maps. measure: provides updated information to the ControlSystem, without modifying the maps.

modify computes the control signal, which relies on \(Q\) and its derivatives. The Averager is responsible for numerically computing the derivatives, and as such, requires sufficient data (the number of points being dependent on the DerivOrder). This data is provided to the Averager through measure. We do not modify at every measure (even once the Averager has sufficient data to compute derivatives) since modify requires updating the maps, which could potentially hold up other processes that rely on these maps.