Peano 4
Loading...
Searching...
No Matches
exahype2::fd::fd4 Namespace Reference

Namespaces

namespace  internal
 
namespace  omp
 

Enumerations

enum class  DifferentialSourceTermVariant { CentralDifferences , CentralDifferencesWithLopsidedAdvection , CentralDifferencesWithLimiter , CentralDifferencesWithLimiterAndLopsidedAdvection }
 

Functions

void timeStep_patchwise_heap_functors (::exahype2::CellData &patchData, int numberOfGridCellsPerPatchPerAxis, int haloSize, int unknowns, int auxiliaryVariables, double KOSigma, bool evaluateFlux, bool evaluateDifferentialSource, bool evaluateAlgebraicSource, bool copyOldTimeStepAndScaleWithTimeStepSize, DifferentialSourceTermVariant variant, Flux flux, NonconservativeProduct DifferentialSource, Source AlgebraicSource)
 Fourth-order Finite Differences.
 
void reconstruct_first_derivatives (::exahype2::CellData &patchData, int numberOfGridCellsPerPatchPerAxis, int haloSize, int unknowns, int auxiliaryVariables)
 Helper routine to reconstruct the first derivatives.
 
template<typename Solver , int numberOfGridCellsPerPatchPerAxis, int haloSize, int unknowns, int auxiliaryVariables, typename TempDataEnumerator >
static void timeStep_batched_heap_static_calls (::exahype2::CellData &patchData, double KOSigma, bool evaluateFlux, bool evaluateDifferentialSource, bool evaluateAlgebraicSource, bool copyOldTimeStepAndScaleWithTimeStepSize, DifferentialSourceTermVariant variant)
 
template<typename Solver , int numberOfGridCellsPerPatchPerAxis, int haloSize, int unknowns, int auxiliaryVariables, typename TempDataEnumerator >
static void timeStep_patchwise_heap_static_calls (::exahype2::CellData &patchData, double KOSigma, bool evaluateFlux, bool evaluateDifferentialSource, bool evaluateAlgebraicSource, bool copyOldTimeStepAndScaleWithTimeStepSize, DifferentialSourceTermVariant variant)
 
template<typename Solver , int numberOfGridCellsPerPatchPerAxis, int haloSize, int unknowns, int auxiliaryVariables, typename TempDataEnumerator >
static void timeStep_batched_heap_multicore_static_calls (::exahype2::CellData &patchData, double KOSigma, bool evaluateFlux, bool evaluateDifferentialSource, bool evaluateAlgebraicSource, bool copyOldTimeStepAndScaleWithTimeStepSize, DifferentialSourceTermVariant variant)
 

Enumeration Type Documentation

◆ DifferentialSourceTermVariant

Enumerator
CentralDifferences 
CentralDifferencesWithLopsidedAdvection 
CentralDifferencesWithLimiter 
CentralDifferencesWithLimiterAndLopsidedAdvection 

Definition at line 10 of file KernelVariants.h.

Function Documentation

◆ reconstruct_first_derivatives()

void exahype2::fd::fd4::reconstruct_first_derivatives ( ::exahype2::CellData & patchData,
int numberOfGridCellsPerPatchPerAxis,
int haloSize,
int unknowns,
int auxiliaryVariables )

Helper routine to reconstruct the first derivatives.

This operation computes the first derivatives over a patch due to

@Han Your call

Parameters
patchDataContainer for the actual data. The pointer to old data points to the patch data plus its halo of size haloSize. The new pointer is to be befilled, i.e. it contains garbage by default. The fields timeStamp and timeStepSize here are not used, so you can set them to anything you like. The function doesn't care.

Definition at line 629 of file FD4_patchwise_functors.cpp.

References _log, assertionEquals, exahype2::CellData::cellCentre, exahype2::CellData::cellSize, exahype2::fd::internal::copySolution_LoopBody(), exahype2::CellData::numberOfCells, exahype2::CellData::QIn, and exahype2::CellData::QOut.

Here is the call graph for this function:

◆ timeStep_batched_heap_multicore_static_calls()

template<typename Solver , int numberOfGridCellsPerPatchPerAxis, int haloSize, int unknowns, int auxiliaryVariables, typename TempDataEnumerator >
static void exahype2::fd::fd4::timeStep_batched_heap_multicore_static_calls ( ::exahype2::CellData & patchData,
double KOSigma,
bool evaluateFlux,
bool evaluateDifferentialSource,
bool evaluateAlgebraicSource,
bool copyOldTimeStepAndScaleWithTimeStepSize,
DifferentialSourceTermVariant variant )
static

◆ timeStep_batched_heap_static_calls()

template<typename Solver , int numberOfGridCellsPerPatchPerAxis, int haloSize, int unknowns, int auxiliaryVariables, typename TempDataEnumerator >
static void exahype2::fd::fd4::timeStep_batched_heap_static_calls ( ::exahype2::CellData & patchData,
double KOSigma,
bool evaluateFlux,
bool evaluateDifferentialSource,
bool evaluateAlgebraicSource,
bool copyOldTimeStepAndScaleWithTimeStepSize,
DifferentialSourceTermVariant variant )
static

◆ timeStep_patchwise_heap_functors()

void exahype2::fd::fd4::timeStep_patchwise_heap_functors ( ::exahype2::CellData & patchData,
int numberOfGridCellsPerPatchPerAxis,
int haloSize,
int unknowns,
int auxiliaryVariables,
double KOSigma,
bool evaluateFlux,
bool evaluateDifferentialSource,
bool evaluateAlgebraicSource,
bool copyOldTimeStepAndScaleWithTimeStepSize,
DifferentialSourceTermVariant variant,
Flux flux,
NonconservativeProduct DifferentialSource,
Source AlgebraicSource )

Fourth-order Finite Differences.

This routine relies on the fact that we have a halo size of 3.

Enumerators

The enumerators span only one patch each, as we run through the patches one by one. It is important to recognise that the input enumerator creates indices over an array which holds auxiliary (material) parameters, while the output does not hold auxiliary ones. It solely holds the fluxes of the unknowns which are evolved according to the PDE.

Both input and output enumerator use AoS ordering.

Comparison to other solvers

Compared to the Finite Differences solver, this routine does not accept any eigenvalue. On the one hand, this is clear, as the finite differences formulation per se does not require an eigenvalue within the discretisation. On the other hand, it is important to keep in mind that the routine is used within a Runge-Kutta context, where the eigenvalue is required for adaptive time stepping after the last Runge-Kutta step, when we have actually computed the new solution. For this reason, it makes sense to outsource the eigenvalue computation to a routine of its own. Compuare to reduceMaxEigenvalue_patchwise_functors() for some details.

Arguments

Parameters
copyOldTimeStepAndScaleWithTimeStepSizeThe routine can be used in two ways: Either for a classic explicit Euler or in a Runge-Kutta context. For the latter, we evaluate the outcome of the right-hand side of an ODE formulation \( \partial _t Q(t) = F(t) \), i.e. we store the F. In an Euler context, we evaluate F, too, but then immediately scale it with the time step size and add the original time step's data. We copy stuff over.
KOSigmaPenalty term for the sixth order derivative. Scales the Kreiss Oliger dissipation. If you set it to 0.0, the term is not evaluated at all.

Definition at line 9 of file FD4_patchwise_functors.cpp.

References _log, exahype2::fd::internal::addAlgebraicSourceTerm_LoopBody(), assertionEquals, exahype2::CellData::cellCentre, exahype2::CellData::cellSize, exahype2::fd::internal::clearSolution_LoopBody(), exahype2::fd::internal::copySolution_LoopBody(), exahype2::CellData::dt, tarch::freeMemory(), tarch::Heap, logDebug, exahype2::CellData::numberOfCells, exahype2::CellData::QIn, exahype2::CellData::QOut, exahype2::enumerator::AoSLexicographicEnumerator::size(), and exahype2::CellData::t.

Here is the call graph for this function:

◆ timeStep_patchwise_heap_static_calls()

template<typename Solver , int numberOfGridCellsPerPatchPerAxis, int haloSize, int unknowns, int auxiliaryVariables, typename TempDataEnumerator >
static void exahype2::fd::fd4::timeStep_patchwise_heap_static_calls ( ::exahype2::CellData & patchData,
double KOSigma,
bool evaluateFlux,
bool evaluateDifferentialSource,
bool evaluateAlgebraicSource,
bool copyOldTimeStepAndScaleWithTimeStepSize,
DifferentialSourceTermVariant variant )
static