SpECTRE
v2024.05.11
|
An implementation of the Krivodonova limiter. More...
#include <Krivodonova.hpp>
Classes | |
struct | Alphas |
The \(\alpha_i\) values in the Krivodonova algorithm. More... | |
struct | DisableForDebugging |
Turn the limiter off. More... | |
struct | PackagedData |
Public Types | |
using | options = tmpl::list< Alphas, DisableForDebugging > |
using | package_argument_tags = tmpl::list< Tags..., domain::Tags::Mesh< VolumeDim > > |
using | limit_tags = tmpl::list< Tags... > |
using | limit_argument_tags = tmpl::list< domain::Tags::Element< VolumeDim >, domain::Tags::Mesh< VolumeDim > > |
Public Member Functions | |
Krivodonova (std::array< double, Spectral::maximum_number_of_points< Spectral::Basis::Legendre > > alphas, bool disable_for_debugging=false, const Options::Context &context={}) | |
Krivodonova (const Krivodonova &)=default | |
Krivodonova & | operator= (const Krivodonova &)=default |
Krivodonova (Krivodonova &&)=default | |
Krivodonova & | operator= (Krivodonova &&)=default |
void | pup (PUP::er &p) |
bool | operator== (const Krivodonova &rhs) const |
void | package_data (gsl::not_null< PackagedData * > packaged_data, const typename Tags::type &... tensors, const Mesh< VolumeDim > &mesh, const OrientationMap< VolumeDim > &orientation_map) const |
Package data for sending to neighbor elements. | |
bool | operator() (const gsl::not_null< std::add_pointer_t< typename Tags::type > >... tensors, const Element< VolumeDim > &element, const Mesh< VolumeDim > &mesh, const std::unordered_map< DirectionalId< VolumeDim >, PackagedData, boost::hash< DirectionalId< VolumeDim > > > &neighbor_data) const |
template<typename Tag > | |
char | limit_one_tensor (const gsl::not_null< Variables< tmpl::list<::Tags::Modal< Tags >... > > * > coeffs_self, const gsl::not_null< bool * > limited_any_component, const Mesh< 1 > &mesh, const std::unordered_map< DirectionalId< 1 >, PackagedData, boost::hash< DirectionalId< 1 > > > &neighbor_data) const |
template<typename Tag > | |
char | limit_one_tensor (const gsl::not_null< Variables< tmpl::list<::Tags::Modal< Tags >... > > * > coeffs_self, const gsl::not_null< bool * > limited_any_component, const Mesh< 2 > &mesh, const std::unordered_map< DirectionalId< 2 >, PackagedData, boost::hash< DirectionalId< 2 > > > &neighbor_data) const |
template<typename Tag > | |
char | limit_one_tensor (const gsl::not_null< Variables< tmpl::list<::Tags::Modal< Tags >... > > * > coeffs_self, const gsl::not_null< bool * > limited_any_component, const Mesh< 3 > &mesh, const std::unordered_map< DirectionalId< 3 >, PackagedData, boost::hash< DirectionalId< 3 > > > &neighbor_data) const |
template<typename Tag , size_t Dim> | |
char | fill_variables_tag_with_spectral_coeffs (const gsl::not_null< Variables< tmpl::list<::Tags::Modal< Tags >... > > * > modal_coeffs, const typename Tag::type &nodal_tensor, const Mesh< Dim > &mesh) const |
Static Public Attributes | |
static constexpr Options::String | help |
An implementation of the Krivodonova limiter.
The limiter is described in [113]. The Krivodonova limiter works by limiting the highest derivatives/modal coefficients using an aggressive minmod approach, decreasing in derivative/modal coefficient order until no more limiting is necessary. In 3d, the function being limited is expanded as:
\begin{align} u^{l,m,n}=\sum_{i,j,k=0,0,0}^{N_i,N_j,N_k}c^{l,m,n}_{i,j,k} P_{i}(\xi)P_{j}(\eta)P_{k}(\zeta) \end{align}
where \(\left\{\xi, \eta, \zeta\right\}\) are the logical coordinates, \(P_{i}\) are the Legendre polynomials, the superscript \(\{l,m,n\}\) represents the element indexed by \(l,m,n\), and \(N_i,N_j\) and \(N_k\) are the number of collocation points minus one in the \(\xi,\eta,\) and \(\zeta\) direction, respectively. The coefficients are limited according to:
\begin{align} \tilde{c}^{l,m,n}_{i,j,k}=\mathrm{minmod} &\left(c_{i,j,k}^{l,m,n}, \alpha_i\left(c^{l+1,m,n}_{i-1,j,k}-c^{l,m,n}_{i-1,j,k}\right), \alpha_i\left(c^{l,m,n}_{i-1,j,k}-c^{l-1,m,n}_{i-1,j,k}\right), \right.\notag \\ &\;\;\;\; \alpha_j\left(c^{l,m+1,n}_{i,j-1,k}-c^{l,m,n}_{i,j-1,k}\right), \alpha_j\left(c^{l,m,n}_{i,j-1,k}-c^{l,m-1,n}_{i,j-1,k}\right), \notag \\ &\;\;\;\;\left. \alpha_k\left(c^{l,m,n+1}_{i,j,k-1}-c^{l,m,n}_{i,j,k-1}\right), \alpha_k\left(c^{l,m,n}_{i,j,k-1}-c^{l,m,n-1}_{i,j,k-1}\right) \right), \label{eq:krivodonova 3d minmod} \end{align}
where \(\mathrm{minmod}\) is the minmod function defined as
\begin{align} \mathrm{minmod}(a,b,c,\ldots)= \left\{ \begin{array}{ll} \mathrm{sgn}(a)\min(\lvert a\rvert, \lvert b\rvert, \lvert c\rvert, \ldots) & \mathrm{if} \; \mathrm{sgn}(a)=\mathrm{sgn}(b)=\mathrm{sgn}(c)=\mathrm{sgn}(\ldots) \\ 0 & \mathrm{otherwise} \end{array}\right. \end{align}
Krivodonova [113] requires \(\alpha_i\) to be in the range
\begin{align*} \frac{1}{2(2i-1)}\le \alpha_i \le 1 \end{align*}
where the lower bound comes from finite differencing the coefficients between neighbor elements when using Legendre polynomials (see [113] for details). Note that we normalize our Legendre polynomials by \(P_i(1) = 1\); this is the normalization [113] uses in 1D, (but not in 2D), which is why our bounds on \(\alpha_i\) match Eq. 14 of [113] (but not Eq. 23). We relax the lower bound:
\begin{align*} 0 \le \alpha_i \le 1 \end{align*}
to allow different basis functions (e.g. Chebyshev polynomials) and to allow the limiter to be more dissipative if necessary. The same \(\alpha_i\)s are used in all dimensions.
The limiting procedure must be applied from the highest derivatives to the lowest, i.e. the highest coefficients to the lowest. Let us consider a 3d element with \(N+1\) coefficients in each dimension and denote the coefficients as \(c_{i,j,k}\). Then the limiting procedure starts at \(c_{N,N,N}\), followed by \(c_{N,N,N-1}\), \(c_{N,N-1,N}\), and \(c_{N-1,N,N}\). A detailed example is given below. Limiting is stopped if all symmetric pairs of coefficients are left unchanged, i.e. \(c_{i,j,k}=\tilde{c}_{i,j,k}\). By all symmetric coefficients we mean that, for example, \(c_{N-i,N-j,N-k}\), \(c_{N-j,N-i,N-k}\), \(c_{N-k,N-j,N-i}\), \(c_{N-j,N-k,N-i}\), \(c_{N-i,N-k,N-j}\), and \(c_{N-k,N-i,N-j}\) are not limited. As a concrete example, consider a 3d element with 3 collocation points per dimension. Each limited coefficient is defined as (though only computed if needed):
\begin{align*} \tilde{c}^{l,m,n}_{2,2,2}=\mathrm{minmod} &\left(c_{2,2,2}^{l,m,n}, \alpha_2\left(c^{l+1,m,n}_{1,2,2}-c^{l,m,n}_{1,2,2}\right), \alpha_2\left(c^{l,m,n}_{1,2,2}-c^{l-1,m,n}_{1,2,2}\right), \right.\\ &\;\;\;\; \alpha_2\left(c^{l,m+1,n}_{2,1,2}-c^{l,m,n}_{2,1,2}\right), \alpha_2\left(c^{l,m,n}_{2,1,2}-c^{l,m-1,n}_{2,1,2}\right),\\ &\;\;\;\;\left. \alpha_2\left(c^{l,m,n+1}_{2,2,1}-c^{l,m,n}_{2,2,1}\right), \alpha_2\left(c^{l,m,n}_{2,2,1}-c^{l,m,n-1}_{2,2,1}\right) \right),\\ \tilde{c}^{l,m,n}_{2,2,1}=\mathrm{minmod} &\left(c_{2,2,1}^{l,m,n}, \alpha_2\left(c^{l+1,m,n}_{1,2,1}-c^{l,m,n}_{1,2,1}\right), \alpha_2\left(c^{l,m,n}_{1,2,1}-c^{l-1,m,n}_{1,2,1}\right), \right.\\ &\;\;\;\; \alpha_2\left(c^{l,m+1,n}_{2,1,1}-c^{l,m,n}_{2,1,1}\right), \alpha_2\left(c^{l,m,n}_{2,1,1}-c^{l,m-1,n}_{2,1,1}\right),\\ &\;\;\;\;\left. \alpha_1\left(c^{l,m,n+1}_{2,2,0}-c^{l,m,n}_{2,2,0}\right), \alpha_1\left(c^{l,m,n}_{2,2,0}-c^{l,m,n-1}_{2,2,0}\right) \right),\\ \tilde{c}^{l,m,n}_{2,1,2}=\mathrm{minmod} &\left(c_{2,1,2}^{l,m,n}, \alpha_2\left(c^{l+1,m,n}_{1,1,2}-c^{l,m,n}_{1,1,2}\right), \alpha_2\left(c^{l,m,n}_{1,1,2}-c^{l-1,m,n}_{1,1,2}\right), \right.\\ &\;\;\;\; \alpha_1\left(c^{l,m+1,n}_{2,0,2}-c^{l,m,n}_{2,0,2}\right), \alpha_1\left(c^{l,m,n}_{2,0,2}-c^{l,m-1,n}_{2,0,2}\right),\\ &\;\;\;\;\left. \alpha_2\left(c^{l,m,n+1}_{2,1,1}-c^{l,m,n}_{2,1,1}\right), \alpha_2\left(c^{l,m,n}_{2,1,1}-c^{l,m,n-1}_{2,1,1}\right) \right),\\ \tilde{c}^{l,m,n}_{1,2,2}=\mathrm{minmod} &\left(c_{1,2,2}^{l,m,n}, \alpha_1\left(c^{l+1,m,n}_{0,2,2}-c^{l,m,n}_{0,2,2}\right), \alpha_1\left(c^{l,m,n}_{0,2,2}-c^{l-1,m,n}_{0,2,2}\right), \right.\\ &\;\;\;\; \alpha_2\left(c^{l,m+1,n}_{1,1,2}-c^{l,m,n}_{1,1,2}\right), \alpha_2\left(c^{l,m,n}_{1,1,2}-c^{l,m-1,n}_{1,1,2}\right),\\ &\;\;\;\;\left. \alpha_2\left(c^{l,m,n+1}_{1,2,1}-c^{l,m,n}_{1,2,1}\right), \alpha_2\left(c^{l,m,n}_{1,2,1}-c^{l,m,n-1}_{1,2,1}\right) \right),\\ \tilde{c}^{l,m,n}_{2,2,0}=\mathrm{minmod} &\left(c_{2,2,0}^{l,m,n}, \alpha_2\left(c^{l+1,m,n}_{1,2,0}-c^{l,m,n}_{1,2,0}\right), \alpha_2\left(c^{l,m,n}_{1,2,0}-c^{l-1,m,n}_{1,2,0}\right), \right.\\ &\;\;\;\;\left. \alpha_2\left(c^{l,m+1,n}_{2,1,0}-c^{l,m,n}_{2,1,0}\right), \alpha_2\left(c^{l,m,n}_{2,1,0}-c^{l,m-1,n}_{2,1,0}\right) \right),\\ \tilde{c}^{l,m,n}_{2,0,2}=\mathrm{minmod} &\left(c_{2,0,2}^{l,m,n}, \alpha_2\left(c^{l+1,m,n}_{1,0,2}-c^{l,m,n}_{1,0,2}\right), \alpha_2\left(c^{l,m,n}_{1,0,2}-c^{l-1,m,n}_{1,0,2}\right), \right.\\ &\;\;\;\;\left. \alpha_2\left(c^{l,m,n+1}_{2,0,1}-c^{l,m,n}_{2,0,1}\right), \alpha_2\left(c^{l,m,n}_{2,0,1}-c^{l,m,n-1}_{2,0,1}\right) \right),\\ \tilde{c}^{l,m,n}_{0,2,2}=\mathrm{minmod} &\left(c_{0,2,2}^{l,m,n}, \alpha_2\left(c^{l,m+1,n}_{0,1,2}-c^{l,m,n}_{0,1,2}\right), \alpha_2\left(c^{l,m,n}_{0,1,2}-c^{l,m-1,n}_{0,1,2}\right), \right.\\ &\;\;\;\;\left. \alpha_2\left(c^{l,m,n+1}_{0,2,1}-c^{l,m,n}_{0,2,1}\right), \alpha_2\left(c^{l,m,n}_{0,2,1}-c^{l,m,n-1}_{0,2,1}\right) \right),\\ \tilde{c}^{l,m,n}_{2,1,1}=\mathrm{minmod} &\left(c_{2,1,1}^{l,m,n}, \alpha_2\left(c^{l+1,m,n}_{1,1,1}-c^{l,m,n}_{1,1,1}\right), \alpha_2\left(c^{l,m,n}_{1,1,1}-c^{l-1,m,n}_{1,1,1}\right), \right.\\ &\;\;\;\; \alpha_1\left(c^{l,m+1,n}_{2,0,1}-c^{l,m,n}_{2,0,1}\right), \alpha_1\left(c^{l,m,n}_{2,0,1}-c^{l,m-1,n}_{2,0,1}\right),\\ &\;\;\;\;\left. \alpha_1\left(c^{l,m,n+1}_{2,1,0}-c^{l,m,n}_{2,1,0}\right), \alpha_1\left(c^{l,m,n}_{2,1,0}-c^{l,m,n-1}_{2,1,0}\right) \right),\\ \tilde{c}^{l,m,n}_{1,2,1}=\mathrm{minmod} &\left(c_{1,2,1}^{l,m,n}, \alpha_1\left(c^{l+1,m,n}_{0,2,1}-c^{l,m,n}_{0,2,1}\right), \alpha_1\left(c^{l,m,n}_{0,2,1}-c^{l-1,m,n}_{0,2,1}\right), \right.\\ &\;\;\;\; \alpha_2\left(c^{l,m+1,n}_{1,1,1}-c^{l,m,n}_{1,1,1}\right), \alpha_2\left(c^{l,m,n}_{1,1,1}-c^{l,m-1,n}_{1,1,1}\right),\\ &\;\;\;\;\left. \alpha_1\left(c^{l,m,n+1}_{1,2,0}-c^{l,m,n}_{1,2,0}\right), \alpha_1\left(c^{l,m,n}_{1,2,0}-c^{l,m,n-1}_{1,2,0}\right) \right),\\ \tilde{c}^{l,m,n}_{1,1,2}=\mathrm{minmod} &\left(c_{1,1,2}^{l,m,n}, \alpha_1\left(c^{l+1,m,n}_{0,1,2}-c^{l,m,n}_{0,1,2}\right), \alpha_1\left(c^{l,m,n}_{0,1,2}-c^{l-1,m,n}_{0,1,2}\right), \right.\\ &\;\;\;\; \alpha_1\left(c^{l,m+1,n}_{1,0,2}-c^{l,m,n}_{1,0,2}\right), \alpha_1\left(c^{l,m,n}_{1,0,2}-c^{l,m-1,n}_{1,0,2}\right),\\ &\;\;\;\;\left. \alpha_2\left(c^{l,m,n+1}_{1,1,1}-c^{l,m,n}_{1,1,1}\right), \alpha_2\left(c^{l,m,n}_{1,1,1}-c^{l,m,n-1}_{1,1,1}\right) \right), \end{align*}
\begin{align*} \tilde{c}^{l,m,n}_{2,1,0}=\mathrm{minmod} &\left(c_{2,1,0}^{l,m,n}, \alpha_2\left(c^{l+1,m,n}_{1,1,0}-c^{l,m,n}_{1,1,0}\right), \alpha_2\left(c^{l,m,n}_{1,1,0}-c^{l-1,m,n}_{1,1,0}\right), \right.\\ &\;\;\;\;\left. \alpha_1\left(c^{l,m+1,n}_{2,0,0}-c^{l,m,n}_{2,0,0}\right), \alpha_1\left(c^{l,m,n}_{2,0,0}-c^{l,m-1,n}_{2,0,0}\right) \right),\\ \tilde{c}^{l,m,n}_{2,0,1}=\mathrm{minmod} &\left(c_{2,0,1}^{l,m,n}, \alpha_2\left(c^{l+1,m,n}_{1,0,1}-c^{l,m,n}_{1,0,1}\right), \alpha_2\left(c^{l,m,n}_{1,0,1}-c^{l-1,m,n}_{1,0,1}\right), \right.\\ &\;\;\;\;\left. \alpha_1\left(c^{l,m,n+1}_{2,0,0}-c^{l,m,n}_{2,0,0}\right), \alpha_1\left(c^{l,m,n}_{2,0,0}-c^{l,m,n-1}_{2,0,0}\right) \right),\\ \tilde{c}^{l,m,n}_{1,2,0}=\mathrm{minmod} &\left(c_{1,2,0}^{l,m,n}, \alpha_1\left(c^{l+1,m,n}_{0,2,0}-c^{l,m,n}_{0,2,0}\right), \alpha_1\left(c^{l,m,n}_{0,2,0}-c^{l-1,m,n}_{0,2,0}\right), \right.\\ &\;\;\;\;\left. \alpha_2\left(c^{l,m+1,n}_{1,1,0}-c^{l,m,n}_{1,1,0}\right), \alpha_2\left(c^{l,m,n}_{1,1,0}-c^{l,m-1,n}_{1,1,0}\right) \right),\\ \tilde{c}^{l,m,n}_{1,0,2}=\mathrm{minmod} &\left(c_{1,0,2}^{l,m,n}, \alpha_1\left(c^{l+1,m,n}_{0,0,2}-c^{l,m,n}_{0,0,2}\right), \alpha_1\left(c^{l,m,n}_{0,0,2}-c^{l-1,m,n}_{0,0,2}\right), \right.\\ &\;\;\;\;\left. \alpha_2\left(c^{l,m,n+1}_{1,0,1}-c^{l,m,n}_{1,0,1}\right), \alpha_2\left(c^{l,m,n}_{1,0,1}-c^{l,m,n-1}_{1,0,1}\right) \right),\\ \tilde{c}^{l,m,n}_{0,1,2}=\mathrm{minmod} &\left(c_{0,1,2}^{l,m,n}, \alpha_1\left(c^{l,m+1,n}_{0,0,2}-c^{l,m,n}_{0,0,2}\right), \alpha_1\left(c^{l,m,n}_{0,0,2}-c^{l,m-1,n}_{0,0,2}\right), \right. \\ &\;\;\;\;\left. \alpha_2\left(c^{l,m,n+1}_{0,1,1}-c^{l,m,n}_{0,1,1}\right), \alpha_2\left(c^{l,m,n}_{0,1,1}-c^{l,m,n-1}_{0,1,1}\right) \right),\\ \tilde{c}^{l,m,n}_{0,2,1}=\mathrm{minmod} &\left(c_{0,2,1}^{l,m,n}, \alpha_2\left(c^{l,m+1,n}_{0,1,1}-c^{l,m,n}_{0,1,1}\right), \alpha_2\left(c^{l,m,n}_{0,1,1}-c^{l,m-1,n}_{0,1,1}\right), \right.\\ &\;\;\;\;\left. \alpha_1\left(c^{l,m,n+1}_{0,2,0}-c^{l,m,n}_{0,2,0}\right), \alpha_1\left(c^{l,m,n}_{0,2,0}-c^{l,m,n-1}_{0,2,0}\right) \right), \end{align*}
\begin{align*} \tilde{c}^{l,m,n}_{2,0,0}=\mathrm{minmod} &\left(c_{2,0,0}^{l,m,n}, \alpha_2\left(c^{l+1,m,n}_{1,0,0}-c^{l,m,n}_{1,0,0}\right), \alpha_2\left(c^{l,m,n}_{1,0,0}-c^{l-1,m,n}_{1,0,0}\right) \right),\\ \tilde{c}^{l,m,n}_{0,2,0}=\mathrm{minmod} &\left(c_{0,2,0}^{l,m,n}, \alpha_2\left(c^{l,m+1,n}_{0,1,0}-c^{l,m,n}_{0,1,0}\right), \alpha_2\left(c^{l,m,n}_{0,1,0}-c^{l,m-1,n}_{0,1,0}\right) \right),\\ \tilde{c}^{l,m,n}_{0,0,2}=\mathrm{minmod} &\left(c_{0,0,2}^{l,m,n}, \alpha_2\left(c^{l,m,n+1}_{0,0,1}-c^{l,m,n}_{0,0,1}\right), \alpha_2\left(c^{l,m,n}_{0,0,1}-c^{l,m,n-1}_{0,0,1}\right) \right),\\ \tilde{c}^{l,m,n}_{1,1,1}=\mathrm{minmod} &\left(c_{1,1,1}^{l,m,n}, \alpha_1\left(c^{l+1,m,n}_{0,1,1}-c^{l,m,n}_{0,1,1}\right), \alpha_1\left(c^{l,m,n}_{0,1,1}-c^{l-1,m,n}_{0,1,1}\right), \right.\\ &\;\;\;\; \alpha_1\left(c^{l,m+1,n}_{1,0,1}-c^{l,m,n}_{1,0,1}\right), \alpha_1\left(c^{l,m,n}_{1,0,1}-c^{l,m-1,n}_{1,0,1}\right),\\ &\;\;\;\;\left. \alpha_1\left(c^{l,m,n+1}_{1,1,0}-c^{l,m,n}_{1,1,0}\right), \alpha_1\left(c^{l,m,n}_{1,1,0}-c^{l,m,n-1}_{1,1,0}\right) \right),\\ \tilde{c}^{l,m,n}_{1,1,0}=\mathrm{minmod} &\left(c_{1,1,0}^{l,m,n}, \alpha_1\left(c^{l+1,m,n}_{0,1,0}-c^{l,m,n}_{0,1,0}\right), \alpha_1\left(c^{l,m,n}_{0,1,0}-c^{l-1,m,n}_{0,1,0}\right), \right.\\ &\;\;\;\;\left. \alpha_1\left(c^{l,m+1,n}_{1,0,0}-c^{l,m,n}_{1,0,0}\right), \alpha_1\left(c^{l,m,n}_{1,0,0}-c^{l,m-1,n}_{1,0,0}\right), \right),\\ \tilde{c}^{l,m,n}_{1,0,1}=\mathrm{minmod} &\left(c_{1,0,1}^{l,m,n}, \alpha_1\left(c^{l+1,m,n}_{0,0,1}-c^{l,m,n}_{0,0,1}\right), \alpha_1\left(c^{l,m,n}_{0,0,1}-c^{l-1,m,n}_{0,0,1}\right), \right.\\ &\;\;\;\;\left. \alpha_1\left(c^{l,m,n+1}_{1,0,0}-c^{l,m,n}_{1,0,0}\right), \alpha_1\left(c^{l,m,n}_{1,0,0}-c^{l,m,n-1}_{1,0,0}\right) \right),\\ \tilde{c}^{l,m,n}_{0,1,1}=\mathrm{minmod} &\left(c_{0,1,1}^{l,m,n}, \alpha_1\left(c^{l,m+1,n}_{0,0,1}-c^{l,m,n}_{0,0,1}\right), \alpha_1\left(c^{l,m,n}_{0,0,1}-c^{l,m-1,n}_{0,0,1}\right), \right.\\ &\;\;\;\;\left. \alpha_1\left(c^{l,m,n+1}_{0,1,0}-c^{l,m,n}_{0,1,0}\right), \alpha_1\left(c^{l,m,n}_{0,1,0}-c^{l,m,n-1}_{0,1,0}\right) \right),\\ \tilde{c}^{l,m,n}_{1,0,0}=\mathrm{minmod} &\left(c_{1,0,0}^{l,m,n}, \alpha_1\left(c^{l+1,m,n}_{0,0,0}-c^{l,m,n}_{0,0,0}\right), \alpha_1\left(c^{l,m,n}_{0,0,0}-c^{l-1,m,n}_{0,0,0}\right) \right),\\ \tilde{c}^{l,m,n}_{0,1,0}=\mathrm{minmod} &\left(c_{0,1,0}^{l,m,n}, \alpha_1\left(c^{l,m+1,n}_{0,0,0}-c^{l,m,n}_{0,0,0}\right), \alpha_1\left(c^{l,m,n}_{0,0,0}-c^{l,m-1,n}_{0,0,0}\right) \right),\\ \tilde{c}^{l,m,n}_{0,0,1}=\mathrm{minmod} &\left(c_{0,0,1}^{l,m,n}, \alpha_1\left(c^{l,m,n+1}_{0,0,0}-c^{l,m,n}_{0,0,0}\right), \alpha_1\left(c^{l,m,n}_{0,0,0}-c^{l,m,n-1}_{0,0,0}\right) \right), \end{align*}
The algorithm to perform the limiting is as follows:
The 1d and 2d implementations are straightforward restrictions of the described algorithm.
packaged_data
function to return an object to be passed as an additional argument to the operator()
(still would need to be stored in the DataBox).
|
staticconstexpr |