SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
Events::ObserveAtExtremum< tmpl::list< ObservableTensorTags... >, tmpl::list< NonTensorComputeTags... >, ArraySectionIdTag > Class Template Reference

Classes

struct  SubfileName
 The name of the subfile inside the HDF5 file. More...
struct  TensorsToObserve
 The scalar to extremize, and other tensors to observe at extremum. More...

Public Types

using options = tmpl::list<SubfileName, TensorsToObserve>
using observed_reduction_data_tags
using compute_tags_for_observation_box
using return_tags = tmpl::list<>
using argument_tags = tmpl::list<::Tags::ObservationBox>
using observation_registration_tags = tmpl::list<::Tags::DataBox>
using is_ready_argument_tags = tmpl::list<>

Public Member Functions

 ObserveAtExtremum (CkMigrateMessage *msg)
 WRAPPED_PUPable_decl_template (ObserveAtExtremum)
 ObserveAtExtremum (std::string subfile_name, ObserveTensors observe_tensors)
template<typename ComputeTagsList, typename DataBoxType, typename Metavariables, size_t VolumeDim, typename ParallelComponent>
void operator() (const ObservationBox< ComputeTagsList, DataBoxType > &box, Parallel::GlobalCache< Metavariables > &cache, const ElementId< VolumeDim > &array_index, const ParallelComponent *const, const ObservationValue &observation_value) const
template<typename DbTagsList>
std::optional< std::pair< observers::TypeOfObservation, observers::ObservationKey > > get_observation_type_and_key_for_registration (const db::DataBox< DbTagsList > &box) 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.
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 Options::String help

Member Typedef Documentation

◆ compute_tags_for_observation_box

template<typename... ObservableTensorTags, typename... NonTensorComputeTags, typename ArraySectionIdTag>
using Events::ObserveAtExtremum< tmpl::list< ObservableTensorTags... >, tmpl::list< NonTensorComputeTags... >, ArraySectionIdTag >::compute_tags_for_observation_box
Initial value:
tmpl::list<ObservableTensorTags..., NonTensorComputeTags...>

◆ observed_reduction_data_tags

template<typename... ObservableTensorTags, typename... NonTensorComputeTags, typename ArraySectionIdTag>
using Events::ObserveAtExtremum< tmpl::list< ObservableTensorTags... >, tmpl::list< NonTensorComputeTags... >, ArraySectionIdTag >::observed_reduction_data_tags
Initial value:
observers::make_reduction_data_tags<
tmpl::list<ReductionData<funcl::Max<>>, ReductionData<funcl::Min<>>>>

Member Function Documentation

◆ needs_evolved_variables()

template<typename... ObservableTensorTags, typename... NonTensorComputeTags, typename ArraySectionIdTag>
bool Events::ObserveAtExtremum< tmpl::list< ObservableTensorTags... >, tmpl::list< NonTensorComputeTags... >, ArraySectionIdTag >::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

template<typename... ObservableTensorTags, typename... NonTensorComputeTags, typename ArraySectionIdTag>
Options::String Events::ObserveAtExtremum< tmpl::list< ObservableTensorTags... >, tmpl::list< NonTensorComputeTags... >, ArraySectionIdTag >::help
staticconstexpr
Initial value:
=
"Observe extremum of a scalar in the DataBox.\n"
"\n"
"Writes reduction quantities:\n"
" * Observation value (e.g. Time or IterationId)\n"
" * Extremum value of the desired scalar\n"
" * Additional data at extremum\n"

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