SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
dg::Events::ObserveTimeStepVolume< System > Class Template Reference

Observe the time step in the volume. More...

#include <ObserveTimeStepVolume.hpp>

Public Types

using compute_tags_for_observation_box = tmpl::list<>
using return_tags = tmpl::list<>
using argument_tags
Public Types inherited from dg::Events::ObserveConstantsPerElement< System::volume_dim >
using options
using observation_registration_tags
using is_ready_argument_tags

Public Member Functions

 ObserveTimeStepVolume (const std::string &subfile_name, ::FloatingPointType coordinates_floating_point_type, ::FloatingPointType floating_point_type)
template<typename Metavariables, typename ParallelComponent>
void operator() (const double time, const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time, const Domain< volume_dim > &domain, const TimeDelta &time_step, const double minimum_grid_spacing, const TimeSteppers::History< typename System::variables_tag::type > &history, Parallel::GlobalCache< Metavariables > &cache, const ElementId< volume_dim > &element_id, const ParallelComponent *const component, const Event::ObservationValue &observation_value) 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.
Public Member Functions inherited from dg::Events::ObserveConstantsPerElement< System::volume_dim >
std::optional< std::pair< observers::TypeOfObservation, observers::ObservationKey > > get_observation_type_and_key_for_registration () const
bool is_ready (const double time, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, const Component *const component) 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

Static Public Attributes

static constexpr size_t volume_dim = System::volume_dim
static constexpr Options::String help

Additional Inherited Members

Protected Member Functions inherited from dg::Events::ObserveConstantsPerElement< System::volume_dim >
std::vector< TensorComponentallocate_and_insert_coords (size_t number_of_constants, double time, const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time, const Domain< VolumeDim > &domain, const ElementId< VolumeDim > &element_id) const
 Creates the vector of tensor components that will be observed and starts to fill it with the inertial coordinates.
void add_constant (gsl::not_null< std::vector< TensorComponent > * > components, std::string name, double value) const
 Adds a TensorComponent to components with the given name and the given value.
void observe (std::vector< TensorComponent > components, Parallel::GlobalCache< Metavariables > &cache, const ElementId< VolumeDim > &element_id, const ParallelComponent *, const ObservationValue &observation_value) const
 Observes the components as volume data.

Detailed Description

template<typename System>
class dg::Events::ObserveTimeStepVolume< System >

Observe the time step in the volume.

Observe the time step size in each element. Each element is output as a single cell with two points per dimension and the observation constant on all those points.

Writes volume quantities:

  • InertialCoordinates (only element corners)
  • Time step
  • Slab fraction
  • Minimum grid spacing
  • Integration order

Member Typedef Documentation

◆ argument_tags

template<typename System>
using dg::Events::ObserveTimeStepVolume< System >::argument_tags
Initial value:
tmpl::list<
Tag for the TimeStepper history.
Definition HistoryEvolvedVariables.hpp:18
Tag for step size.
Definition TimeStep.hpp:13
Tag for the current time as a double.
Definition Time.hpp:19
The Domain.
Definition Domain.hpp:20
Tag to retrieve the FunctionsOfTime from the GlobalCache.
Definition Tags.hpp:20
The minimum coordinate distance between grid points.
Definition MinimumGridSpacing.hpp:36

Member Function Documentation

◆ needs_evolved_variables()

template<typename System>
bool dg::Events::ObserveTimeStepVolume< System >::needs_evolved_variables ( ) const
overridevirtual

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

template<typename System>
Options::String dg::Events::ObserveTimeStepVolume< System >::help
staticconstexpr
Initial value:
=
"Observe the time step and integration order in the volume."

The documentation for this class was generated from the following file:
  • src/ParallelAlgorithms/Events/ObserveTimeStepVolume.hpp