SpECTRE  v2024.05.11
Tags::ErrorsCompute< tmpl::list< FieldTags... > > Struct Template Reference

Compute tag for computing the error from the Tags::Analytic of the FieldTags. More...

#include <Tags.hpp>

Public Types

using field_tags = tmpl::list< FieldTags... >
 
using base = Errors< tmpl::list< FieldTags... > >
 
using return_type = typename base::type
 
using argument_tags = tmpl::list< FieldTags..., ::Tags::Analytic< FieldTags >... >
 
- Public Types inherited from Tags::Errors< tmpl::list< FieldTags... > >
using field_tags = tmpl::list< FieldTags... >
 
using type = std::optional< ::Variables< db::wrap_tags_in< detail::ErrorImpl, tmpl::list< FieldTags... > > > >
 

Static Public Member Functions

static void function (const gsl::not_null< return_type * > errors, const typename FieldTags::type &... vars, const typename ::Tags::Analytic< FieldTags >::type &... analytic_vars)
 

Detailed Description

template<typename... FieldTags>
struct Tags::ErrorsCompute< tmpl::list< FieldTags... > >

Compute tag for computing the error from the Tags::Analytic of the FieldTags.

The error is defined as numerical - analytic.

We use individual Tensors rather than Variables of the FieldTags because not all FieldTags are always stored in the same Variables. For example, in the Generalized Harmonic-GRMHD combined system, the analytic variables for the GH system are part of the evolved_variables_tag while the GRMHD analytic variables are part of the primitive_variables_tag. A similar issue arises in some elliptic systems. The main drawback of having to use the tensor-by-tensor implementation instead of a Variables implementation is the added loop complexity. However, this is offset by the reduced code duplication and flexibility.


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