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

Sets boundary conditions using the characteristic decomposition: the incoming mode is set from analytic data, the outgoing and zero-speed modes from the interior. More...

#include <DirichletCharacteristics.hpp>

Classes

struct  AnalyticPrescription
 What analytic solution to prescribe. More...
struct  CopyPsiFromInterior
 If true, the ghost Psi is copied from the interior instead of the boundary-evolved value. More...
struct  ZeroIncomingMode
 Label for AnalyticPrescription setting the incoming characteristic mode \(v^-\) to zero. More...

Public Types

using options = tmpl::list<AnalyticPrescription, CopyPsiFromInterior>
using dg_interior_evolved_variables_tags
using dg_interior_temporary_tags
using dg_gridless_tags = tmpl::list<::Tags::Time>
using boundary_field_time_derivatives_evolved_variables_tags
using boundary_field_time_derivatives_temporary_tags

Public Member Functions

 DirichletCharacteristics (DirichletCharacteristics &&)=default
DirichletCharacteristics & operator= (DirichletCharacteristics &&)=default
 DirichletCharacteristics (const DirichletCharacteristics &)
DirichletCharacteristics & operator= (const DirichletCharacteristics &)
 DirichletCharacteristics (std::optional< std::unique_ptr< evolution::initial_data::InitialData > > analytic_prescription, bool copy_psi_from_interior)
 DirichletCharacteristics (CkMigrateMessage *msg)
 WRAPPED_PUPable_decl_base_template (domain::BoundaryConditions::BoundaryCondition, DirichletCharacteristics)
auto get_clone () const -> std::unique_ptr< domain::BoundaryConditions::BoundaryCondition > override
void pup (PUP::er &p) override
std::optional< std::string > dg_ghost (gsl::not_null< Scalar< DataVector > * > psi, gsl::not_null< Scalar< DataVector > * > pi, gsl::not_null< tnsr::i< DataVector, Dim, Frame::Inertial > * > phi, const std::optional< tnsr::I< DataVector, Dim, Frame::Inertial > > &face_mesh_velocity, const tnsr::i< DataVector, Dim, Frame::Inertial > &normal_covector, const Scalar< DataVector > &boundary_psi, const Scalar< DataVector > &interior_psi, const Scalar< DataVector > &interior_pi, const tnsr::i< DataVector, Dim, Frame::Inertial > &interior_phi, const tnsr::I< DataVector, Dim, Frame::Inertial > &coords, double time) const
std::optional< std::string > boundary_field_time_derivatives (gsl::not_null< Scalar< DataVector > * > dt_boundary_psi, const std::optional< tnsr::I< DataVector, Dim, Frame::Inertial > > &face_mesh_velocity, const tnsr::i< DataVector, Dim, Frame::Inertial > &normal_covector, const Scalar< DataVector > &boundary_psi, const Scalar< DataVector > &interior_pi, const tnsr::i< DataVector, Dim, Frame::Inertial > &interior_phi, const tnsr::I< DataVector, Dim, Frame::Inertial > &coords, double time) const
Public Member Functions inherited from SecondOrderScalarWave::BoundaryConditions::BoundaryCondition< Dim >
 BoundaryCondition (BoundaryCondition &&)=default
BoundaryCondition & operator= (BoundaryCondition &&)=default
 BoundaryCondition (const BoundaryCondition &)=default
BoundaryCondition & operator= (const BoundaryCondition &)=default
 BoundaryCondition (CkMigrateMessage *msg)
void pup (PUP::er &p) override
Public Member Functions inherited from domain::BoundaryConditions::BoundaryCondition
 BoundaryCondition (BoundaryCondition &&)=default
BoundaryCondition & operator= (BoundaryCondition &&)=default
 BoundaryCondition (const BoundaryCondition &)=default
BoundaryCondition & operator= (const BoundaryCondition &)=default
 BoundaryCondition (CkMigrateMessage *const msg)
 WRAPPED_PUPable_abstract (BoundaryCondition)

Static Public Attributes

static constexpr Options::String help
static constexpr evolution::BoundaryConditions::Type bc_type
static constexpr bool evolves_boundary_variables = true

Detailed Description

template<size_t Dim>
class SecondOrderScalarWave::BoundaryConditions::DirichletCharacteristics< Dim >

Sets boundary conditions using the characteristic decomposition: the incoming mode is set from analytic data, the outgoing and zero-speed modes from the interior.

If \(n^i\) is the outward pointing unit normal at the external boundary, the characteristic fields and their speeds are (see SecondOrderScalarWave::characteristic_fields):

  • \(v^+ = \Pi + n^i\Phi_i\): speed \(+1\) (outgoing, taken from the interior)
  • \(v^- = \Pi - n^i\Phi_i\): speed \(-1\) (incoming, taken from the analytic data, or set to zero if AnalyticPrescription is ZeroIncomingMode)
  • \(v^0_i\): speed \(0\) (taken from the interior)

The ghost \(\Pi\) and \(\Phi_i\) are reconstructed from these modes. The ghost \(\Psi\) by default is the boundary-evolved evolution::dg::Tags::BoundaryValue<Tags::Psi>, integrated per face using the interior evolution equation defined in boundary_field_time_derivatives. If CopyPsiFromInterior is true the ghost \(\Psi\) is instead the interior evolved \(\Psi\); the boundary value is still integrated but unused.

Moving meshes are not supported: the characteristic speeds are defined without a mesh velocity, so both member functions return an error if a face mesh velocity is supplied.

Member Typedef Documentation

◆ boundary_field_time_derivatives_evolved_variables_tags

template<size_t Dim>
using SecondOrderScalarWave::BoundaryConditions::DirichletCharacteristics< Dim >::boundary_field_time_derivatives_evolved_variables_tags
Initial value:
tmpl::list<Tags::Pi, Tags::Phi<Dim>>

◆ boundary_field_time_derivatives_temporary_tags

template<size_t Dim>
using SecondOrderScalarWave::BoundaryConditions::DirichletCharacteristics< Dim >::boundary_field_time_derivatives_temporary_tags
Initial value:
tmpl::list<domain::Tags::Coordinates<Dim, Frame::Inertial>>

◆ dg_interior_evolved_variables_tags

template<size_t Dim>
using SecondOrderScalarWave::BoundaryConditions::DirichletCharacteristics< Dim >::dg_interior_evolved_variables_tags
Initial value:
tmpl::list<Tags::Psi, Tags::Pi, Tags::Phi<Dim>>

◆ dg_interior_temporary_tags

template<size_t Dim>
using SecondOrderScalarWave::BoundaryConditions::DirichletCharacteristics< Dim >::dg_interior_temporary_tags
Initial value:
tmpl::list<domain::Tags::Coordinates<Dim, Frame::Inertial>>

Member Function Documentation

◆ get_clone()

Member Data Documentation

◆ bc_type

template<size_t Dim>
evolution::BoundaryConditions::Type SecondOrderScalarWave::BoundaryConditions::DirichletCharacteristics< Dim >::bc_type
staticconstexpr
Initial value:
=
evolution::BoundaryConditions::Type::Ghost

◆ help

Initial value:
{
"Analytic boundary condition using the characteristic decomposition. The "
"incoming mode is set from analytic data, the outgoing and zero-speed "
"modes copied from the interior. The evolved variable Pi and the "
"auxiliary variable Phi are reconstructed from the characteristic modes. "
"The ghost Psi is the boundary-evolved value if CopyPsiFromInterior is "
"false. Otherwise, the ghost Psi is copied from the interior."}

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