18 namespace musclhancock {
22 #if defined(SharedOMP) and (!defined(__INTEL_LLVM_COMPILER) or !defined(GPUOffloadingOMP))
23 #pragma omp declare simd
25 #if defined(GPUOffloadingOMP)
26 #pragma omp declare target
28 template <
class QInEnumeratorType,
class QOutEnumeratorType>
30 const double* __restrict__ QIn,
31 const QInEnumeratorType& QInEnumerator,
35 double* __restrict__ QOut,
36 const QOutEnumeratorType& QOutEnumerator
38 #if defined(GPUOffloadingOMP)
39 #pragma omp end declare target
42 template <
class QInEnumeratorType,
class QInterEnumeratorType>
44 const double* __restrict__ QIn,
45 const QInEnumeratorType QInEnumerator,
55 double* __restrict__ timederivative,
56 QInterEnumeratorType QInterEnumerator
59 template <
class QInEnumeratorType,
class QInterEnumeratorType>
61 const double* __restrict__ QIn,
62 const QInEnumeratorType QInEnumerator,
69 double* __restrict__ timederivative,
70 double* __restrict__ QfaceXneg,
71 double* __restrict__ QfaceXpos,
72 double* __restrict__ QfaceYneg,
73 double* __restrict__ QfaceYpos,
74 double* __restrict__ QfaceZneg,
75 double* __restrict__ QfaceZpos,
76 QInterEnumeratorType QInterEnumerator
79 template <
class QInEnumeratorType,
class QMaxEigenvalueEnumeratorType>
81 const double* __restrict__ QIn,
82 QInEnumeratorType QInEnumerator,
91 double* __restrict__ QMaxEigenvalue,
92 QMaxEigenvalueEnumeratorType QMaxEigenvalueEnumerator
95 #if defined(SharedOMP) and (!defined(__INTEL_LLVM_COMPILER) or !defined(GPUOffloadingOMP))
96 #pragma omp declare simd
98 #if defined(GPUOffloadingOMP)
99 #pragma omp declare target
101 template <
typename QInEnumeratorType,
typename QInterEnumeratorType,
typename QMaxEigenvalueEnumeratorType,
typename QOutEnumeratorType>
103 const double* __restrict__ QIn,
104 const QInEnumeratorType QInEnumerator,
105 const double* __restrict__ tempMaxEigenvalueX,
106 const double* __restrict__ tempMaxEigenvalueY,
107 const double* __restrict__ tempMaxEigenvalueZ,
108 const QMaxEigenvalueEnumeratorType & eigenvalueEnumerator,
115 double* __restrict__ QOut,
116 const QOutEnumeratorType & QOutEnumerator,
117 double* __restrict__ QfaceXneg,
118 double* __restrict__ QfaceXpos,
119 double* __restrict__ QfaceYneg,
120 double* __restrict__ QfaceYpos,
121 double* __restrict__ QfaceZneg,
122 double* __restrict__ QfaceZpos,
123 QInterEnumeratorType QInterEnumerator
125 #if defined(GPUOffloadingOMP)
126 #pragma omp end declare target
129 #if defined(SharedOMP) and (!defined(__INTEL_LLVM_COMPILER) or !defined(GPUOffloadingOMP))
130 #pragma omp declare simd
132 template <
class QInEnumeratorType,
class QInterEnumeratorType,
class QFluxEnumeratorType>
134 double* __restrict__ QfaceNLeft,
135 double* __restrict__ QfaceNRight,
136 QInterEnumeratorType QInterEnumerator,
137 QInEnumeratorType QInEnumerator,
146 double* __restrict__ QFluxL,
147 double* __restrict__ QFluxR,
148 QFluxEnumeratorType QFluxEnumerator
152 #if defined(SharedOMP) and (!defined(__INTEL_LLVM_COMPILER) or !defined(GPUOffloadingOMP))
153 #pragma omp declare simd
155 #if defined(GPUOffloadingOMP)
156 #pragma omp declare target
158 template <
typename QFluxEnumeratorType,
typename QOutEnumeratorType>
160 const double* __restrict__ tempFluxXL,
161 const double* __restrict__ tempFluxYL,
162 const double* __restrict__ tempFluxZL,
163 const double* __restrict__ tempFluxXR,
164 const double* __restrict__ tempFluxYR,
165 const double* __restrict__ tempFluxZR,
166 const QFluxEnumeratorType fluxEnumerator,
173 double* __restrict__ QOut,
174 const QOutEnumeratorType& QOutEnumerator
176 #if defined(GPUOffloadingOMP)
177 #pragma omp end declare target
180 template <
class QInEnumeratorType,
class QInterEnumeratorType,
class QNCPFaceEnumeratorType>
182 double* __restrict__ QfaceNLeft,
183 double* __restrict__ QfaceNRight,
184 QInterEnumeratorType QInterEnumerator,
185 QInEnumeratorType QInEnumerator,
194 double* __restrict__ QD,
195 const QNCPFaceEnumeratorType QNcpEnumerator
198 #if defined(SharedOMP) and (!defined(__INTEL_LLVM_COMPILER) or !defined(GPUOffloadingOMP))
199 #pragma omp declare simd
201 #if defined(GPUOffloadingOMP)
202 #pragma omp declare target
204 template <
typename QNCPFaceEnumeratorType,
typename QOutEnumeratorType>
206 const double* __restrict__ QDX,
207 const double* __restrict__ QDY,
208 const double* __restrict__ QDZ,
209 const QNCPFaceEnumeratorType ncpEnumerator,
216 double* __restrict__ QOut,
217 const QOutEnumeratorType& QOutEnumerator
219 #if defined(GPUOffloadingOMP)
220 #pragma omp end declare target
223 template <
class QInEnumeratorType,
class QInterEnumeratorType,
class QOutEnumeratorType>
225 const double* __restrict__ QIn,
226 const QInterEnumeratorType QInterEnumerator,
227 const QInEnumeratorType QInEnumerator,
236 double* timeDerivative,
237 double* __restrict__ QOut,
238 const QOutEnumeratorType& QOutEnumerator,
243 template <
class QInEnumeratorType>
245 const double* __restrict__ QIn,
246 QInEnumeratorType QInEnumerator,
static void updateSolutionWithEigenvalueDamping_LoopBody(const double *__restrict__ QIn, const QInEnumeratorType QInEnumerator, const double *__restrict__ tempMaxEigenvalueX, const double *__restrict__ tempMaxEigenvalueY, const double *__restrict__ tempMaxEigenvalueZ, const QMaxEigenvalueEnumeratorType &eigenvalueEnumerator, const tarch::la::Vector< Dimensions, double > &patchCentre, const tarch::la::Vector< Dimensions, double > &patchSize, int patchIndex, const tarch::la::Vector< Dimensions, int > &volumeIndex, int unknown, double dt, double *__restrict__ QOut, const QOutEnumeratorType &QOutEnumerator, double *__restrict__ QfaceXneg, double *__restrict__ QfaceXpos, double *__restrict__ QfaceYneg, double *__restrict__ QfaceYpos, double *__restrict__ QfaceZneg, double *__restrict__ QfaceZpos, QInterEnumeratorType QInterEnumerator) InlineMethod
void computeQonFace_LoopBody(const double *__restrict__ QIn, const QInEnumeratorType QInEnumerator, const tarch::la::Vector< Dimensions, double > &patchCentre, const tarch::la::Vector< Dimensions, double > &patchSize, int patchIndex, const tarch::la::Vector< Dimensions, int > &volumeIndex, double t, double dt, double *__restrict__ timederivative, double *__restrict__ QfaceXneg, double *__restrict__ QfaceXpos, double *__restrict__ QfaceYneg, double *__restrict__ QfaceYpos, double *__restrict__ QfaceZneg, double *__restrict__ QfaceZpos, QInterEnumeratorType QInterEnumerator) InlineMethod
static void updateSolutionWithDTerm_LoopBody(const double *__restrict__ QDX, const double *__restrict__ QDY, const double *__restrict__ QDZ, const QNCPFaceEnumeratorType ncpEnumerator, const tarch::la::Vector< Dimensions, double > &patchCentre, const tarch::la::Vector< Dimensions, double > &patchSize, int patchIndex, const tarch::la::Vector< Dimensions, int > &volumeIndex, int unknown, double dt, double *__restrict__ QOut, const QOutEnumeratorType &QOutEnumerator) InlineMethod
static void copySolution_LoopBody(const double *__restrict__ QIn, const QInEnumeratorType &QInEnumerator, int patchIndex, const tarch::la::Vector< Dimensions, int > &volumeIndex, int unknown, double *__restrict__ QOut, const QOutEnumeratorType &QOutEnumerator) InlineMethod
static void computeFlux_LoopBody(double *__restrict__ QfaceNLeft, double *__restrict__ QfaceNRight, QInterEnumeratorType QInterEnumerator, QInEnumeratorType QInEnumerator, exahype2::fv::musclhancock::Flux flux, const tarch::la::Vector< Dimensions, double > &patchCentre, const tarch::la::Vector< Dimensions, double > &patchSize, int patchIndex, const tarch::la::Vector< Dimensions, int > &volumeIndex, double t, double dt, int normal, double *__restrict__ QFluxL, double *__restrict__ QFluxR, QFluxEnumeratorType QFluxEnumerator) InlineMethod
void computeTimeDerivative_LoopBody(const double *__restrict__ QIn, const QInEnumeratorType QInEnumerator, exahype2::fv::musclhancock::Flux flux, exahype2::fv::musclhancock::NonconservativeProduct ncp, exahype2::fv::musclhancock::Source source, const tarch::la::Vector< Dimensions, double > &patchCentre, const tarch::la::Vector< Dimensions, double > &patchSize, int patchIndex, const tarch::la::Vector< Dimensions, int > &volumeIndex, double t, double dt, double *__restrict__ timederivative, QInterEnumeratorType QInterEnumerator) InlineMethod
void updateSolutionwithNCPandSource_LoopBody(const double *__restrict__ QIn, const QInterEnumeratorType QInterEnumerator, const QInEnumeratorType QInEnumerator, exahype2::fv::musclhancock::NonconservativeProduct ncp, exahype2::fv::musclhancock::Source source, const tarch::la::Vector< Dimensions, double > &patchCentre, const tarch::la::Vector< Dimensions, double > &patchSize, int patchIndex, const tarch::la::Vector< Dimensions, int > &volumeIndex, double t, double dt, double *timeDerivative, double *__restrict__ QOut, const QOutEnumeratorType &QOutEnumerator, bool evalNCP, bool evalSRC) InlineMethod
static void computeDTerm_LoopBody(double *__restrict__ QfaceNLeft, double *__restrict__ QfaceNRight, QInterEnumeratorType QInterEnumerator, QInEnumeratorType QInEnumerator, exahype2::fv::musclhancock::NonconservativeProduct ncp, const tarch::la::Vector< Dimensions, double > &patchCentre, const tarch::la::Vector< Dimensions, double > &patchSize, int patchIndex, const tarch::la::Vector< Dimensions, int > &volumeIndex, double t, double dt, int normal, double *__restrict__ QD, const QNCPFaceEnumeratorType QNcpEnumerator) InlineMethod
static void updateSolutionWithFlux_LoopBody(const double *__restrict__ tempFluxXL, const double *__restrict__ tempFluxYL, const double *__restrict__ tempFluxZL, const double *__restrict__ tempFluxXR, const double *__restrict__ tempFluxYR, const double *__restrict__ tempFluxZR, const QFluxEnumeratorType fluxEnumerator, const tarch::la::Vector< Dimensions, double > &patchCentre, const tarch::la::Vector< Dimensions, double > &patchSize, int patchIndex, const tarch::la::Vector< Dimensions, int > &volumeIndex, int unknown, double dt, double *__restrict__ QOut, const QOutEnumeratorType &QOutEnumerator) InlineMethod
static void computeMaxEigenvalue_LoopBody(const double *__restrict__ QIn, QInEnumeratorType QInEnumerator, exahype2::fv::musclhancock::MaxEigenvalue maxEigenvalue, const tarch::la::Vector< Dimensions, double > &patchCentre, const tarch::la::Vector< Dimensions, double > &patchSize, int patchIndex, const tarch::la::Vector< Dimensions, int > &volumeIndex, double t, double dt, int normal, double *__restrict__ QMaxEigenvalue, QMaxEigenvalueEnumeratorType QMaxEigenvalueEnumerator) InlineMethod
static double reduceMaxEigenvalue_LoopBody(const double *__restrict__ QIn, QInEnumeratorType QInEnumerator, exahype2::fv::musclhancock::MaxEigenvalue maxEigenvalue, const tarch::la::Vector< Dimensions, double > &patchCentre, const tarch::la::Vector< Dimensions, double > &patchSize, int patchIndex, const tarch::la::Vector< Dimensions, int > &volumeIndex, double t, double dt) InlineMethod
std::function< void(const double *__restrict__ Q, const double *__restrict__ deltaQ, const tarch::la::Vector< Dimensions, double > &faceCentre, const tarch::la::Vector< Dimensions, double > &volumeH, double t, double dt, int normal, double *__restrict__ BTimesDeltaQ) NonconservativeProduct)
std::function< void(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &volumeX, const tarch::la::Vector< Dimensions, double > &volumeH, double t, double dt, double *__restrict__ S) Source)
constexpr int PickAllEntriesFromOutputVector
std::function< void(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &faceCentre, const tarch::la::Vector< Dimensions, double > &volumeH, double t, double dt, int normal, double *__restrict__ F) Flux)
std::function< double(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &faceCentre, const tarch::la::Vector< Dimensions, double > &volumeH, double t, double dt, int normal) MaxEigenvalue)
For the generic kernels that I use here most of the time.
auto volumeIndex(Args... args)
#define InlineMethod
Generic identifier for inlined functions.