SpECTRE  v2026.06.09.01
Loading...
Searching...
No Matches
TimeSteppers::LtsError Class Reference

#include <LtsError.hpp>

Public Member Functions

 LtsError (const LtsError &)=default
LtsError & operator= (const LtsError &)=default
 LtsError (LtsError &&)=default
LtsError & operator= (LtsError &&)=default
variants::TaggedVariant< Tags::FixedOrder, Tags::VariableOrderorder () const override
 The convergence order of the stepper.
uint64_t number_of_substeps () const override
 Number of substeps in this TimeStepper.
uint64_t number_of_substeps_for_error () const override
 Number of substeps in this TimeStepper when providing an error measure for adaptive time-stepping.
size_t number_of_past_steps () const override
 Number of past time steps needed for multi-step method.
double stable_step () const override
 Rough estimate of the maximum step size this method can take stably as a multiple of the step for Euler's method.
bool monotonic () const override
 Whether computational and temporal orderings of operations match.
TimeStepId next_time_id (const TimeStepId &current_id, const TimeDelta &time_step) const override
 The TimeStepId after the current substep.
TimeStepId next_time_id_for_error (const TimeStepId &current_id, const TimeDelta &time_step) const override
 The TimeStepId after the current substep when providing an error measure for adaptive time-stepping.
bool neighbor_data_required (const TimeStepId &next_substep_id, const TimeStepId &neighbor_data_id) const override
 Check whether a neighbor record is needed for boundary output.
bool neighbor_data_required (double dense_output_time, const TimeStepId &neighbor_data_id) const override
 Check whether a neighbor record is needed for boundary output.
 WRAPPED_PUPable_decl_template (LtsError)
 LtsError (CkMigrateMessage *)
void pup (PUP::er &p) override
Public Member Functions inherited from LtsTimeStepper
 WRAPPED_PUPable_abstract (LtsTimeStepper)
template<typename LocalVars, typename RemoteVars, typename Coupling>
void add_boundary_delta (const gsl::not_null< BoundaryReturn< LocalVars, RemoteVars, Coupling > * > result, const BoundaryHistoryType< LocalVars, RemoteVars, Coupling > &history, const TimeDelta &time_step, const Coupling &coupling) const
 Compute the change in a boundary quantity due to the coupling on the interface.
template<typename LocalVars, typename RemoteVars, typename CouplingResult>
void clean_boundary_history (const gsl::not_null< TimeSteppers::BoundaryHistory< LocalVars, RemoteVars, CouplingResult > * > history) const
 Remove old entries from the history.
template<typename LocalVars, typename RemoteVars, typename Coupling>
void boundary_dense_output (const gsl::not_null< BoundaryReturn< LocalVars, RemoteVars, Coupling > * > result, const BoundaryHistoryType< LocalVars, RemoteVars, Coupling > &history, const double time, const Coupling &coupling) const
 Derived classes must implement this as a function with signature.
Public Member Functions inherited from TimeStepper
 WRAPPED_PUPable_abstract (TimeStepper)
template<typename Vars>
void update_u (const gsl::not_null< Vars * > u, const TimeSteppers::History< Vars > &history, const TimeDelta &time_step) const
 Set u to the value at the end of the current substep.
template<typename Vars>
std::optional< StepperErrorEstimateupdate_u (const gsl::not_null< Vars * > u, const TimeSteppers::History< Vars > &history, const TimeDelta &time_step, const StepperErrorTolerances &tolerances) const
 Set u to the value at the end of the current substep; report the error measure when available.
template<typename Vars>
void clean_history (const gsl::not_null< TimeSteppers::History< Vars > * > history) const
 Remove old entries from the history.
template<typename Vars>
bool dense_update_u (const gsl::not_null< Vars * > u, const TimeSteppers::History< Vars > &history, const double time) const
 Compute the solution value at a time between steps. To evaluate at a time within a given step, call this method at the start of the step containing the time. The function returns true on success, otherwise the call should be retried after the next substep.
template<typename Vars>
bool can_change_step_size (const TimeStepId &time_id, const TimeSteppers::History< Vars > &history) const
 Whether a change in the step size is allowed before taking a step. Step sizes can never be changed on a substep.

Additional Inherited Members

Public Types inherited from LtsTimeStepper
using provided_time_stepper_interfaces
template<typename LocalVars, typename RemoteVars, typename Coupling>
using BoundaryHistoryType
template<typename LocalVars, typename RemoteVars, typename Coupling>
using BoundaryReturn
 Return type of boundary-related functions. The coupling returns the derivative of the variables, but this is multiplied by the time step so the return type should not have dt prefixes.
Public Types inherited from TimeStepper
using provided_time_stepper_interfaces = tmpl::list<TimeStepper>
Static Public Attributes inherited from LtsTimeStepper
static constexpr bool local_time_stepping = true
Static Public Attributes inherited from TimeStepper
static constexpr bool local_time_stepping = false
static constexpr bool imex = false

Detailed Description

Class used to allow compiling LTS code with GTS time steppers. All methods error at runtime.

Member Function Documentation

◆ monotonic()

bool TimeSteppers::LtsError::monotonic ( ) const
overridevirtual

Whether computational and temporal orderings of operations match.

If this method returns true, then, for two time-stepper operations occurring at different simulation times, the temporally earlier operation will be performed first. These operations include RHS evaluation, dense output, and neighbor communication. In particular, dense output never requires performing a RHS evaluation later than the output time, so control systems measurements cannot cause deadlocks.

Warning
This guarantee only holds if the time steps themselves are monotonic, which can be violated during initialization.

Implements TimeStepper.

◆ neighbor_data_required() [1/2]

bool TimeSteppers::LtsError::neighbor_data_required ( const TimeStepId & next_substep_id,
const TimeStepId & neighbor_data_id ) const
overridevirtual

Check whether a neighbor record is needed for boundary output.

In order to perform boundary output, all records from the neighbor with TimeStepIds for which this method returns true should have been added to the history. Versions are provided for a substep and for dense output.

Implements LtsTimeStepper.

◆ neighbor_data_required() [2/2]

bool TimeSteppers::LtsError::neighbor_data_required ( double dense_output_time,
const TimeStepId & neighbor_data_id ) const
overridevirtual

Check whether a neighbor record is needed for boundary output.

In order to perform boundary output, all records from the neighbor with TimeStepIds for which this method returns true should have been added to the history. Versions are provided for a substep and for dense output.

Implements LtsTimeStepper.

◆ next_time_id()

TimeStepId TimeSteppers::LtsError::next_time_id ( const TimeStepId & current_id,
const TimeDelta & time_step ) const
overridevirtual

The TimeStepId after the current substep.

Implements TimeStepper.

◆ next_time_id_for_error()

TimeStepId TimeSteppers::LtsError::next_time_id_for_error ( const TimeStepId & current_id,
const TimeDelta & time_step ) const
overridevirtual

The TimeStepId after the current substep when providing an error measure for adaptive time-stepping.

Certain substep methods (e.g. embedded RK4(3)) require additional steps when providing an error measure of the integration.

Implements TimeStepper.

◆ number_of_past_steps()

size_t TimeSteppers::LtsError::number_of_past_steps ( ) const
overridevirtual

Number of past time steps needed for multi-step method.

Implements TimeStepper.

◆ number_of_substeps()

uint64_t TimeSteppers::LtsError::number_of_substeps ( ) const
overridevirtual

Number of substeps in this TimeStepper.

Implements TimeStepper.

◆ number_of_substeps_for_error()

uint64_t TimeSteppers::LtsError::number_of_substeps_for_error ( ) const
overridevirtual

Number of substeps in this TimeStepper when providing an error measure for adaptive time-stepping.

Details

Certain substep methods (e.g. embedded RK4(3)) require additional steps when providing an error measure of the integration.

Implements TimeStepper.

◆ order()

variants::TaggedVariant< Tags::FixedOrder, Tags::VariableOrder > TimeSteppers::LtsError::order ( ) const
overridevirtual

The convergence order of the stepper.

Implements TimeStepper.

◆ stable_step()

double TimeSteppers::LtsError::stable_step ( ) const
overridevirtual

Rough estimate of the maximum step size this method can take stably as a multiple of the step for Euler's method.

Implements TimeStepper.


The documentation for this class was generated from the following file:
  • src/Time/TimeSteppers/LtsError.hpp