SpECTRE  v2024.09.29
CurvedScalarWave::BoundaryCorrections::UpwindPenalty< Dim > Class Template Referencefinal

Computes the upwind multipenalty boundary correction for scalar wave in curved spacetime. More...

#include <UpwindPenalty.hpp>

Public Types

using options = tmpl::list<>
 
using dg_package_field_tags = tmpl::list< Tags::VPsi, Tags::VZero< Dim >, Tags::VPlus, Tags::VMinus, Tags::ConstraintGamma2, ::Tags::Normalized< domain::Tags::UnnormalizedFaceNormal< Dim, Frame::Inertial > >, CharSpeedsTensor >
 
using dg_package_data_temporary_tags = tmpl::list< gr::Tags::Lapse< DataVector >, gr::Tags::Shift< DataVector, Dim >, Tags::ConstraintGamma1, Tags::ConstraintGamma2 >
 
using dg_package_data_volume_tags = tmpl::list<>
 
using dg_boundary_terms_volume_tags = tmpl::list<>
 
- Public Types inherited from CurvedScalarWave::BoundaryCorrections::BoundaryCorrection< Dim >
using creatable_classes = tmpl::list< UpwindPenalty< Dim > >
 

Public Member Functions

 UpwindPenalty (const UpwindPenalty &)=default
 
UpwindPenaltyoperator= (const UpwindPenalty &)=default
 
 UpwindPenalty (UpwindPenalty &&)=default
 
UpwindPenaltyoperator= (UpwindPenalty &&)=default
 
void pup (PUP::er &p) override
 
std::unique_ptr< BoundaryCorrection< Dim > > get_clone () const override
 
double dg_package_data (gsl::not_null< Scalar< DataVector > * > packaged_v_psi, gsl::not_null< tnsr::i< DataVector, Dim, Frame::Inertial > * > packaged_v_zero, gsl::not_null< Scalar< DataVector > * > packaged_v_plus, gsl::not_null< Scalar< DataVector > * > packaged_v_minus, gsl::not_null< Scalar< DataVector > * > packaged_gamma2, gsl::not_null< tnsr::i< DataVector, Dim, Frame::Inertial > * > packaged_interface_unit_normal, gsl::not_null< tnsr::a< DataVector, 3, Frame::Inertial > * > packaged_char_speeds, const Scalar< DataVector > &psi, const Scalar< DataVector > &pi, const tnsr::i< DataVector, Dim, Frame::Inertial > &phi, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, Dim, Frame::Inertial > &shift, const Scalar< DataVector > &constraint_gamma1, const Scalar< DataVector > &constraint_gamma2, const tnsr::i< DataVector, Dim, Frame::Inertial > &interface_unit_normal, const tnsr::I< DataVector, Dim, Frame::Inertial > &interface_unit_normal_vector, const std::optional< tnsr::I< DataVector, Dim, Frame::Inertial > > &, const std::optional< Scalar< DataVector > > &normal_dot_mesh_velocity) const
 
void dg_boundary_terms (gsl::not_null< Scalar< DataVector > * > psi_boundary_correction, gsl::not_null< Scalar< DataVector > * > pi_boundary_correction, gsl::not_null< tnsr::i< DataVector, Dim, Frame::Inertial > * > phi_boundary_correction, const Scalar< DataVector > &v_psi_int, const tnsr::i< DataVector, Dim, Frame::Inertial > &v_zero_int, const Scalar< DataVector > &v_plus_int, const Scalar< DataVector > &v_minus_int, const Scalar< DataVector > &gamma2_int, const tnsr::i< DataVector, Dim, Frame::Inertial > &interface_unit_normal_int, const tnsr::a< DataVector, 3, Frame::Inertial > &char_speeds_int, const Scalar< DataVector > &v_psi_ext, const tnsr::i< DataVector, Dim, Frame::Inertial > &v_zero_ext, const Scalar< DataVector > &v_plus_ext, const Scalar< DataVector > &v_minus_ext, const Scalar< DataVector > &gamma2_ext, const tnsr::i< DataVector, Dim, Frame::Inertial > &interface_unit_normal_ext, const tnsr::a< DataVector, 3, Frame::Inertial > &char_speeds_ext, dg::Formulation) const
 
- Public Member Functions inherited from CurvedScalarWave::BoundaryCorrections::BoundaryCorrection< Dim >
 BoundaryCorrection (const BoundaryCorrection &)=default
 
BoundaryCorrectionoperator= (const BoundaryCorrection &)=default
 
 BoundaryCorrection (BoundaryCorrection &&)=default
 
BoundaryCorrectionoperator= (BoundaryCorrection &&)=default
 
virtual std::unique_ptr< BoundaryCorrection< Dim > > get_clone () const =0
 

Static Public Attributes

static constexpr Options::String help
 

Detailed Description

template<size_t Dim>
class CurvedScalarWave::BoundaryCorrections::UpwindPenalty< Dim >

Computes the upwind multipenalty boundary correction for scalar wave in curved spacetime.

Details

This implements the upwind multipenalty boundary correction term. The general form is given by:

\[ G = T^{\rm ext}\Lambda^{\rm ext,-} {T^{\rm ext}}^{-1} U^{\rm ext} + T^{\rm int}\Lambda^{\rm int,+} {T^{\rm int}}^{-1} U^{\rm int} = T^{\rm ext}\Lambda^{\rm ext,-} V^{\rm ext} + T^{\rm int}\Lambda^{\rm int,+} V^{\rm int}, \]

where

  • \(G\) is a vector of numerical upwind fluxes dotted with the interface normal for all evolved variables;
  • \(U\) is a vector of all evolved variables;
  • \(T\) is a matrix whose columns are the eigenvectors of the characteristic matrix for the evolution system. It maps the evolved variables to characteristic variables \(V\), s.t. \(V := T^{-1}\cdot U\); and
  • \(\Lambda^\pm\) are diagonal matrices containing positive / negative eigenvalues of \(T\) as its diagonal elements, with the rest set to \( 0\).

The superscripts \({\rm int}\) and \({\rm ext}\) indicate that the corresponding variable at the element interface comes from the interior or exterior of the element. Exterior of the element is naturally the interior of its neighboring element. The sign of characteristic speeds indicate the direction of propagation of the corresponding characteristic field with respect to the interface normal that the field has been computed along, with negative speeds indicating incoming characteristics, and positive speeds indicating outgoing characteristics. The expressions implemented here differ from Eq.(63) of [182] as that boundary term does not consistently treat both sides of the interface on the same footing. Unlike in [182], in code the interface normal vector on the interior side and the one on the exterior side point in opposite directions, and the characteristic speeds end up having different signs. This class therefore computes:

\[ G = T^{\rm ext}w_{\rm ext} V^{\rm ext} - T^{\rm int}w_{\rm int} V^{\rm int}, \]

with weights \(w_{\rm ext} = -\Theta(\Lambda^{\rm ext})\cdot\Lambda^{\rm ext}\), and \(w_{\rm int} = \Theta(-\Lambda^{\rm int})\cdot\Lambda^{\rm int}\), where \(\Theta\) is the Heaviside function centered at zero, \(\Lambda = \Lambda^+ + \Lambda^-\), and the dot operator \((\cdot)\) indicates an element-wise product.

Member Function Documentation

◆ get_clone()

Member Data Documentation

◆ help

template<size_t Dim>
constexpr Options::String CurvedScalarWave::BoundaryCorrections::UpwindPenalty< Dim >::help
staticconstexpr
Initial value:
= {
"Computes the UpwindPenalty boundary correction term for the scalar wave "
"system in curved spacetime."}

The documentation for this class was generated from the following file: