SpECTRE  v2024.04.12
Events::ChangeSlabSize Class Reference

Trigger a slab size change. More...

#include <Event.hpp>

Classes

struct  DelayChange
 
struct  StepChoosers
 

Public Types

using options = tmpl::list< StepChoosers, DelayChange >
 
using compute_tags_for_observation_box = tmpl::list<>
 
using return_tags = tmpl::list<::Tags::DataBox >
 
using argument_tags = tmpl::list<::Tags::TimeStepId >
 
using is_ready_argument_tags = tmpl::list<>
 

Public Member Functions

 ChangeSlabSize (std::vector< std::unique_ptr< StepChooser< StepChooserUse::Slab > > > step_choosers, const uint64_t delay_change)
 
template<typename DbTags , typename Metavariables , typename ArrayIndex , typename ParallelComponent >
void operator() (const gsl::not_null< db::DataBox< DbTags > * > box, const TimeStepId &time_step_id, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, const ParallelComponent *const, const ObservationValue &) const
 
template<typename Metavariables , typename ArrayIndex , typename Component >
bool is_ready (Parallel::GlobalCache< Metavariables > &, const ArrayIndex &, const Component *const) const
 
bool needs_evolved_variables () const override
 Whether the event uses anything depending on the evolved_variables. If this returns false, anything depending on the evolved variables may have an incorrect value when the event is run. More...
 
template<typename F >
void for_each_step_chooser (F &&f) const
 
void pup (PUP::er &p) override
 
- Public Member Functions inherited from Event
 Event (CkMigrateMessage *msg)
 
 WRAPPED_PUPable_abstract (Event)
 
template<typename ComputeTagsList , typename DataBoxType , typename Metavariables , typename ArrayIndex , typename ComponentPointer >
void run (const gsl::not_null< ObservationBox< ComputeTagsList, DataBoxType > * > box, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, const ComponentPointer, const ObservationValue &observation_value) const
 
template<typename DbTags , typename Metavariables , typename ArrayIndex , typename ComponentPointer >
bool is_ready (const db::DataBox< DbTags > &box, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, const ComponentPointer) const
 
virtual bool needs_evolved_variables () const =0
 Whether the event uses anything depending on the evolved_variables. If this returns false, anything depending on the evolved variables may have an incorrect value when the event is run. More...
 

Static Public Attributes

static constexpr Options::String help
 

Detailed Description

Trigger a slab size change.

The new size will be the minimum suggested by any of the provided step choosers on any element. This requires a global reduction, so it is possible to delay the change until a later slab to avoid a global synchronization. The actual change is carried out by Actions::ChangeSlabSize.

When running with global time-stepping, the slab size and step size are the same, so this adjusts the step size used by the time integration. With local time-stepping this controls the interval between times when the sequences of steps on all elements are forced to align.

Member Function Documentation

◆ needs_evolved_variables()

bool Events::ChangeSlabSize::needs_evolved_variables ( ) const
inlineoverridevirtual

Whether the event uses anything depending on the evolved_variables. If this returns false, anything depending on the evolved variables may have an incorrect value when the event is run.

Implements Event.

Member Data Documentation

◆ help

constexpr Options::String Events::ChangeSlabSize::help
staticconstexpr
Initial value:
=
"Trigger a slab size change chosen by the provided step choosers.\n"
"The actual changing of the slab size can be delayed until a later\n"
"slab to improve parallelization."

The documentation for this class was generated from the following file: