SpECTRE  v2021.12.06
dg::Events::ObserveErrorNorms< ObservationValueTag, tmpl::list< Tensors... >, ArraySectionIdTag > Class Template Reference

Observe the RMS errors in the tensors compared to their analytic solution. More...

#include <ObserveErrorNorms.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<>
 
using argument_tags = tmpl::list<::Tags::ObservationBox, ObservationValueTag, Tensors..., ::Tags::AnalyticSolutionsBase >
 
using observation_registration_tags = tmpl::list<::Tags::DataBox >
 
using is_ready_argument_tags = tmpl::list<>
 

Public Member Functions

 ObserveErrorNorms (const std::string &subfile_name)
 
template<typename DataBoxType , typename ComputeTagsList , typename OptionalAnalyticSolutions , typename Metavariables , typename ArrayIndex , typename ParallelComponent >
void operator() (const ObservationBox< DataBoxType, ComputeTagsList > &box, const typename ObservationValueTag::type &observation_value, const typename Tensors::type &... tensors, const OptionalAnalyticSolutions &optional_analytic_solutions, 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<typename ObservationValueTag, typename... Tensors, typename ArraySectionIdTag>
class dg::Events::ObserveErrorNorms< ObservationValueTag, tmpl::list< Tensors... >, ArraySectionIdTag >

Observe the RMS errors in the tensors compared to their analytic solution.

Writes reduction quantities:

  • ObservationValueTag
  • NumberOfPoints = total number of points in the domain
  • Error(*) = RMS errors in Tensors = \(\operatorname{RMS}\left(\sqrt{\sum_{\text{independent components}}\left[ \text{value} - \text{analytic solution}\right]^2}\right)\) over all points
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<typename ObservationValueTag , typename... Tensors, typename ArraySectionIdTag >
bool dg::Events::ObserveErrorNorms< ObservationValueTag, tmpl::list< Tensors... >, 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 ObservationValueTag , typename... Tensors, typename ArraySectionIdTag >
constexpr Options::String dg::Events::ObserveErrorNorms< ObservationValueTag, tmpl::list< Tensors... >, ArraySectionIdTag >::help
staticconstexpr
Initial value:
=
"Observe the RMS errors in the tensors compared to their analytic\n"
"solution (if one is available).\n"
"\n"
"Writes reduction quantities:\n"
" * ObservationValueTag\n"
" * NumberOfPoints = total number of points in the domain\n"
" * Error(*) = RMS errors in Tensors (see online help details)\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: