3from __future__
import annotations
5from .PDETerm
import PDETerm
11 The maximum absolute eigenvalue of the flux Jacobian in a given
12 direction, i.e. the spectral radius used by Rusanov-type numerical
13 fluxes and by the CFL-driven admissible time step size.
15 See python/exahype2/solvers/fv/riemann/kernels.py's eigenvalues(), which
16 returns the full eigenvalue vector L rather than just its maximum - this
17 new API deliberately asks for the reduced quantity solvers actually
18 need for their numerical flux, and reduces the legacy signature the
22 virtual void maxEigenvalue(
23 const double* __restrict__ Q, // Q[{{NUMBER_OF_UNKNOWNS}}+{{NUMBER_OF_AUXILIARY_VARIABLES}}]
24 const tarch::la::Vector<Dimensions, double>& x,
26 double* __restrict__ lambdaMax // lambdaMax[1]
33 "const double* __restrict__ Q, "
34 "const tarch::la::Vector<Dimensions, double>& x, "
36 "double* __restrict__ lambdaMax"
39 NAME =
"maxEigenvalue"
43 implementation: str =
None,
44 stateless: bool =
False,
49 A C++ snippet that becomes maxEigenvalue()'s body (the empty
50 string is a valid, generated no-op body), or None (the default)
51 to leave maxEigenvalue() pure virtual for you to implement by
52 hand. Don't add this term to a solver at all if it needs no
58 implementation=implementation,
65 MaxEigenvalue-specific code generation
67 Reuses PDETerm.Generator's declaration/definition/GPU-offload logic
68 as-is - MaxEigenvalue.SIGNATURE is picked up automatically. Declared
69 explicitly (rather than left to be inherited implicitly) for the
70 same reason as Flux.Generator: the obvious place to add
71 maxEigenvalue-specific generation behaviour later, and so
72 max_eigenvalue_term.generator reports its type as
73 MaxEigenvalue.Generator rather than the more generic PDETerm.Generator.
MaxEigenvalue-specific code generation.
The maximum absolute eigenvalue of the flux Jacobian in a given direction, i.e.
__init__(self, str implementation=None, bool stateless=False)
implementation: str A C++ snippet that becomes maxEigenvalue()'s body (the empty string is a valid,...
Turns a PDETerm into the C++ text for its generated method: exactly one method - the static,...
Represents one named, point-wise PDE operator that a solver exposes for the user to implement: a C++ ...