SpECTRE  v2025.08.19
amr::Events::ObserveAmrStats< Dim > Class Template Reference

Observes AMR statistics, such as number of elements and grid points. More...

#include <ObserveAmrStats.hpp>

Classes

struct  ObservePerCore
 
struct  PrintToTerminal
 

Public Types

using options = tmpl::list< PrintToTerminal, ObservePerCore >
 
using observed_reduction_data_tags = observers::make_reduction_data_tags< tmpl::list< detail::AmrStatsReductionData > >
 
using compute_tags_for_observation_box = tmpl::list<>
 
using argument_tags = tmpl::list< domain::Tags::Mesh< Dim > >
 
using return_tags = tmpl::list<>
 
using observation_registration_tags = tmpl::list<>
 
using is_ready_argument_tags = tmpl::list<>
 

Public Member Functions

 ObserveAmrStats (bool print_to_terminal, bool observe_per_core)
 
template<typename Metavariables , typename ParallelComponent >
void operator() (const Mesh< Dim > &mesh, Parallel::GlobalCache< Metavariables > &cache, const ElementId< Dim > &element_id, const ParallelComponent *const, const ObservationValue &observation_value) const
 
std::optional< std::pair< observers::TypeOfObservation, observers::ObservationKey > > get_observation_type_and_key_for_registration () 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...
 
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 = {"Observe AMR statistics"}
 

Detailed Description

template<size_t Dim>
class amr::Events::ObserveAmrStats< Dim >

Observes AMR statistics, such as number of elements and grid points.

Member Function Documentation

◆ needs_evolved_variables()

template<size_t Dim>
bool amr::Events::ObserveAmrStats< Dim >::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.


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