SpECTRE  2021.08.02
StepChooser< StepChooserUse::LtsStep > Class Reference

Public Member Functions

 WRAPPED_PUPable_abstract (StepChooser)
 
template<typename Metavariables , typename DbTags >
std::pair< double, bool > desired_step (const gsl::not_null< db::DataBox< DbTags > * > box, const double last_step_magnitude, const Parallel::GlobalCache< Metavariables > &cache) const noexcept
 The last_step_magnitude parameter describes the step size to be adjusted. It may be the step size or the slab size, or may be infinite if the appropriate size cannot be determined. More...
 

Member Function Documentation

◆ desired_step()

template<typename Metavariables , typename DbTags >
std::pair< double, bool > StepChooser< StepChooserUse::LtsStep >::desired_step ( const gsl::not_null< db::DataBox< DbTags > * >  box,
const double  last_step_magnitude,
const Parallel::GlobalCache< Metavariables > &  cache 
) const
inlinenoexcept

The last_step_magnitude parameter describes the step size to be adjusted. It may be the step size or the slab size, or may be infinite if the appropriate size cannot be determined.

The return value of this function contains the desired step size and a bool indicating whether the step should be accepted. If the bool is false, the current time step will be recomputed with a step size informed by the desired step value returned by this function. The implementations of the call operator in derived classes should always return a strictly smaller step than the last_step_magnitude when they return false for the second member of the pair (indicating step rejection).