SpECTRE  v2026.09.05
Loading...
Searching...
No Matches
SecondOrderScalarWave::BoundaryCorrections::LaxFriedrichs< Dim > Class Template Referencefinal

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
LaxFriedrichsoperator= (const LaxFriedrichs &)=default
 LaxFriedrichs (LaxFriedrichs &&)=default
LaxFriedrichsoperator= (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
BoundaryCorrectionoperator= (const BoundaryCorrection &)=default
 BoundaryCorrection (BoundaryCorrection &&)=default
BoundaryCorrectionoperator= (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)

Detailed Description

template<size_t Dim>
class SecondOrderScalarWave::BoundaryCorrections::LaxFriedrichs< Dim >

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.

Auxiliary pass

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.

Physical pass

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.

Member Function Documentation

◆ get_clone()

template<size_t Dim>
std::unique_ptr< BoundaryCorrection > SecondOrderScalarWave::BoundaryCorrections::LaxFriedrichs< Dim >::get_clone ( ) const
overridevirtual

Member Data Documentation

◆ help

template<size_t Dim>
Options::String SecondOrderScalarWave::BoundaryCorrections::LaxFriedrichs< Dim >::help
staticconstexpr
Initial value:
= {
"Boundary correction to the LDG method using the LaxFriedrichs numerical "
"flux."}

The documentation for this class was generated from the following file:
  • src/Evolution/Systems/SecondOrderScalarWave/BoundaryCorrections/LaxFriedrichs.hpp