SpECTRE  v2024.09.29
amr::Criteria::TruncationError< Dim, TensorTags > Class Template Reference

Refine the grid towards the target truncation error. More...

#include <TruncationError.hpp>

Classes

struct  AbsoluteTargetTruncationError
 
struct  RelativeTargetTruncationError
 
struct  VariablesToMonitor
 

Public Types

using options = tmpl::list< VariablesToMonitor, AbsoluteTargetTruncationError, RelativeTargetTruncationError >
 
using compute_tags_for_observation_box = tmpl::list<>
 
using argument_tags = tmpl::list<::Tags::DataBox >
 

Public Member Functions

 TruncationError (std::vector< std::string > vars_to_monitor, const std::optional< double > target_abs_truncation_error, const std::optional< double > target_rel_truncation_error, const Options::Context &context={})
 
template<typename DbTagsList , typename Metavariables >
std::array< Flag, Dim > operator() (const db::DataBox< DbTagsList > &box, Parallel::GlobalCache< Metavariables > &cache, const ElementId< Dim > &element_id) const
 
void pup (PUP::er &p) override
 
- Public Member Functions inherited from amr::Criterion
 Criterion (CkMigrateMessage *msg)
 
 WRAPPED_PUPable_abstract (Criterion)
 
template<typename ComputeTagsList , typename DataBoxType , typename Metavariables >
auto evaluate (const ObservationBox< ComputeTagsList, DataBoxType > &box, Parallel::GlobalCache< Metavariables > &cache, const ElementId< Metavariables::volume_dim > &element_id) const
 Evaluates the AMR criteria by selecting the appropriate derived class and forwarding its argument_tags from the ObservationBox (along with the GlobalCache and ArrayIndex) to the call operator of the derived class. More...
 

Static Public Attributes

static constexpr Options::String help
 

Detailed Description

template<size_t Dim, typename TensorTags>
class amr::Criteria::TruncationError< Dim, TensorTags >

Refine the grid towards the target truncation error.

  • If any tensor component has a truncation error above the target value, the element will be p-refined.
  • If all tensor components still satisfy the target even with one mode removed, the element will be p-coarsened.

For details on how the truncation error is computed see PowerMonitors::truncation_error.

Template Parameters
DimSpatial dimension of the grid
TensorTagsList of tags of the tensors to be monitored

Member Data Documentation

◆ help

template<size_t Dim, typename TensorTags >
constexpr Options::String amr::Criteria::TruncationError< Dim, TensorTags >::help
staticconstexpr
Initial value:
= {
"Refine the grid towards the target truncation error"}

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