SpECTRE  2021.08.02
Time

Code related to the representation of time during simulations. More...

Namespaces

namespace  SelfStart
 Definition of the integrator self-starting procedure.
 
namespace  StepChoosers
 Holds all the StepChoosers.
 
namespace  TimeSequences
 Holds all the TimeSequences.
 

Classes

class  DenseTriggers::Times
 Trigger at specified times. More...
 
struct  Actions::AdvanceTime
 Advance time one substep. More...
 
struct  Actions::ChangeSlabSize
 Adjust the slab size based on previous executions of Events::ChangeSlabSize. More...
 
class  Events::ChangeSlabSize
 Trigger a slab size change. More...
 
struct  Actions::ChangeStepSize
 Adjust the step size for local time stepping. More...
 
struct  Actions::RecordTimeStepperData< VariablesTag >
 Records the variables and their time derivatives in the time stepper history. More...
 
struct  SelfStart::Tags::InitialValue< Tag >
 The initial value of a quantity. The contents are stored in a tuple to avoid putting duplicate tensors into the DataBox. More...
 
struct  SelfStart::Actions::Initialize< System >
 Prepares the evolution for time-stepper self-starting. More...
 
struct  SelfStart::Actions::CheckForCompletion< ExitTag, System >
 Resets the state for the next iteration if the current order is complete, and exits the self-start loop if the required order has been reached. More...
 
struct  SelfStart::Actions::CheckForOrderIncrease
 If we have taken enough steps for this order, set the next time to the start time and increment the slab number. More...
 
struct  SelfStart::Actions::Cleanup
 Cleans up after the self-start procedure. More...
 
struct  Actions::UpdateU< VariablesTag >
 Perform variable updates for one substep. More...
 
struct  evolution_comparator< T, Comparator >
 Implementation of evolution_less, evolution_greater, evolution_less_equal, and evolution_greater_equal. More...
 
class  Slab
 A chunk of time. Every element must reach slab boundaries exactly, no matter how it actually takes time steps to get there. The simulation can only be assumed to have global data available at slab boundaries. More...
 
struct  Tags::IsUsingTimeSteppingErrorControlBase
 Base tag for reporting whether the ErrorControl step chooser is in use. More...
 
struct  Tags::IsUsingTimeSteppingErrorControl< Prefix >
 A tag that is true if the ErrorControl step chooser is one of the option-created Events. More...
 
struct  Tags::NeverUsingTimeSteppingErrorControl
 Tag indicating that the ErrorControl step chooser will not be used. More...
 
class  StepChooser< StepChooserUse >
 StepChoosers suggest upper bounds on step sizes. More...
 
struct  Tags::TimeStepId
 Tag for TimeStepId for the algorithm state. More...
 
struct  Tags::TimeStep
 Tag for step size. More...
 
struct  Tags::SubstepTime
 Tag for Time of the current substep. More...
 
struct  Tags::SubstepTimeCompute
 Tag for computing the substep time from (from Tags::TimeStepId) More...
 
struct  Tags::Time
 Tag for the current time as a double. More...
 
struct  Tags::HistoryEvolvedVariables< Tag >
 Tag for the TimeStepper history. More...
 
struct  Tags::StepperError< Tag >
 Tag for the stepper error measure. More...
 
struct  Tags::StepperErrorUpdated
 Tag indicating whether the stepper error has been updated on the current step. More...
 
struct  Tags::BoundaryHistory< LocalVars, RemoteVars, CouplingResult >
 Tag for TimeStepper boundary history. More...
 
struct  OptionTags::TimeStepper< StepperType >
 
struct  OptionTags::StepChoosers
 
struct  OptionTags::StepController
 
struct  OptionTags::InitialTime
 The time at which to start the simulation. More...
 
struct  OptionTags::InitialTimeStep
 The initial time step taken by the time stepper. This may be overridden by an adaptive stepper. More...
 
struct  OptionTags::InitialSlabSize
 The initial slab size. More...
 
struct  Tags::TimeStepper< StepperType >
 Tag for a TimeStepper of type StepperType. More...
 
struct  Tags::StepChoosers
 Tag for a vector of StepChoosers. More...
 
struct  Tags::StepController
 Tag for a StepController. More...
 
class  Time
 The time in a simulation. Times can be safely compared for exact equality as long as they do not belong to overlapping unequal slabs. More...
 
class  TimeDelta
 Represents an interval of time within a single slab. More...
 
class  TimeStepId
 A unique identifier for the temporal state of an integrated system. More...
 
class  Triggers::NearTimes
 Trigger in intervals surrounding particular times. More...
 
class  Triggers::SlabCompares
 Trigger based on a comparison with the slab number. More...
 
class  Triggers::Slabs
 Trigger at specified numbers of slabs after the simulation start. More...
 
class  Triggers::TimeCompares
 Trigger based on a comparison with the time. More...
 
class  Triggers::Times
 Trigger at particular times. More...
 

Typedefs

template<typename StepActions , typename System >
using SelfStart::self_start_procedure = tmpl::flatten< tmpl::list< SelfStart::Actions::Initialize< System >, ::Actions::Label< detail::PhaseStart >, SelfStart::Actions::CheckForCompletion< detail::PhaseEnd, System >, ::Actions::AdvanceTime, SelfStart::Actions::CheckForOrderIncrease, StepActions, ::Actions::Goto< detail::PhaseStart >, ::Actions::Label< detail::PhaseEnd >, SelfStart::Actions::Cleanup, ::Actions::AdvanceTime, Parallel::Actions::TerminatePhase > >
 The list of actions required to self-start an integrator. More...
 
template<typename T = void>
using evolution_less = evolution_comparator< T, std::less >
 Ordering functors that reverse their order when time runs backwards. See evolution_comparator and evolution_comparator<void,Comparator> for the provided interface. More...
 
template<typename T = void>
using evolution_greater = evolution_comparator< T, std::greater >
 Ordering functors that reverse their order when time runs backwards. See evolution_comparator and evolution_comparator<void,Comparator> for the provided interface. More...
 
template<typename T = void>
using evolution_less_equal = evolution_comparator< T, std::less_equal >
 Ordering functors that reverse their order when time runs backwards. See evolution_comparator and evolution_comparator<void,Comparator> for the provided interface. More...
 
template<typename T = void>
using evolution_greater_equal = evolution_comparator< T, std::greater_equal >
 Ordering functors that reverse their order when time runs backwards. See evolution_comparator and evolution_comparator<void,Comparator> for the provided interface. More...
 
template<typename TagList >
using Tags::get_all_history_tags = tmpl::filter< TagList, tt::is_a_lambda<::Tags::HistoryEvolvedVariables, tmpl::_1 > >
 From a list of tags TagList, extract all tags that are template specializations of HistoryEvolvedVariables.
 

Functions

double slab_rounding_error (const Time &time) noexcept
 Scale of the roundoff error incurred from inexact slab operations near the given time.
 

Detailed Description

Code related to the representation of time during simulations.

The time covered by a simulation is divided up into a sequence of adjacent, non-overlapping (except at endpoints) intervals referred to as "slabs". The boundaries between slabs can be placed at arbitrary times. Slabs, as represented in the code as the Slab class, provide comparison operators comparing slabs agreeing with the definition as a sequence of intervals. Slabs that do not jointly belong to any such sequence should not be compared.

The specific time is represented by the Time class, which encodes the slab containing the time and the fraction of the slab that has elapsed as an exact rational. Times are comparable according to their natural time ordering, except for times belonging to incomparable slabs.

Differences in time within a slab are represented as exact fractions of that slab by the TimeDelta class. TimeDeltas are only meaningful within a single slab, with the exception that the ratio of objects with different slabs may be taken, resulting in an inexact floating-point result. Longer intervals of time are represented using floating-point values.

Typedef Documentation

◆ evolution_greater

template<typename T = void>
using evolution_greater = evolution_comparator<T, std::greater>

Ordering functors that reverse their order when time runs backwards. See evolution_comparator and evolution_comparator<void,Comparator> for the provided interface.

See also
std::less

◆ evolution_greater_equal

template<typename T = void>
using evolution_greater_equal = evolution_comparator<T, std::greater_equal>

Ordering functors that reverse their order when time runs backwards. See evolution_comparator and evolution_comparator<void,Comparator> for the provided interface.

See also
std::less

◆ evolution_less

template<typename T = void>
using evolution_less = evolution_comparator<T, std::less>

Ordering functors that reverse their order when time runs backwards. See evolution_comparator and evolution_comparator<void,Comparator> for the provided interface.

See also
std::less

◆ evolution_less_equal

template<typename T = void>
using evolution_less_equal = evolution_comparator<T, std::less_equal>

Ordering functors that reverse their order when time runs backwards. See evolution_comparator and evolution_comparator<void,Comparator> for the provided interface.

See also
std::less

◆ self_start_procedure

template<typename StepActions , typename System >
using SelfStart::self_start_procedure = typedef tmpl::flatten<tmpl::list< SelfStart::Actions::Initialize<System>, ::Actions::Label<detail::PhaseStart>, SelfStart::Actions::CheckForCompletion<detail::PhaseEnd, System>, ::Actions::AdvanceTime, SelfStart::Actions::CheckForOrderIncrease, StepActions, ::Actions::Goto<detail::PhaseStart>, ::Actions::Label<detail::PhaseEnd>, SelfStart::Actions::Cleanup, ::Actions::AdvanceTime, Parallel::Actions::TerminatePhase> >

The list of actions required to self-start an integrator.

Template Parameters
StepActionsList of actions computing and recording the system derivative and updating the evolved variables (but not the time).
See also
SelfStart