|
template<int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovPatchwiseHeapFunctors (CellData< double, double > &patchData, const FluxFunctor &fluxFunctor, const NonconservativeProductFunctor &nonconservativeProductFunctor, const SourceFunctor &sourceFunctor, const MaxEigenvalueFunctor &maxEigenvalueFunctor, tarch::timing::Measurement &measurement, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
| Apply the Rusanov Riemann solver over a set of patches.
|
|
template<int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovPatchwiseHeapFunctors (CellData< double, double > &patchData, const FluxFunctor &fluxFunctor, const NonconservativeProductFunctor &nonconservativeProductFunctor, const SourceFunctor &sourceFunctor, const MaxEigenvalueFunctor &maxEigenvalueFunctor, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovBatchedHeapFunctors (CellData< double, double > &patchData, const FluxFunctor &fluxFunctor, const NonconservativeProductFunctor &nonconservativeProductFunctor, const SourceFunctor &sourceFunctor, const MaxEigenvalueFunctor &maxEigenvalueFunctor, tarch::timing::Measurement &measurement, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovBatchedHeapFunctors (CellData< double, double > &patchData, const FluxFunctor &fluxFunctor, const NonconservativeProductFunctor &nonconservativeProductFunctor, const SourceFunctor &sourceFunctor, const MaxEigenvalueFunctor &maxEigenvalueFunctor, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovVolumewiseFunctors (CellData< double, double > &patchData, const FluxFunctor &fluxFunctor, const NonconservativeProductFunctor &nonconservativeProductFunctor, const SourceFunctor &sourceFunctor, const MaxEigenvalueFunctor &maxEigenvalueFunctor, tarch::timing::Measurement &measurement, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovVolumewiseFunctors (CellData< double, double > &patchData, const FluxFunctor &fluxFunctor, const NonconservativeProductFunctor &nonconservativeProductFunctor, const SourceFunctor &sourceFunctor, const MaxEigenvalueFunctor &maxEigenvalueFunctor, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<class SolverType , int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovPatchwiseCallStackStateless (CellData< double, double > &patchData, tarch::timing::Measurement &measurement, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<class SolverType , int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovPatchwiseCallStackStateless (CellData< double, double > &patchData, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<class SolverType , int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovPatchwiseHeapStateless (CellData< double, double > &patchData, tarch::timing::Measurement &measurement, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<class SolverType , int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovPatchwiseHeapStateless (CellData< double, double > &patchData, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<class SolverType , int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep> |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovPatchwiseInsituStateless (CellData< double, double > &patchData, tarch::timing::Measurement &measurement, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<class SolverType , int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep> |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovPatchwiseInsituStateless (CellData< double, double > &patchData, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<class SolverType , int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep> |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovBatchedInsituStateless (CellData< double, double > &patchData, tarch::timing::Measurement &measurement, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<class SolverType , int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep> |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovBatchedInsituStateless (CellData< double, double > &patchData, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<class SolverType , int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovBatchedCallStackStateless (CellData< double, double > &patchData, tarch::timing::Measurement &measurement, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<class SolverType , int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovBatchedCallStackStateless (CellData< double, double > &patchData, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<class SolverType , int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovBatchedHeapStateless (::exahype2::CellData< double, double > &patchData, tarch::timing::Measurement &measurement, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<class SolverType , int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovBatchedHeapStateless (::exahype2::CellData< double, double > &patchData, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<class SolverType , int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovVolumewiseStateless (::exahype2::CellData< double, double > &patchData, tarch::timing::Measurement &measurement, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<class SolverType , int NumberOfVolumesPerAxisInPatch, int HaloSize, int NumberOfUnknowns, int NumberOfAuxiliaryVariables, bool EvaluateFlux, bool EvaluateNonconservativeProduct, bool EvaluateSource, bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType > |
KeywordToAvoidDuplicateSymbolsForInlinedFunctions void | timeStepWithRusanovVolumewiseStateless (::exahype2::CellData< double, double > &patchData, peano4::utils::LoopPlacement loopParallelism=peano4::utils::LoopPlacement::Serial) InlineMethod |
|
template<
int NumberOfVolumesPerAxisInPatch,
int HaloSize,
int NumberOfUnknowns,
int NumberOfAuxiliaryVariables,
bool EvaluateFlux,
bool EvaluateNonconservativeProduct,
bool EvaluateSource,
bool EvaluateMaximumEigenvalueAfterTimeStep, class TempDataEnumeratorType >
Apply the Rusanov Riemann solver over a set of patches.
Here's the explanation of the implementation details marked via _subscript:
_patchwise: This solver runs through the individual patches one by one. All the operations on patch 0 are completed, then we trigger all steps on patch 1, and so forth.
_batched: We run through the individual steps of the finite volume update, and in each step we complete the work on all the patches handed in.
There are two variants of the kernels: One that accepts a functor, and one that works with the solver object and involves the static (stateless) PDE term variants. Both are annotated with Otter pragmas, so you can find out how much parallelism there is.
Implementation details (signatures)
The function is marked as stateless and put into a header file. I still want to separate the declaration from the definition, so the actual implementation is in a file with the extension cpph. This indicates that it should (logically) be in a cpp file, but to allow the compiler to inline aggressively, it has to be in the header.
Please study the comments on the namespace loopbodies (hosted in LoopBodies.h) for further details why certain code parts are written the way they are written. The punchline is that the routines here host the loops, but the actual loop bodies then are separated into routines of their own. We inline them aggressively, so that doesn't come at additional cost. This way, we can re-use the same loop body within different loop implementations, orderings, etc.
Vectorisation
Most of the time, I discuss within the individual loop bodies how to vectorise and what things have to be taken into account. That is, the knowledge around optimisation is documented with the corresponding loop bodies. There is one exception:
If I evaluate the fluxes, I have to take into account that diagonal volumes don't hold valid data. After all, we only use split or face-normal fluxes, but do not support transversal waves. So we should mask out those diagonal volumes and should not compute anything on them. Indeed, some applications use assertions to ensure that their user functions are not invoked on uninitialised data and then fail. Unfortunately, such a mask stops the vectoriser from doing its job, as the control flow simply becomes too complicated. So I enable the masking if and only if I am not in release mode.
Memory management
See ::exahype2::CellData() for details
Headers vs. implementation files
This should be a proper routine (and thus not static). But I decided to make it consistent with the templates for the static evaluation and to move the routine into the header, too. The advantage is that the compiler now cans inline routines straightforwardly without any ipo.
Next, all the integers and booleans are known. So, once inlined, the compiler can trivialise the compute kernel and perform vectorisation et al even though we have functors which can not trivially be inlined and optimised.
Referenced by wrapPatchwiseHeapFunctorsHostKernel().