Peano 4
Loading...
Searching...
No Matches
exahype2::dg::laxfriedrichs Namespace Reference

Functions

void solveRiemannProblem_pointwise_in_situ (::exahype2::dg::Flux flux, ::exahype2::dg::NonConservativeProduct ncp, const tarch::la::Vector< Dimensions, double > &faceCentre, const tarch::la::Vector< Dimensions, double > &cellSize, double t, double dt, int order, int unknowns, int auxiliaryVariables, int faceNumber, const double *__restrict__ quadraturePoints, bool useFlux, bool useNcp, const double *__restrict__ projectedValues, double *__restrict__ solution)
 Solve Riemann problem on face.
 
static void cellIntegral_patchwise_in_situ_GaussLegendre_functors (::exahype2::CellData &cellData, const int order, const int unknowns, const int auxiliaryVariables, Flux flux, NonConservativeProduct nonConservativeProduct, Source source, PointSources pointSources, const double *__restrict__ QuadratureNodes1d, const double *__restrict__ MassMatrixDiagonal1d, const double *__restrict__ StiffnessMatrix1d, const double *__restrict__ DerivativeOperator1d, bool evaluateFlux, bool evaluateNonconservativeProduct, bool evaluateSource, bool evaluatePointSources)
 Delegate to generic implementation in parent directory.
 
static void multiplyWithInvertedMassMatrix_GaussLegendre (::exahype2::CellData &cellData, const int order, const int unknowns, const int auxiliaryVariables, const double *__restrict__ MassMatrixDiagonal1d)
 Delegate to generic implementation.
 
static void integrateOverRiemannSolutionsAndAddToVolume_GaussLegendre (const double *const __restrict__ faceQLeft, const double *const __restrict__ faceQRight, const double *const __restrict__ faceQBottom, const double *const __restrict__ faceQUp, int order, int unknowns, const int auxiliaryVariables, const tarch::la::Vector< 2, double > &cellSize, const double *const __restrict__ BasisFunctionValuesLeft, const double *__restrict__ MassMatrixDiagonal1d, double *__restrict__ cellQ)
 Delegate to generic implementation.
 
static void integrateOverRiemannSolutionsAndAddToVolume_GaussLegendre (const double *const __restrict__ faceQLeft, const double *const __restrict__ faceQRight, const double *const __restrict__ faceQBottom, const double *const __restrict__ faceQUp, const double *const __restrict__ faceQFront, const double *const __restrict__ faceQBack, int order, int unknowns, const int auxiliaryVariables, const tarch::la::Vector< 3, double > &cellSize, const double *const __restrict__ BasisFunctionValuesLeft, const double *__restrict__ MassMatrixDiagonal1d, double *__restrict__ cellQ)
 Delegate to generic implementation.
 
template<typename Solver , int order, int unknowns, int auxiliaryVariables>
void cellIntegral_patchwise_in_situ_GaussLegendre (::exahype2::CellData &cellData, bool evaluateFlux, bool evaluateNonconservativeProduct, bool evaluateSource, bool evaluatePointSources)
 

Function Documentation

◆ cellIntegral_patchwise_in_situ_GaussLegendre()

template<typename Solver , int order, int unknowns, int auxiliaryVariables>
void exahype2::dg::laxfriedrichs::cellIntegral_patchwise_in_situ_GaussLegendre ( ::exahype2::CellData & cellData,
bool evaluateFlux,
bool evaluateNonconservativeProduct,
bool evaluateSource,
bool evaluatePointSources )

Definition at line 243 of file LaxFriedrichs.h.

◆ cellIntegral_patchwise_in_situ_GaussLegendre_functors()

static void exahype2::dg::laxfriedrichs::cellIntegral_patchwise_in_situ_GaussLegendre_functors ( ::exahype2::CellData & cellData,
const int order,
const int unknowns,
const int auxiliaryVariables,
Flux flux,
NonConservativeProduct nonConservativeProduct,
Source source,
PointSources pointSources,
const double *__restrict__ QuadratureNodes1d,
const double *__restrict__ MassMatrixDiagonal1d,
const double *__restrict__ StiffnessMatrix1d,
const double *__restrict__ DerivativeOperator1d,
bool evaluateFlux,
bool evaluateNonconservativeProduct,
bool evaluateSource,
bool evaluatePointSources )
static

Delegate to generic implementation in parent directory.

static keyword required to avoid multiple definition linker errors.

Definition at line 127 of file LaxFriedrichs.h.

References exahype2::dg::cellIntegral_patchwise_in_situ_GaussLegendre_functors().

Here is the call graph for this function:

◆ integrateOverRiemannSolutionsAndAddToVolume_GaussLegendre() [1/2]

static void exahype2::dg::laxfriedrichs::integrateOverRiemannSolutionsAndAddToVolume_GaussLegendre ( const double *const __restrict__ faceQLeft,
const double *const __restrict__ faceQRight,
const double *const __restrict__ faceQBottom,
const double *const __restrict__ faceQUp,
const double *const __restrict__ faceQFront,
const double *const __restrict__ faceQBack,
int order,
int unknowns,
const int auxiliaryVariables,
const tarch::la::Vector< 3, double > & cellSize,
const double *const __restrict__ BasisFunctionValuesLeft,
const double *__restrict__ MassMatrixDiagonal1d,
double *__restrict__ cellQ )
static

Delegate to generic implementation.

static keyword required to avoid multiple definition linker errors.

Definition at line 211 of file LaxFriedrichs.h.

References exahype2::dg::integrateOverRiemannSolutionsAndAddToVolume_GaussLegendre().

Here is the call graph for this function:

◆ integrateOverRiemannSolutionsAndAddToVolume_GaussLegendre() [2/2]

static void exahype2::dg::laxfriedrichs::integrateOverRiemannSolutionsAndAddToVolume_GaussLegendre ( const double *const __restrict__ faceQLeft,
const double *const __restrict__ faceQRight,
const double *const __restrict__ faceQBottom,
const double *const __restrict__ faceQUp,
int order,
int unknowns,
const int auxiliaryVariables,
const tarch::la::Vector< 2, double > & cellSize,
const double *const __restrict__ BasisFunctionValuesLeft,
const double *__restrict__ MassMatrixDiagonal1d,
double *__restrict__ cellQ )
static

Delegate to generic implementation.

static keyword required to avoid multiple definition linker errors.

Definition at line 182 of file LaxFriedrichs.h.

References exahype2::dg::integrateOverRiemannSolutionsAndAddToVolume_GaussLegendre().

Here is the call graph for this function:

◆ multiplyWithInvertedMassMatrix_GaussLegendre()

static void exahype2::dg::laxfriedrichs::multiplyWithInvertedMassMatrix_GaussLegendre ( ::exahype2::CellData & cellData,
const int order,
const int unknowns,
const int auxiliaryVariables,
const double *__restrict__ MassMatrixDiagonal1d )
static

Delegate to generic implementation.

static keyword required to avoid multiple definition linker errors.

Definition at line 163 of file LaxFriedrichs.h.

References exahype2::dg::multiplyWithInvertedMassMatrix_GaussLegendre().

Here is the call graph for this function:

◆ solveRiemannProblem_pointwise_in_situ()

void exahype2::dg::laxfriedrichs::solveRiemannProblem_pointwise_in_situ ( ::exahype2::dg::Flux flux,
::exahype2::dg::NonConservativeProduct ncp,
const tarch::la::Vector< Dimensions, double > & faceCentre,
const tarch::la::Vector< Dimensions, double > & cellSize,
double t,
double dt,
int order,
int unknowns,
int auxiliaryVariables,
int faceNumber,
const double *__restrict__ quadraturePoints,
bool useFlux,
bool useNcp,
const double *__restrict__ projectedValues,
double *__restrict__ solution )

Solve Riemann problem on face.

This routine solves the Riemann problem on one face employing the Lax-Friedrichs flux:

\( F(Q) \approx \frac{1}{2}\Big( F(Q^-) + F(Q^+) \Big) - \frac{h}{2 \Delta T} \Big( Q^+ - Q^- \Big) \)

where the h is the size of the adjacent cells.

Please consult the Rusanov Riemann solver as well. Rusanov is basically a Lax-Friedrichs flux, where the damping is controlled by the maximum eigenvalue and thus adopts to the problem characteristics.

The implementation is purely point-wise, i.e. we run over the quadrature points and use Rusanov per point. It is not clear if this is reasonable in all cases. It might be better for example to determine the max eigenvalue per face once and then update all quadrature point subject to this one eigenvalue.

Implementation details

The DoFs per face are ordered in standard Peano order:

    2 3
    0 1

2 3 [ o o ] 2 3 0 1 [ o o ] 0 1 2 3 0 1

The lrEnumerator is used for quantities that we evaluate right and left of the face. The faceEnumerator is for data that we evalutate directly on the face.

Sign discussion

We rely on the formulation as discussed on the page Discontinuous Galerkin. See dg.h or the doxygen html pages for details. I also recommend to read through the documentation of cellIntegral_patchwise_in_situ_GaussLegendre_functors() before we dive into the discussion. After reading the statements there, the following rationale should make sense and can be compared to the volumetric statements:

  • There is no source term.
  • We have an artificial damping parameter depending on the maximum eigenvalue. This term enters the Rusanov equation with a minus. However, it is multiplied with the normal and then we finally have to bring is to the right-hand side of the equation where the source term can be found. Different to other solvers, this routine solves the Riemann problem for the left and right adjacent cell in one go. The flux always is aligned with the coordinate axis. So the solution enters the left cell with a minus from damping, and a minus from bringing it to the right-hand side. So for the left side, we get a plus. For the right side, we get an additional minus, as we have an inflow in the opposite direction to the right adjacent cell's normal.
  • The flux term discussion follows the discussion of the damping. Hoewer, the flux term does not have a minus in the original formulation. It is a simple average. Therefore the signs are exactly swapped compared to the eigenvalues.
  • The ncp is nasty. Please consult the generic DG documentation and maybe also the write-up of the Finite Volume discretisation. Anyway, it is important to note that the ncp yields non-symmetric terms, i.e. the flow into the left cell is minus the flow into the right cell. However, these two terms are still subject to the multiplication with the normal and we thus have the same ncp contribution to both left and right result.

Definition at line 7 of file LaxFriedrichs.cpp.

References dfore.