SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
gh::BoundaryCorrections::AveragedUpwindPenalty< Dim > Class Template Referencefinal

Computes the generalized harmonic upwind multipenalty boundary correction using the averaged fields across the interface. More...

#include <AveragedUpwindPenalty.hpp>

Classes

struct  MeshVelocity

Public Types

using options = tmpl::list<>
using dg_package_field_tags
using dg_package_data_temporary_tags
using dg_package_data_primitive_tags = tmpl::list<>
using dg_package_data_volume_tags = tmpl::list<>
using dg_boundary_terms_volume_tags = tmpl::list<>

Public Member Functions

 AveragedUpwindPenalty (const AveragedUpwindPenalty &)=default
AveragedUpwindPenaltyoperator= (const AveragedUpwindPenalty &)=default
 AveragedUpwindPenalty (AveragedUpwindPenalty &&)=default
AveragedUpwindPenaltyoperator= (AveragedUpwindPenalty &&)=default
void pup (PUP::er &p) override
std::unique_ptr< BoundaryCorrection > get_clone () const override
double dg_package_data (gsl::not_null< tnsr::aa< DataVector, Dim, Frame::Inertial > * > packaged_spacetime_metric, gsl::not_null< tnsr::aa< DataVector, Dim, Frame::Inertial > * > packaged_pi, gsl::not_null< tnsr::iaa< DataVector, Dim, Frame::Inertial > * > packaged_phi, gsl::not_null< Scalar< DataVector > * > packaged_constraint_gamma1, gsl::not_null< Scalar< DataVector > * > packaged_constraint_gamma2, gsl::not_null< tnsr::i< DataVector, Dim, Frame::Inertial > * > packaged_normal, gsl::not_null< tnsr::I< DataVector, Dim, Frame::Inertial > * > packaged_mesh_velocity, const tnsr::aa< DataVector, Dim, Frame::Inertial > &spacetime_metric, const tnsr::aa< DataVector, Dim, Frame::Inertial > &pi, const tnsr::iaa< DataVector, Dim, Frame::Inertial > &phi, const Scalar< DataVector > &constraint_gamma1, const Scalar< DataVector > &constraint_gamma2, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, Dim > &shift, const tnsr::i< DataVector, Dim, Frame::Inertial > &normal_covector, const tnsr::I< DataVector, Dim, Frame::Inertial > &normal_vector, const std::optional< tnsr::I< DataVector, Dim, Frame::Inertial > > &mesh_velocity, const std::optional< Scalar< DataVector > > &normal_dot_mesh_velocity) const
void dg_boundary_terms (gsl::not_null< tnsr::aa< DataVector, Dim, Frame::Inertial > * > boundary_correction_spacetime_metric, gsl::not_null< tnsr::aa< DataVector, Dim, Frame::Inertial > * > boundary_correction_pi, gsl::not_null< tnsr::iaa< DataVector, Dim, Frame::Inertial > * > boundary_correction_phi, const tnsr::aa< DataVector, Dim, Frame::Inertial > &spacetime_metric_int, const tnsr::aa< DataVector, Dim, Frame::Inertial > &pi_int, const tnsr::iaa< DataVector, Dim, Frame::Inertial > &phi_int, const Scalar< DataVector > &constraint_gamma1_int, const Scalar< DataVector > &constraint_gamma2_int, const tnsr::i< DataVector, Dim, Frame::Inertial > &normal_int, const tnsr::I< DataVector, Dim, Frame::Inertial > &mesh_velocity_int, const tnsr::aa< DataVector, Dim, Frame::Inertial > &spacetime_metric_ext, const tnsr::aa< DataVector, Dim, Frame::Inertial > &pi_ext, const tnsr::iaa< DataVector, Dim, Frame::Inertial > &phi_ext, const Scalar< DataVector > &constraint_gamma1_ext, const Scalar< DataVector > &constraint_gamma2_ext, const tnsr::i< DataVector, Dim, Frame::Inertial > &normal_ext, const tnsr::I< DataVector, Dim, Frame::Inertial > &mesh_velocity_ext, dg::Formulation 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

Detailed Description

template<size_t Dim>
class gh::BoundaryCorrections::AveragedUpwindPenalty< Dim >

Computes the generalized harmonic upwind multipenalty boundary correction using the averaged fields across the interface.

The correction is given by

\begin{equation} D_\beta = T^{-1}_{\beta\hat{\beta}}(u^{\text{avg}}) \Lambda^-_{\hat{\beta}\hat{\alpha}}(u^{\text{avg}}) T_{\hat{\alpha}\alpha}(u^{\text{avg}}) \Delta u_\alpha, \end{equation}

where \(u_\alpha\) are the evolved fields, \(\Lambda^-\) is the diagonal matrix of incoming characteristic speeds, \(T_{\hat{\alpha}\alpha}\) transforms from evolved to characteristic fields, and \(\Delta u_\alpha = u_\alpha^{\text{ext}} - u_\alpha^{\text{int}}\) is the discontinuity in the evolved fields. All factors except the boundary discontinuity are calculated using the averaged of the internal and external evolved fields:

\begin{equation} u^{\text{avg}} = \frac{u^{\text{int}} + u^{\text{ext}}}{2}. \end{equation}

For the first-order generalized harmonic system the correction is:

\begin{align} D_{g_{ab}} &= \lambda_{v^g}^- \Delta g_{ab} \\ D_{\Pi_{ab}} &= \left(\lambda_{v^g}^- - \frac{\lambda_{v^+}^- + \lambda_{v^-}^-}{2}\right) \gamma_2 \Delta g_{ab} + \frac{\lambda_{v^+}^- + \lambda_{v^-}^-}{2} \Delta \Pi_{ab} + \frac{\lambda_{v^+}^- - \lambda_{v^-}^-}{2} n^j \Delta \Phi_{jab} \\ D_{\Phi_{iab}} &= \lambda_{v^0}^- (\delta_i^j - n_i n^j) \Delta \Phi_{jab} + \frac{\lambda_{v^+}^- - \lambda_{v^-}^-}{2} n_i (\Delta \Pi_{ab} - \gamma_2 \Delta g_{ab}) + \frac{\lambda_{v^+}^- + \lambda_{v^-}^-}{2} n_i n^j \Delta \Phi_{jab}. \end{align}

In the above expressions, the outgoing face normal \(n_i\) is normalized using the average metric from the two sides. Quantities such as \(\gamma_2\) that should analytically be the same on both sides of the interface are also averaged, as they can differ because of truncation errors during projection.

The characteristic speeds are given by

\begin{align} \lambda_{v^g} &= - (1 + \gamma_1) (\beta^i + v^i_g) n_i, \\ \lambda_{v^0} &= - (\beta^i + v^i_g) n_i, \\ \lambda_{v^\pm} &= \pm \alpha - (\beta^i + v^i_g) n_i, \end{align}

where \(v_g^i\) is the mesh velocity, with the incoming speeds

\begin{equation} \lambda^-_{\hat{\alpha}} = \begin{cases} \lambda_{\hat{\alpha}} & \lambda_{\hat{\alpha}} < 0 \\ 0 & \text{otherwise.} \end{cases} \end{equation}

Member Typedef Documentation

◆ dg_package_data_temporary_tags

template<size_t Dim>
using gh::BoundaryCorrections::AveragedUpwindPenalty< Dim >::dg_package_data_temporary_tags
Initial value:
Constraint dammping parameter for the generalized harmonic system (cf. lindblom2005qh).
Definition ConstraintDampingTags.hpp:62
Constraint dammping parameter for the generalized harmonic system (cf. lindblom2005qh).
Definition ConstraintDampingTags.hpp:70
Definition Tags.hpp:65
Definition Tags.hpp:61

◆ dg_package_field_tags

template<size_t Dim>
using gh::BoundaryCorrections::AveragedUpwindPenalty< Dim >::dg_package_field_tags
Initial value:
tmpl::list<gr::Tags::SpacetimeMetric<DataVector, Dim>,
The unnormalized face normal one form.
Definition FaceNormal.hpp:129
Definition AveragedUpwindPenalty.hpp:126
Auxiliary variable which is analytically the spatial derivative of the spacetime metric.
Definition Tags.hpp:38
Conjugate momentum to the spacetime metric.
Definition Tags.hpp:27

Member Function Documentation

◆ get_clone()

template<size_t Dim>
std::unique_ptr< BoundaryCorrection > gh::BoundaryCorrections::AveragedUpwindPenalty< Dim >::get_clone ( ) const
overridevirtual

Member Data Documentation

◆ help

template<size_t Dim>
Options::String gh::BoundaryCorrections::AveragedUpwindPenalty< Dim >::help
staticconstexpr
Initial value:
= {
"Computes the upwind penalty boundary correction term for the "
"generalized harmonic system using the averaged fields from the two "
"sides of the interface."}

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