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
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.
 

Static Public Attributes

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

Additional Inherited Members

- Data Fields inherited from exahype2.api.PDETerm.PDETerm
 name
 
 implementation
 
 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 unknowns+auxiliary_variables entries, whereas the output F only holds unknowns entries: only the actual unknowns are subject to the hyperbolic formulation, auxiliary variables are not.

Definition at line 8 of file Flux.py.

Constructor & Destructor Documentation

◆ __init__()

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

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: