Peano
Loading...
Searching...
No Matches
LoopBody.h
Go to the documentation of this file.
1// This file is part of the ExaHyPE2 project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
6
7#include "Functors.h"
8
12
14
15
16namespace exahype2 {
17 namespace fv {
18 namespace musclhancock {
20
21 namespace internal {
22 #if defined(SharedOMP) and (!defined(__INTEL_LLVM_COMPILER) or !defined(GPUOffloadingOMP))
23 #pragma omp declare simd
24 #endif
25 #if defined(GPUOffloadingOMP)
26 #pragma omp declare target
27 #endif
28 template <class QInEnumeratorType, class QOutEnumeratorType>
30 const double* __restrict__ QIn,
31 const QInEnumeratorType& QInEnumerator,
32 int patchIndex,
34 int unknown,
35 double* __restrict__ QOut,
36 const QOutEnumeratorType& QOutEnumerator
38 #if defined(GPUOffloadingOMP)
39 #pragma omp end declare target
40 #endif
41
42 template <class QInEnumeratorType, class QInterEnumeratorType>
44 const double* __restrict__ QIn,
45 const QInEnumeratorType QInEnumerator,
49 const tarch::la::Vector<Dimensions,double>& patchCentre,
51 int patchIndex,
53 double t,
54 double dt,
55 double* __restrict__ timederivative,
56 QInterEnumeratorType QInterEnumerator
57 ) InlineMethod;
58
59 template <class QInEnumeratorType, class QInterEnumeratorType>
61 const double* __restrict__ QIn,
62 const QInEnumeratorType QInEnumerator,
63 const tarch::la::Vector<Dimensions,double>& patchCentre,
65 int patchIndex,
67 double t,
68 double dt,
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
78
79 template <class QInEnumeratorType, class QMaxEigenvalueEnumeratorType>
81 const double* __restrict__ QIn,
82 QInEnumeratorType QInEnumerator,
84 const tarch::la::Vector<Dimensions,double>& patchCentre,
86 int patchIndex,
88 double t,
89 double dt,
90 int normal,
91 double* __restrict__ QMaxEigenvalue,
92 QMaxEigenvalueEnumeratorType QMaxEigenvalueEnumerator
94
95 #if defined(SharedOMP) and (!defined(__INTEL_LLVM_COMPILER) or !defined(GPUOffloadingOMP))
96 #pragma omp declare simd
97 #endif
98 #if defined(GPUOffloadingOMP)
99 #pragma omp declare target
100 #endif
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,
109 const tarch::la::Vector<Dimensions,double>& patchCentre,
111 int patchIndex,
113 int unknown,
114 double dt,
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
124 ) InlineMethod;
125 #if defined(GPUOffloadingOMP)
126 #pragma omp end declare target
127 #endif
128
129 #if defined(SharedOMP) and (!defined(__INTEL_LLVM_COMPILER) or !defined(GPUOffloadingOMP))
130 #pragma omp declare simd
131 #endif
132 template <class QInEnumeratorType, class QInterEnumeratorType, class QFluxEnumeratorType>
134 double* __restrict__ QfaceNLeft,
135 double* __restrict__ QfaceNRight,
136 QInterEnumeratorType QInterEnumerator,
137 QInEnumeratorType QInEnumerator,
139 const tarch::la::Vector<Dimensions,double>& patchCentre,
141 int patchIndex,
143 double t,
144 double dt,
145 int normal,
146 double* __restrict__ QFluxL,
147 double* __restrict__ QFluxR,
148 QFluxEnumeratorType QFluxEnumerator
149
150 ) InlineMethod;
151
152 #if defined(SharedOMP) and (!defined(__INTEL_LLVM_COMPILER) or !defined(GPUOffloadingOMP))
153 #pragma omp declare simd
154 #endif
155 #if defined(GPUOffloadingOMP)
156 #pragma omp declare target
157 #endif
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,
167 const tarch::la::Vector<Dimensions,double>& patchCentre,
169 int patchIndex,
171 int unknown,
172 double dt,
173 double* __restrict__ QOut,
174 const QOutEnumeratorType& QOutEnumerator
175 ) InlineMethod;
176 #if defined(GPUOffloadingOMP)
177 #pragma omp end declare target
178 #endif
179
180 template <class QInEnumeratorType, class QInterEnumeratorType, class QNCPFaceEnumeratorType>
182 double* __restrict__ QfaceNLeft,
183 double* __restrict__ QfaceNRight,
184 QInterEnumeratorType QInterEnumerator,
185 QInEnumeratorType QInEnumerator,
187 const tarch::la::Vector<Dimensions,double>& patchCentre,
189 int patchIndex,
191 double t,
192 double dt,
193 int normal,
194 double* __restrict__ QD,
195 const QNCPFaceEnumeratorType QNcpEnumerator
196 ) InlineMethod;
197
198 #if defined(SharedOMP) and (!defined(__INTEL_LLVM_COMPILER) or !defined(GPUOffloadingOMP))
199 #pragma omp declare simd
200 #endif
201 #if defined(GPUOffloadingOMP)
202 #pragma omp declare target
203 #endif
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,
210 const tarch::la::Vector<Dimensions,double>& patchCentre,
212 int patchIndex,
214 int unknown,
215 double dt,
216 double* __restrict__ QOut,
217 const QOutEnumeratorType& QOutEnumerator
218 ) InlineMethod;
219 #if defined(GPUOffloadingOMP)
220 #pragma omp end declare target
221 #endif
222
223 template <class QInEnumeratorType, class QInterEnumeratorType, class QOutEnumeratorType>
225 const double* __restrict__ QIn,
226 const QInterEnumeratorType QInterEnumerator,
227 const QInEnumeratorType QInEnumerator,
230 const tarch::la::Vector<Dimensions,double>& patchCentre,
232 int patchIndex,
234 double t,
235 double dt,
236 double* timeDerivative,
237 double* __restrict__ QOut,
238 const QOutEnumeratorType& QOutEnumerator,
239 bool evalNCP,
240 bool evalSRC
241 ) InlineMethod;
242
243 template <class QInEnumeratorType>
245 const double* __restrict__ QIn,
246 QInEnumeratorType QInEnumerator,
248 const tarch::la::Vector<Dimensions,double>& patchCentre,
250 int patchIndex,
252 double t,
253 double dt
254 ) InlineMethod;
255 }
256 }
257 }
258}
259
260
261#include "LoopBody.cpph"
262
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
Definition LoopBody.cpph:26
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)
Definition Functors.h:45
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)
Definition Functors.h:24
constexpr int PickAllEntriesFromOutputVector
Definition LoopBody.h:19
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)
Definition Functors.h:34
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)
Definition Functors.h:54
For the generic kernels that I use here most of the time.
Definition CellAccess.h:13
auto volumeIndex(Args... args)
Definition VolumeIndex.h:54
Definition fv.py:1
Simple vector class.
Definition Vector.h:150
#define InlineMethod
Generic identifier for inlined functions.
Definition tarch.h:66