SpECTRE  2021.08.02
Initialization::Actions::TimeAndTimeStep< Metavariables > Struct Template Reference

Initialize items related to time, such as the time step. More...

#include <Evolution.hpp>

Public Types

using initialization_tags = tmpl::flatten< tmpl::list< Tags::InitialTime, Tags::InitialTimeDelta, Tags::InitialSlabSize< Metavariables::local_time_stepping >, tmpl::conditional_t< Metavariables::local_time_stepping, tmpl::list<::Tags::IsUsingTimeSteppingErrorControl<>, ::Tags::TimeStepper< LtsTimeStepper >, ::Tags::StepChoosers, ::Tags::StepController >, tmpl::list<::Tags::NeverUsingTimeSteppingErrorControl, ::Tags::TimeStepper< TimeStepper > > > > >
 
using initialization_tags_to_keep = tmpl::flatten< tmpl::list< tmpl::conditional_t< Metavariables::local_time_stepping, tmpl::list<::Tags::IsUsingTimeSteppingErrorControl<>, ::Tags::TimeStepper< LtsTimeStepper >, ::Tags::StepChoosers, ::Tags::StepController >, tmpl::list<::Tags::NeverUsingTimeSteppingErrorControl, ::Tags::TimeStepper< TimeStepper > > > > >
 
using simple_tags = tmpl::push_back< StepChoosers::step_chooser_simple_tags< Metavariables >, ::Tags::TimeStepId, ::Tags::Next<::Tags::TimeStepId >, ::Tags::Time, ::Tags::TimeStep, ::Tags::Next<::Tags::TimeStep > >
 
using compute_tags = tmpl::list<::Tags::SubstepTimeCompute >
 

Static Public Member Functions

template<typename DbTagsList , typename... InboxTags, typename ArrayIndex , typename ActionList , typename ParallelComponent , Requires< tmpl::list_contains_v< typename db::DataBox< DbTagsList >::mutable_item_tags, Initialization::Tags::InitialTime > and tmpl::list_contains_v< typename db::DataBox< DbTagsList >::mutable_item_tags, Initialization::Tags::InitialTimeDelta > and tmpl::list_contains_v< typename db::DataBox< DbTagsList >::mutable_item_tags, Tags::InitialSlabSize< Metavariables::local_time_stepping > > > = nullptr>
static auto apply (db::DataBox< DbTagsList > &box, const tuples::TaggedTuple< InboxTags... > &, const Parallel::GlobalCache< Metavariables > &, const ArrayIndex &, ActionList, const ParallelComponent *const) noexcept
 
template<typename DbTagsList , typename... InboxTags, typename ArrayIndex , typename ActionList , typename ParallelComponent , Requires< not(tmpl::list_contains_v< typename db::DataBox< DbTagsList >::mutable_item_tags, Initialization::Tags::InitialTime > and tmpl::list_contains_v< typename db::DataBox< DbTagsList >::mutable_item_tags, Initialization::Tags::InitialTimeDelta > and tmpl::list_contains_v< typename db::DataBox< DbTagsList >::mutable_item_tags, Tags::InitialSlabSize< Metavariables::local_time_stepping > >)> = nullptr>
static std::tuple< db::DataBox< DbTagsList > && > apply (db::DataBox< DbTagsList > &, const tuples::TaggedTuple< InboxTags... > &, const Parallel::GlobalCache< Metavariables > &, const ArrayIndex &, ActionList, const ParallelComponent *const) noexcept
 

Detailed Description

template<typename Metavariables>
struct Initialization::Actions::TimeAndTimeStep< Metavariables >

Initialize items related to time, such as the time step.

Since we have not started the evolution yet, we initialize the state before the initial time. So Tags::TimeStepId is undefined at this point, and Tags::Next<Tags::TimeStepId> is the initial time.

DataBox changes:

Note
HistoryEvolvedVariables is allocated, but needs to be initialized
This action relies on the SetupDataBox aggregated initialization mechanism, so Actions::SetupDataBox must be present in the Initialization phase action list prior to this action.