SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
NewtonianEuler::Limiters::Weno< VolumeDim > Class Template Reference

A compact-stencil WENO limiter for the NewtonianEuler system. More...

#include <Weno.hpp>

Classes

struct  ApplyFlattener
struct  KxrcfConstant
struct  TvbConstant
struct  VariablesToLimit

Public Types

using ConservativeVarsWeno
using options
using PackagedData = typename ConservativeVarsWeno::PackagedData
using package_argument_tags
using limit_tags
using limit_argument_tags

Public Member Functions

 Weno (::Limiters::WenoType weno_type, NewtonianEuler::Limiters::VariablesToLimit vars_to_limit, double neighbor_linear_weight, std::optional< double > tvb_constant, std::optional< double > kxrcf_constant, bool apply_flattener, bool disable_for_debugging=false, const Options::Context &context={})
 Weno (const Weno &)=default
Wenooperator= (const Weno &)=default
 Weno (Weno &&)=default
Wenooperator= (Weno &&)=default
void pup (PUP::er &p)
void package_data (gsl::not_null< PackagedData * > packaged_data, const Scalar< DataVector > &mass_density_cons, const tnsr::I< DataVector, VolumeDim > &momentum_density, const Scalar< DataVector > &energy_density, const Mesh< VolumeDim > &mesh, const std::array< double, VolumeDim > &element_size, const OrientationMap< VolumeDim > &orientation_map) const
 Package data for sending to neighbor elements.
bool operator() (gsl::not_null< Scalar< DataVector > * > mass_density_cons, gsl::not_null< tnsr::I< DataVector, VolumeDim > * > momentum_density, gsl::not_null< Scalar< DataVector > * > energy_density, const Mesh< VolumeDim > &mesh, const Element< VolumeDim > &element, const std::array< double, VolumeDim > &element_size, const Scalar< DataVector > &det_inv_logical_to_inertial_jacobian, const typename evolution::dg::Tags::NormalCovectorAndMagnitude< VolumeDim >::type &normals_and_magnitudes, const EquationsOfState::EquationOfState< false, 2 > &equation_of_state, const std::unordered_map< DirectionalId< VolumeDim >, PackagedData, boost::hash< DirectionalId< VolumeDim > > > &neighbor_data) const
 Limit the solution on the element.

Static Public Member Functions

static std::string name ()

Static Public Attributes

static constexpr Options::String help

Friends

template<size_t LocalDim>
bool operator== (const Weno< LocalDim > &lhs, const Weno< LocalDim > &rhs)

Detailed Description

template<size_t VolumeDim>
class NewtonianEuler::Limiters::Weno< VolumeDim >

A compact-stencil WENO limiter for the NewtonianEuler system.

Implements the simple WENO limiter of [219] and the Hermite WENO (HWENO) limiter of [220]. See the documentation of the system-agnostic Limiters::Weno limiter for a general discussion of the algorithm and the various options that control the action of the limiter. This implemention is specialized to the NewtonianEuler evolution system. By specializing the limiter to the system, we can add a few features that improve its robustness:

  • the troubled-cell indicator (TCI) can be specialized to the features of the evolution system.
  • the limiter can be applied to the system's characteristic variables. This is the recommendation of the reference, because it reduces spurious oscillations in the post-limiter solution.
  • after limiting, the solution can be processed to remove any remaining unphysical values like negative densities and pressures. We do this by scaling the solution around its mean (a "flattener" or "bounds-preserving" filter). Note: the flattener is applied to all elements, including those where the limiter did not act to reduce the solution's slopes.

The matrix of TCI, variables to limit, post-processing, etc. choices can rapidly grow large. Here we reduce the possibilities by tying the TCI to the limiter in keeping with each limiter's main reference: HWENO uses the KXRCF TCI and simple WENO uses the TVB TCI. To fully explore the matrix of possibilities, the source code could be generalized — however, experience suggests it is unlikely that there exists one combination that will perform remarkably better than the others.

Member Typedef Documentation

◆ ConservativeVarsWeno

template<size_t VolumeDim>
using NewtonianEuler::Limiters::Weno< VolumeDim >::ConservativeVarsWeno
Initial value:
A compact-stencil WENO limiter for the NewtonianEuler system.
Definition Weno.hpp:89
The energy density of the fluid.
Definition Tags.hpp:46
The mass density of the fluid (as a conservative variable).
Definition Tags.hpp:34
The momentum density of the fluid.
Definition Tags.hpp:40

◆ limit_argument_tags

template<size_t VolumeDim>
using NewtonianEuler::Limiters::Weno< VolumeDim >::limit_argument_tags
Initial value:
tmpl::list<
The determinant of the inverse Jacobian from the source frame to the target frame.
Definition Tags.hpp:189
The Element associated with the DataBox.
Definition Tags.hpp:52
The computational grid of the Element in the DataBox.
Definition Tags.hpp:62
The inertial-coordinate size of an element along each of its logical directions.
Definition SizeOfElement.hpp:78
The normal covector and its magnitude for all internal faces of an element.
Definition NormalVectorTags.hpp:35
The equation of state retrieved from the analytic solution / data in the input file.
Definition Tags.hpp:112

◆ limit_tags

◆ options

template<size_t VolumeDim>
using NewtonianEuler::Limiters::Weno< VolumeDim >::options
Initial value:
tmpl::list<typename ConservativeVarsWeno::Type, VariablesToLimit,
typename ConservativeVarsWeno::NeighborWeight, TvbConstant,
typename ConservativeVarsWeno::DisableForDebugging>

◆ package_argument_tags

template<size_t VolumeDim>
using NewtonianEuler::Limiters::Weno< VolumeDim >::package_argument_tags
Initial value:
typename ConservativeVarsWeno::package_argument_tags

Member Data Documentation

◆ help

template<size_t VolumeDim>
Options::String NewtonianEuler::Limiters::Weno< VolumeDim >::help
staticconstexpr
Initial value:
= {
"A WENO limiter specialized to the NewtonianEuler system"}

The documentation for this class was generated from the following file:
  • src/Evolution/Systems/NewtonianEuler/Limiters/Weno.hpp