Peano
Loading...
Searching...
No Matches
exahype2.api.Flux.Flux Class Reference

The conservative flux F(Q) of a hyperbolic PDE. More...

Inheritance diagram for exahype2.api.Flux.Flux:
Collaboration diagram for exahype2.api.Flux.Flux:

Data Structures

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

Public Member Functions

 __init__ (self, str implementation=None, bool stateless=False)
 implementation: str A C++ snippet that becomes flux()'s body (the empty string is a valid, generated no-op body), or None (the default) to leave flux() pure virtual for you to implement by hand.
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.

Static Public Attributes

tuple SIGNATURE
str NAME = "flux"

Additional Inherited Members

Data Fields inherited from exahype2.api.PDETerm.PDETerm
 name = name
 implementation = implementation
 stateless = stateless

Detailed Description

The conservative flux F(Q) of a hyperbolic PDE.

See python/exahype2/solvers/fv/riemann/kernels.py for the legacy equivalent, which additionally threads h/t/dt through the signature. This new API's flux() is, for now, deliberately reduced to

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

h/t/dt will return once PDE terms are tied to real C code snippets with proper signatures; until then every term merely gets position, normal (where physically meaningful) and its input/output.

Q holds the unknowns, and so does the output F. Auxiliary variables are not subject to the hyperbolic formulation. If the solver has any, a pointer to each set follows right behind Q (exahype2.api.AuxiliaryVariables).

Definition at line 8 of file Flux.py.

Constructor & Destructor Documentation

◆ __init__()

exahype2.api.Flux.Flux.__init__ ( self,
str implementation = None,
bool stateless = False )

implementation: str A C++ snippet that becomes flux()'s body (the empty string is a valid, generated no-op body), or None (the default) to leave flux() pure virtual for you to implement by hand.

Don't add this term to a solver at all if the PDE has no flux contribution.

Definition at line 45 of file Flux.py.

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

Referenced by __init__().

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

Field Documentation

◆ NAME

◆ SIGNATURE

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

Definition at line 36 of file Flux.py.


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