SpECTRE  v2023.05.16
dg::Events::ObserveVolumeIntegrals< VolumeDim, ObservationValueTag, tmpl::list< Tensors... >, tmpl::list< NonTensorComputeTags... >, ArraySectionIdTag > Class Template Reference

Observe the volume integrals of the tensors over the domain. More...

#include <ObserveVolumeIntegrals.hpp>

Classes

struct  SubfileName
 The name of the subfile inside the HDF5 file. More...
 

Public Types

using options = tmpl::list< SubfileName >
 
using observed_reduction_data_tags = observers::make_reduction_data_tags< tmpl::list< ReductionData > >
 
using compute_tags_for_observation_box = tmpl::list< Tensors..., NonTensorComputeTags... >
 
using argument_tags = tmpl::list<::Tags::ObservationBox, ObservationValueTag, ::Events::Tags::ObserverMesh< VolumeDim >, ::Events::Tags::ObserverDetInvJacobian< Frame::ElementLogical, Frame::Inertial >, Tensors... >
 
using observation_registration_tags = tmpl::list<::Tags::DataBox >
 
using is_ready_argument_tags = tmpl::list<>
 

Public Member Functions

 ObserveVolumeIntegrals (const std::string &subfile_name)
 
template<typename DataBoxType , typename ComputeTagsList , typename Metavariables , typename ArrayIndex , typename ParallelComponent >
void operator() (const ObservationBox< DataBoxType, ComputeTagsList > &box, const typename ObservationValueTag::type &observation_value, const Mesh< VolumeDim > &mesh, const Scalar< DataVector > &det_inv_jacobian, const typename Tensors::type &... tensors, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, const ParallelComponent *const) 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. 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 ObservationBox< ComputeTagsList, DataBoxType > &box, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, const ComponentPointer) 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

template<size_t VolumeDim, typename ObservationValueTag, typename... Tensors, typename... NonTensorComputeTags, typename ArraySectionIdTag>
class dg::Events::ObserveVolumeIntegrals< VolumeDim, ObservationValueTag, tmpl::list< Tensors... >, tmpl::list< NonTensorComputeTags... >, ArraySectionIdTag >

Observe the volume integrals of the tensors over the domain.

Writes reduction quantities:

  • ObservationValueTag
  • Volume = volume of the domain
  • VolumeIntegral(*) = volume integral of the tensor
Array sections
This event supports sections (see Parallel::Section). Set the ArraySectionIdTag template parameter to split up observations into subsets of elements. The observers::Tags::ObservationKey<ArraySectionIdTag> must be available in the DataBox. It identifies the section and is used as a suffix for the path in the output file.

Member Function Documentation

◆ needs_evolved_variables()

template<size_t VolumeDim, typename ObservationValueTag , typename... Tensors, typename... NonTensorComputeTags, typename ArraySectionIdTag >
bool dg::Events::ObserveVolumeIntegrals< VolumeDim, ObservationValueTag, tmpl::list< Tensors... >, 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<size_t VolumeDim, typename ObservationValueTag , typename... Tensors, typename... NonTensorComputeTags, typename ArraySectionIdTag >
constexpr Options::String dg::Events::ObserveVolumeIntegrals< VolumeDim, ObservationValueTag, tmpl::list< Tensors... >, tmpl::list< NonTensorComputeTags... >, ArraySectionIdTag >::help
staticconstexpr
Initial value:
=
"Observe the volume integrals of the tensors over the domain.\n"
"\n"
"Writes reduction quantities:\n"
" * ObservationValueTag\n"
" * Volume = volume of the domain\n"
" * VolumeIntegral(*) = volume integral of the tensor\n"
"\n"
"Warning: Currently, only one reduction observation event can be\n"
"triggered at a given observation value. Causing multiple events to\n"
"run at once will produce unpredictable results."

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