Peano
Loading...
Searching...
No Matches
exahype2.api.blockstructured.SommerfeldBoundaryConditions.SommerfeldBoundaryConditions Class Reference

Sommerfeld (radiative, outgoing) boundary conditions: waves leave the domain with little reflection, and the solution approaches a far-field solution towards infinity. More...

Inheritance diagram for exahype2.api.blockstructured.SommerfeldBoundaryConditions.SommerfeldBoundaryConditions:
Collaboration diagram for exahype2.api.blockstructured.SommerfeldBoundaryConditions.SommerfeldBoundaryConditions:

Data Structures

class  Generator
 SommerfeldBoundaryConditions-specific code generation. More...
 

Public Member Functions

 __init__ (self, str implementation=None, Sequence[float] origin=None, bool stateless=False)
 
 get_origin (self, int dimensions)
 The origin with one entry per dimension.
 
- Public Member Functions inherited from exahype2.api.PDETerm.PDETerm
str __repr__ (self)
 
str __str__ (self)
 
"PDETerm.Generator" generator (self)
 Code generator for this term: an instance of this term's own (possibly subclass-specific) Generator.
 

Data Fields

 origin
 The origin with one entry per dimension.
 
- Data Fields inherited from exahype2.api.PDETerm.PDETerm
 name
 
 implementation
 
 stateless
 

Static Public Attributes

tuple SIGNATURE
 
str NAME = "sommerfeldFarFieldSolution"
 
- Static Public Attributes inherited from exahype2.api.PDETerm.PDETerm
str NAME
 
str SIGNATURE
 

Detailed Description

Sommerfeld (radiative, outgoing) boundary conditions: waves leave the domain with little reflection, and the solution approaches a far-field solution towards infinity.

The term is an alternative to exahype2.api.DirichletBoundaryConditions. exahype2::blockstructured::applySommerfeldBoundaryConditions() documents the conditions, their discretisation, and how block-structured schemes realise them. The user specifies the far-field solution \( u_\\infty \):

virtual void sommerfeldFarFieldSolution(
const tarch::la::Vector<Dimensions, double>& x,
double* __restrict__ Q // Q[{{NUMBER_OF_UNKNOWNS}}+{{NUMBER_OF_AUXILIARY_VARIABLES}}]
);

Only the first NUMBER_OF_UNKNOWNS entries of Q are read, i.e. the implementation does not have to set the auxiliary variables.

The wave speed is the solver's maximum eigenvalue along the face normal, i.e. the solver has to hold a non-stateless exahype2.api.MaxEigenvalue term. The ghost cells are initialised with the initial condition (exahype2.api.InitPointWisely) before the first time step.

Different to Dirichlet conditions, there is no separate boundary task in the time step. The Sommerfeld update replaces the roll over of the face data instead (

See also
exahype2.api.fv.actionsets.RollOverUpdatedFaceWithSommerfeldBoundaryConditions and exahype2.api.rkfd4.actionsets.RollOverUpdatedFaceWithSommerfeldBoundaryConditions). Runge-Kutta schemes accept the term only if the time stamps of their stages do not decrease.

A solver needs a boundary condition term if and only if at least one axis of the domain is not periodic (

See also
exahype2.api.blockstructured.BoundaryConditions.get_boundary_conditions()).

Only the non-stateless variant is supported, i.e. the term has to be added with stateless=False.

Definition at line 10 of file SommerfeldBoundaryConditions.py.

Constructor & Destructor Documentation

◆ __init__()

exahype2.api.blockstructured.SommerfeldBoundaryConditions.SommerfeldBoundaryConditions.__init__ (   self,
str   implementation = None,
Sequence[float]   origin = None,
bool   stateless = False 
)
Parameters
implementationstr A C++ snippet that becomes sommerfeldFarFieldSolution()'s body, or None (the default) to leave sommerfeldFarFieldSolution() pure virtual for you to implement by hand.
originSequence[float] Centre of the system, i.e. the point the outgoing spherical waves emanate from. One entry per dimension. None (the default) is the origin of the coordinate system.
statelessbool Has to be False,
See also
the class documentation.

Reimplemented from exahype2.api.PDETerm.PDETerm.

Definition at line 61 of file SommerfeldBoundaryConditions.py.

References exahype2.api.blockstructured.SommerfeldBoundaryConditions.SommerfeldBoundaryConditions.__init__(), exahype2.api.blockstructured.DirichletBoundaryConditions.DirichletBoundaryConditions.NAME, exahype2.api.blockstructured.SommerfeldBoundaryConditions.SommerfeldBoundaryConditions.NAME, exahype2.api.Flux.Flux.NAME, exahype2.api.GradientRefinement.GradientRefinement.NAME, exahype2.api.InitPointWisely.InitPointWisely.NAME, exahype2.api.MassMatrix.MassMatrix.NAME, exahype2.api.MaxEigenvalue.MaxEigenvalue.NAME, exahype2.api.NonconservativeProduct.NonconservativeProduct.NAME, exahype2.api.PDETerm.PDETerm.NAME, exahype2.api.PointSource.PointSource.NAME, exahype2.api.RefineErasePointwisely.RefineErasePointwisely.NAME, and exahype2.api.VolumetricSource.VolumetricSource.NAME.

Referenced by exahype2.api.blockstructured.SommerfeldBoundaryConditions.SommerfeldBoundaryConditions.__init__().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ get_origin()

exahype2.api.blockstructured.SommerfeldBoundaryConditions.SommerfeldBoundaryConditions.get_origin (   self,
int  dimensions 
)

The origin with one entry per dimension.

Parameters
dimensionsint Number of dimensions of the domain.
Returns
List[float]

Definition at line 90 of file SommerfeldBoundaryConditions.py.

References exahype2.api.blockstructured.SommerfeldBoundaryConditions.SommerfeldBoundaryConditions.origin.

Field Documentation

◆ NAME

◆ origin

exahype2.api.blockstructured.SommerfeldBoundaryConditions.SommerfeldBoundaryConditions.origin

The origin with one entry per dimension.

Parameters
dimensionsint Number of dimensions of the domain.
Returns
List[float]

Definition at line 88 of file SommerfeldBoundaryConditions.py.

Referenced by exahype2.api.blockstructured.SommerfeldBoundaryConditions.SommerfeldBoundaryConditions.get_origin().

◆ SIGNATURE

tuple exahype2.api.blockstructured.SommerfeldBoundaryConditions.SommerfeldBoundaryConditions.SIGNATURE
static
Initial value:
= (
"const tarch::la::Vector<Dimensions, double>& x, " "double* __restrict__ Q"
)

Definition at line 55 of file SommerfeldBoundaryConditions.py.


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