|
SpECTRE
v2026.09.05
|
A Lax-Friedrichs-type boundary correction for the second-order scalar wave system, providing the numerical fluxes for the local discontinuous Galerkin (LDG) scheme. More...
#include <LaxFriedrichs.hpp>
Classes | |
| struct | Tau |
Public Types | |
| using | options = tmpl::list<Tau> |
| using | dg_package_field_tags = tmpl::list<Tags::Pi, Tags::NormalDotPhi> |
| using | dg_package_data_temporary_tags = tmpl::list<> |
| using | dg_package_data_volume_tags = tmpl::list<> |
| using | dg_boundary_terms_volume_tags = tmpl::list<> |
| using | dg_auxiliary_package_field_tags = tmpl::list<Tags::PsiTimesNormal<Dim>> |
| using | dg_auxiliary_package_data_temporary_tags = tmpl::list<> |
| using | dg_auxiliary_package_data_volume_tags = tmpl::list<> |
| using | dg_auxiliary_boundary_terms_volume_tags = tmpl::list<> |
Public Member Functions | |
| LaxFriedrichs (double tau) | |
| LaxFriedrichs (const LaxFriedrichs &)=default | |
| LaxFriedrichs & | operator= (const LaxFriedrichs &)=default |
| LaxFriedrichs (LaxFriedrichs &&)=default | |
| LaxFriedrichs & | operator= (LaxFriedrichs &&)=default |
| void | pup (PUP::er &p) override |
| std::unique_ptr< BoundaryCorrection > | get_clone () const override |
| double | dg_package_data (gsl::not_null< Scalar< DataVector > * > packaged_pi, gsl::not_null< Scalar< DataVector > * > packaged_normal_dot_phi, const Scalar< DataVector > &, const Scalar< DataVector > &pi, const tnsr::i< DataVector, Dim, Frame::Inertial > &phi, const tnsr::i< DataVector, Dim, Frame::Inertial > &normal_covector, const std::optional< tnsr::I< DataVector, Dim, Frame::Inertial > > &, const std::optional< Scalar< DataVector > > &) const |
| void | dg_boundary_terms (gsl::not_null< Scalar< DataVector > * > psi_boundary_correction, gsl::not_null< Scalar< DataVector > * > pi_boundary_correction, const Scalar< DataVector > &pi_int, const Scalar< DataVector > &normal_dot_phi_int, const Scalar< DataVector > &pi_ext, const Scalar< DataVector > &normal_dot_phi_ext, dg::Formulation) const |
| double | dg_auxiliary_package_data (gsl::not_null< tnsr::i< DataVector, Dim, Frame::Inertial > * > psi_times_normal, const Scalar< DataVector > &psi, const Scalar< DataVector > &, const tnsr::i< DataVector, Dim, Frame::Inertial > &normal_covector, const std::optional< tnsr::I< DataVector, Dim, Frame::Inertial > > &, const std::optional< Scalar< DataVector > > &) const |
| void | dg_auxiliary_boundary_terms (gsl::not_null< tnsr::i< DataVector, Dim, Frame::Inertial > * > phi_boundary_correction, const tnsr::i< DataVector, Dim, Frame::Inertial > &psi_times_normal_int, const tnsr::i< DataVector, Dim, Frame::Inertial > &psi_times_normal_ext, dg::Formulation) const |
| Public Member Functions inherited from evolution::BoundaryCorrection | |
| BoundaryCorrection (const BoundaryCorrection &)=default | |
| BoundaryCorrection & | operator= (const BoundaryCorrection &)=default |
| BoundaryCorrection (BoundaryCorrection &&)=default | |
| BoundaryCorrection & | operator= (BoundaryCorrection &&)=default |
| BoundaryCorrection (CkMigrateMessage *msg) | |
Static Public Attributes | |
| static constexpr Options::String | help |
Friends | |
| template<size_t LocalDim> | |
| bool | operator== (const LaxFriedrichs< LocalDim > &lhs, const LaxFriedrichs< LocalDim > &rhs) |
A Lax-Friedrichs-type boundary correction for the second-order scalar wave system, providing the numerical fluxes for the local discontinuous Galerkin (LDG) scheme.
Each evaluation of the system's time derivative proceeds in two passes: the auxiliary pass computes \(\Phi_i = \partial_i \Psi\), then the physical pass evolves \(\partial_t \Pi = -\partial_i \Phi^i\) and \(\partial_t \Psi = -\Pi\). This class supplies the numerical flux for each pass: the dg_auxiliary_* interface couples neighboring elements in the auxiliary pass, the standard dg_* interface in the physical pass.
Below, \(n^i\) denotes the interior element's outward-directed unit face normal. \(\{\{\Psi\}\}\) denotes the central average of \(\Psi\) across the interface, and \([[\Psi]]^i=n^i\left(\Psi^\text{int}-\Psi^\text{ext}\right)\) denotes the jump of \(\Psi\) across the interface.
Integrating \(\Phi_i = \partial_i \Psi\) against a test function \(l\) by parts twice over an element \(K\) gives
\begin{align*}\int_K \Phi_i l = \int_K (\partial_i \Psi)\, l + \oint_{\partial K} l n_i \left(\Psi^* - \Psi\right), \end{align*}
where
\begin{align*}\Psi^* = \{\{ \Psi \}\} \end{align*}
is the central flux.
Integrating \(\partial_t \Pi = -\partial_i \Phi^i\) by parts twice gives
\begin{align*}\int_K (\partial_t \Pi)\, l = -\int_K (\partial_i f_\Phi^i)\, l - \oint_{\partial K} \left[(f_\Phi^i)^* - f_\Phi^i\right] l n_i , \end{align*}
where
\begin{align*}f_\Phi^i = \Phi^i, \end{align*}
\begin{align*}(f_\Phi^i)^* = \{\{ f_\Phi^i \}\} + \frac{\tau}{2} [[ \Pi ]]^i \end{align*}
\(\partial_t \Psi = -\Pi\) contains no spatial derivative so receives no boundary correction.
|
overridevirtual |
Implements evolution::BoundaryCorrection.
|
staticconstexpr |