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
 __init__ (self, str name, str implementation=None, bool stateless=False)
 name: str The C++ method name, e.g.
str __repr__ (self)
str __str__ (self)
"PDETerm.Generator" generator_for (self, solver)
 Code generator for this term within a solver, i.e.
"PDETerm.Generator" generator (self)
 Code generator for this term: an instance of this term's own (possibly subclass-specific) Generator.

Data Fields

 origin = None if origin is None else [float(x) for x in origin]
 The origin with one entry per dimension.
Data Fields inherited from exahype2.api.PDETerm.PDETerm
 name = name
 implementation = implementation
 stateless = stateless

Static Public Attributes

tuple SIGNATURE
str NAME = "sommerfeldFarFieldSolution"

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 an exahype2.api.MaxEigenvalue term. The wave speed does not need any solver state, so the boundary conditions use the stateless variant of the term if the solver holds one, and the variant with state otherwise (

See also
exahype2.api.blockstructured.BoundaryConditions.get_max_eigenvalue_term_for_sommerfeld()). 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.

Definition at line 64 of file SommerfeldBoundaryConditions.py.

References __init__(), exahype2.api.blockstructured.DirichletBoundaryConditions.DirichletBoundaryConditions.NAME, and NAME.

Referenced by __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 93 of file SommerfeldBoundaryConditions.py.

References origin.

Field Documentation

◆ NAME

◆ origin

exahype2.api.blockstructured.SommerfeldBoundaryConditions.SommerfeldBoundaryConditions.origin = None if origin is None else [float(x) for x in origin]

The origin with one entry per dimension.

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

Definition at line 91 of file SommerfeldBoundaryConditions.py.

Referenced by 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 58 of file SommerfeldBoundaryConditions.py.


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