Peano 4
Loading...
Searching...
No Matches
Riemann_patchwise_functors.cpph
Go to the documentation of this file.
2#include "Riemann.h"
3
5 ::exahype2::CellData& patchData,
6 int numberOfVolumesPerAxisInPatch,
7 int haloSize,
8 int unknowns,
9 int auxiliaryVariables,
10 bool evaluateFlux,
11 bool evaluateRiemann,
12 bool evaluateMaximumEigenvalueAfterTimeStep,
13 Flux flux,
14 Eigenvalues eigenvalues,
15 SolveRiemannProblem solveRiemannProblem
16) {
17 static tarch::logging::Log _log( "exahype2::fv::riemann" );
18
23 constexpr int solversHaloSize = 1;
24
25 assertionEquals(haloSize,1);
26
27 exahype2::enumerator::AoSLexicographicEnumerator QInEnumerator ( 1, numberOfVolumesPerAxisInPatch,haloSize,unknowns,auxiliaryVariables);
28 exahype2::enumerator::AoSLexicographicEnumerator QOutEnumerator ( 1, numberOfVolumesPerAxisInPatch, 0,unknowns,auxiliaryVariables);
29 exahype2::enumerator::AoSLexicographicEnumerator fluxEnumerator (patchData.numberOfCells, numberOfVolumesPerAxisInPatch, solversHaloSize,unknowns,0);
30 exahype2::enumerator::AoSLexicographicEnumerator maxEigenvalueEnumerator(patchData.numberOfCells, numberOfVolumesPerAxisInPatch, solversHaloSize,1,0);
31 exahype2::enumerator::AoSLexicographicEnumerator riemannEnumerator (patchData.numberOfCells, numberOfVolumesPerAxisInPatch, solversHaloSize,unknowns,0);
32 exahype2::enumerator::AoSLexicographicEnumerator eigenvaluesEnumerator(patchData.numberOfCells, numberOfVolumesPerAxisInPatch, solversHaloSize,unknowns,0);
33
34 double* tempEigenvaluesX = tarch::allocateMemory<double>( eigenvaluesEnumerator.size(), tarch::MemoryLocation::Heap );
35 double* tempEigenvaluesY = tarch::allocateMemory<double>( eigenvaluesEnumerator.size(), tarch::MemoryLocation::Heap );
36 double* tempEigenvaluesZ = (Dimensions==3) ? tarch::allocateMemory<double>( eigenvaluesEnumerator.size(), tarch::MemoryLocation::Heap ) : nullptr;
37
38 double* tempMaxEigenvalueX = tarch::allocateMemory<double>( maxEigenvalueEnumerator.size(), tarch::MemoryLocation::Heap);
39 double* tempMaxEigenvalueY = tarch::allocateMemory<double>( maxEigenvalueEnumerator.size(), tarch::MemoryLocation::Heap);
40 double* tempMaxEigenvalueZ = (Dimensions==3) ? tarch::allocateMemory<double>( maxEigenvalueEnumerator.size(), tarch::MemoryLocation::Heap) : nullptr;
41
42 double* tempFluxX = evaluateFlux ? tarch::allocateMemory<double>( fluxEnumerator.size(), tarch::MemoryLocation::Heap ) : nullptr;
43 double* tempFluxY = evaluateFlux ? tarch::allocateMemory<double>( fluxEnumerator.size(), tarch::MemoryLocation::Heap ) : nullptr;
44 double* tempFluxZ = (evaluateFlux and Dimensions==3) ? tarch::allocateMemory<double>( fluxEnumerator.size(), tarch::MemoryLocation::Heap ) : nullptr;
45
46 double* tempLeftUpdatesX = evaluateRiemann ? tarch::allocateMemory<double>( riemannEnumerator.size(), tarch::MemoryLocation::Heap ) : nullptr;
47 double* tempRightUpdatesX = evaluateRiemann ? tarch::allocateMemory<double>( riemannEnumerator.size(), tarch::MemoryLocation::Heap ) : nullptr;
48 double* tempBelowUpdatesY = evaluateRiemann ? tarch::allocateMemory<double>( riemannEnumerator.size(), tarch::MemoryLocation::Heap ) : nullptr;
49 double* tempAboveUpdatesY = evaluateRiemann ? tarch::allocateMemory<double>( riemannEnumerator.size(), tarch::MemoryLocation::Heap ) : nullptr;
50 double* tempBackwardUpdatesZ = (evaluateRiemann and Dimensions==3) ? tarch::allocateMemory<double>( riemannEnumerator.size(), tarch::MemoryLocation::Heap ) : nullptr;
51 double* tempForwardUpdatesZ = (evaluateRiemann and Dimensions==3) ? tarch::allocateMemory<double>( riemannEnumerator.size(), tarch::MemoryLocation::Heap ) : nullptr;
52
53 for (int patchIndex=0; patchIndex<patchData.numberOfCells; patchIndex++) {
54 logDebug( "timeStepWithRiemann_sequential(...)", "copy solution over" );
55 if (Dimensions==2) {
56 for (int x = 0; x < numberOfVolumesPerAxisInPatch; x++)
57 for (int y = 0; y < numberOfVolumesPerAxisInPatch; y++)
58 for (int unknown=0; unknown<unknowns+auxiliaryVariables; unknown++) {
59 internal::copySolution_LoopBody(
60 patchData.QIn[patchIndex],
61 QInEnumerator,
62 patchIndex,
63 volumeIndex2d(x,y),
64 unknown,
65 patchData.QOut[patchIndex],
66 QOutEnumerator
67 );
68 }
69 }
70 else {
71 for (int x = 0; x < numberOfVolumesPerAxisInPatch; x++)
72 for (int y = 0; y < numberOfVolumesPerAxisInPatch; y++)
73 for (int z = 0; z < numberOfVolumesPerAxisInPatch; z++)
74 for (int unknown=0; unknown<unknowns+auxiliaryVariables; unknown++) {
75 internal::copySolution_LoopBody(
76 patchData.QIn[patchIndex],
77 QInEnumerator,
78 patchIndex,
79 volumeIndex3d(x,y,z),
80 unknown,
81 patchData.QOut[patchIndex],
82 QOutEnumerator
83 );
84 }
85 }
86
87 if (Dimensions==2) {
88 for (int x = -solversHaloSize; x < numberOfVolumesPerAxisInPatch+solversHaloSize; x++)
89 for (int y = 0; y < numberOfVolumesPerAxisInPatch; y++) {
90 internal::computeEigenvalues_LoopBody(
91 patchData.QIn[patchIndex],
92 QInEnumerator,
93 eigenvalues,
94 patchData.cellCentre[patchIndex],
95 patchData.cellSize[patchIndex],
96 patchIndex,
97 volumeIndex2d(x,y),
98 patchData.t[patchIndex], patchData.dt[patchIndex],
99 0,
100 tempEigenvaluesX,
101 eigenvaluesEnumerator
102 );
103 }
104 for (int y = -solversHaloSize; y < numberOfVolumesPerAxisInPatch+solversHaloSize; y++)
105 for (int x = 0; x < numberOfVolumesPerAxisInPatch; x++) {
106 internal::computeEigenvalues_LoopBody(
107 patchData.QIn[patchIndex],
108 QInEnumerator,
109 eigenvalues,
110 patchData.cellCentre[patchIndex],
111 patchData.cellSize[patchIndex],
112 patchIndex,
113 volumeIndex2d(x,y),
114 patchData.t[patchIndex], patchData.dt[patchIndex],
115 1,
116 tempEigenvaluesY,
117 eigenvaluesEnumerator
118 );
119 }
120 }
121 else {
122 for (int x = -solversHaloSize; x < numberOfVolumesPerAxisInPatch+solversHaloSize; x++)
123 for (int y = 0; y < numberOfVolumesPerAxisInPatch; y++)
124 for (int z = 0; z < numberOfVolumesPerAxisInPatch; z++) {
125 internal::computeEigenvalues_LoopBody(
126 patchData.QIn[patchIndex],
127 QInEnumerator,
128 eigenvalues,
129 patchData.cellCentre[patchIndex],
130 patchData.cellSize[patchIndex],
131 patchIndex,
132 volumeIndex3d(x,y,z),
133 patchData.t[patchIndex], patchData.dt[patchIndex],
134 0,
135 tempEigenvaluesX,
136 eigenvaluesEnumerator
137 );
138 }
139 for (int x = 0; x < numberOfVolumesPerAxisInPatch; x++)
140 for (int y = -solversHaloSize; y < numberOfVolumesPerAxisInPatch+solversHaloSize; y++)
141 for (int z = 0; z < numberOfVolumesPerAxisInPatch; z++) {
142 internal::computeEigenvalues_LoopBody(
143 patchData.QIn[patchIndex],
144 QInEnumerator,
145 eigenvalues,
146 patchData.cellCentre[patchIndex],
147 patchData.cellSize[patchIndex],
148 patchIndex,
149 volumeIndex3d(x,y,z),
150 patchData.t[patchIndex], patchData.dt[patchIndex],
151 1,
152 tempEigenvaluesY,
153 eigenvaluesEnumerator
154 );
155 }
156 for (int x = 0; x < numberOfVolumesPerAxisInPatch; x++)
157 for (int y = 0; y < numberOfVolumesPerAxisInPatch; y++)
158 for (int z = -solversHaloSize; z < numberOfVolumesPerAxisInPatch+solversHaloSize; z++) {
159 internal::computeEigenvalues_LoopBody(
160 patchData.QIn[patchIndex],
161 QInEnumerator,
162 eigenvalues,
163 patchData.cellCentre[patchIndex],
164 patchData.cellSize[patchIndex],
165 patchIndex,
166 volumeIndex3d(x,y,z),
167 patchData.t[patchIndex], patchData.dt[patchIndex],
168 2,
169 tempEigenvaluesZ,
170 eigenvaluesEnumerator
171 );
172 }
173 }
174
175 if (evaluateFlux and Dimensions==2) {
176 for (int x = -solversHaloSize; x < numberOfVolumesPerAxisInPatch+solversHaloSize; x++)
177 for (int y = 0; y < numberOfVolumesPerAxisInPatch; y++) {
178 internal::computeFlux_LoopBody(
179 patchData.QIn[patchIndex],
180 QInEnumerator,
181 flux,
182 patchData.cellCentre[patchIndex],
183 patchData.cellSize[patchIndex],
184 patchIndex,
185 volumeIndex2d(x,y),
186 patchData.t[patchIndex],
187 patchData.dt[patchIndex],
188 0, // normal
189 tempFluxX,
190 fluxEnumerator
191 );
192 }
193 for (int x = 0; x < numberOfVolumesPerAxisInPatch; x++)
194 for (int y = -solversHaloSize; y < numberOfVolumesPerAxisInPatch+solversHaloSize; y++) {
195 internal::computeFlux_LoopBody(
196 patchData.QIn[patchIndex],
197 QInEnumerator,
198 flux,
199 patchData.cellCentre[patchIndex],
200 patchData.cellSize[patchIndex],
201 patchIndex,
202 volumeIndex2d(x,y),
203 patchData.t[patchIndex],
204 patchData.dt[patchIndex],
205 1, // normal
206 tempFluxY,
207 fluxEnumerator
208 );
209 }
210 }
211 else if (evaluateFlux and Dimensions==3) {
212 for (int x = -solversHaloSize; x < numberOfVolumesPerAxisInPatch+solversHaloSize; x++)
213 for (int y = 0; y < numberOfVolumesPerAxisInPatch; y++)
214 for (int z = 0; z < numberOfVolumesPerAxisInPatch; z++) {
215 internal::computeFlux_LoopBody(
216 patchData.QIn[patchIndex],
217 QInEnumerator,
218 flux,
219 patchData.cellCentre[patchIndex],
220 patchData.cellSize[patchIndex],
221 patchIndex,
222 volumeIndex3d(x,y,z),
223 patchData.t[patchIndex],
224 patchData.dt[patchIndex],
225 0, // normal
226 tempFluxX,
227 fluxEnumerator
228 );
229 }
230 for (int x = 0; x < numberOfVolumesPerAxisInPatch; x++)
231 for (int y = -solversHaloSize; y < numberOfVolumesPerAxisInPatch+solversHaloSize; y++)
232 for (int z = 0; z < numberOfVolumesPerAxisInPatch; z++) {
233 internal::computeFlux_LoopBody(
234 patchData.QIn[patchIndex],
235 QInEnumerator,
236 flux,
237 patchData.cellCentre[patchIndex],
238 patchData.cellSize[patchIndex],
239 patchIndex,
240 volumeIndex3d(x,y,z),
241 patchData.t[patchIndex],
242 patchData.dt[patchIndex],
243 1, // normal
244 tempFluxY,
245 fluxEnumerator
246 );
247 }
248 for (int x = 0; x < numberOfVolumesPerAxisInPatch; x++)
249 for (int y = 0; y < numberOfVolumesPerAxisInPatch; y++)
250 for (int z = -solversHaloSize; z < numberOfVolumesPerAxisInPatch+solversHaloSize; z++) {
251 internal::computeFlux_LoopBody(
252 patchData.QIn[patchIndex],
253 QInEnumerator,
254 flux,
255 patchData.cellCentre[patchIndex],
256 patchData.cellSize[patchIndex],
257 patchIndex,
258 volumeIndex3d(x,y,z),
259 patchData.t[patchIndex],
260 patchData.dt[patchIndex],
261 2, // normal
262 tempFluxZ,
263 fluxEnumerator
264 );
265 }
266 }
267
268 if (evaluateRiemann and Dimensions==2) {
269 for (int x = -solversHaloSize; x < numberOfVolumesPerAxisInPatch; x++)
270 for (int y = 0; y < numberOfVolumesPerAxisInPatch; y++){
271 internal::computeRiemannSolution_LoopBody(
272 patchData.QIn[patchIndex],
273 QInEnumerator,
274 solveRiemannProblem,
275 tempFluxX,
276 fluxEnumerator,
277 tempEigenvaluesX,
278 eigenvaluesEnumerator,
279 patchData.cellCentre[patchIndex],
280 patchData.cellSize[patchIndex],
281 patchIndex,
282 volumeIndex2d(x,y),
283 patchData.t[patchIndex],
284 patchData.dt[patchIndex],
285 0, // normal
286 tempRightUpdatesX,
287 tempLeftUpdatesX,
288 riemannEnumerator,
289 tempMaxEigenvalueX,
290 maxEigenvalueEnumerator
291 );
292 }
293 for (int x = 0; x < numberOfVolumesPerAxisInPatch; x++)
294 for (int y = -solversHaloSize; y < numberOfVolumesPerAxisInPatch; y++){
295 internal::computeRiemannSolution_LoopBody(
296 patchData.QIn[patchIndex],
297 QInEnumerator,
298 solveRiemannProblem,
299 tempFluxY,
300 fluxEnumerator,
301 tempEigenvaluesY,
302 eigenvaluesEnumerator,
303 patchData.cellCentre[patchIndex],
304 patchData.cellSize[patchIndex],
305 patchIndex,
306 volumeIndex2d(x,y),
307 patchData.t[patchIndex],
308 patchData.dt[patchIndex],
309 1, // normal
310 tempAboveUpdatesY,
311 tempBelowUpdatesY,
312 riemannEnumerator,
313 tempMaxEigenvalueY,
314 maxEigenvalueEnumerator
315 );
316 }
317 for (int x = 0; x < numberOfVolumesPerAxisInPatch; x++)
318 for (int y = 0; y < numberOfVolumesPerAxisInPatch; y++)
319 for (int unknown=0; unknown<unknowns; unknown++) {
320 internal::updateSolutionWithRiemannSolution_LoopBody(
321 tempLeftUpdatesX, tempRightUpdatesX,
322 tempBelowUpdatesY, tempAboveUpdatesY,
323 tempBackwardUpdatesZ, tempForwardUpdatesZ,
324 riemannEnumerator,
325 patchData.cellCentre[patchIndex],
326 patchData.cellSize[patchIndex],
327 patchIndex,
328 volumeIndex2d(x,y),
329 unknown,
330 patchData.dt[patchIndex],
331 *(patchData.QOut + patchIndex),
332 QOutEnumerator
333 );
334 }
335 }
336 else if (evaluateRiemann and Dimensions==3) {
337 for (int x = -solversHaloSize; x < numberOfVolumesPerAxisInPatch; x++)
338 for (int y = 0; y < numberOfVolumesPerAxisInPatch; y++)
339 for (int z = 0; z < numberOfVolumesPerAxisInPatch; z++) {
340 internal::computeRiemannSolution_LoopBody(
341 patchData.QIn[patchIndex],
342 QInEnumerator,
343 solveRiemannProblem,
344 tempFluxX,
345 fluxEnumerator,
346 tempEigenvaluesX,
347 eigenvaluesEnumerator,
348 patchData.cellCentre[patchIndex],
349 patchData.cellSize[patchIndex],
350 patchIndex,
351 volumeIndex3d(x,y,z),
352 patchData.t[patchIndex],
353 patchData.dt[patchIndex],
354 0, // normal
355 tempRightUpdatesX,
356 tempLeftUpdatesX,
357 riemannEnumerator,
358 tempMaxEigenvalueX,
359 maxEigenvalueEnumerator
360 );
361 }
362 for (int x = 0; x < numberOfVolumesPerAxisInPatch; x++)
363 for (int y = -solversHaloSize; y < numberOfVolumesPerAxisInPatch; y++)
364 for (int z = 0; z < numberOfVolumesPerAxisInPatch; z++) {
365 internal::computeRiemannSolution_LoopBody(
366 patchData.QIn[patchIndex],
367 QInEnumerator,
368 solveRiemannProblem,
369 tempFluxY,
370 fluxEnumerator,
371 tempEigenvaluesY,
372 eigenvaluesEnumerator,
373 patchData.cellCentre[patchIndex],
374 patchData.cellSize[patchIndex],
375 patchIndex,
376 volumeIndex3d(x,y,z),
377 patchData.t[patchIndex],
378 patchData.dt[patchIndex],
379 1, // normal
380 tempAboveUpdatesY,
381 tempBelowUpdatesY,
382 riemannEnumerator,
383 tempMaxEigenvalueY,
384 maxEigenvalueEnumerator
385 );
386 }
387 for (int x = 0; x < numberOfVolumesPerAxisInPatch; x++)
388 for (int y = 0; y < numberOfVolumesPerAxisInPatch; y++)
389 for (int z = -solversHaloSize; z < numberOfVolumesPerAxisInPatch; z++) {
390 internal::computeRiemannSolution_LoopBody(
391 patchData.QIn[patchIndex],
392 QInEnumerator,
393 solveRiemannProblem,
394 tempFluxZ,
395 fluxEnumerator,
396 tempEigenvaluesZ,
397 eigenvaluesEnumerator,
398 patchData.cellCentre[patchIndex],
399 patchData.cellSize[patchIndex],
400 patchIndex,
401 volumeIndex3d(x,y,z),
402 patchData.t[patchIndex],
403 patchData.dt[patchIndex],
404 2, // normal
405 tempForwardUpdatesZ,
406 tempBackwardUpdatesZ,
407 riemannEnumerator,
408 tempMaxEigenvalueZ,
409 maxEigenvalueEnumerator
410 );
411 }
412 for (int x = 0; x < numberOfVolumesPerAxisInPatch; x++)
413 for (int y = 0; y < numberOfVolumesPerAxisInPatch; y++)
414 for (int z = 0; z < numberOfVolumesPerAxisInPatch; z++)
415 for (int unknown=0; unknown<unknowns; unknown++) {
416 internal::updateSolutionWithRiemannSolution_LoopBody(
417 tempLeftUpdatesX, tempRightUpdatesX,
418 tempBelowUpdatesY, tempAboveUpdatesY,
419 tempBackwardUpdatesZ, tempForwardUpdatesZ,
420 riemannEnumerator,
421 patchData.cellCentre[patchIndex],
422 patchData.cellSize[patchIndex],
423 patchIndex,
424 volumeIndex3d(x,y,z),
425 unknown,
426 patchData.dt[patchIndex],
427 *(patchData.QOut + patchIndex),
428 QOutEnumerator
429 );
430 }
431 }
432
433 if (evaluateMaximumEigenvalueAfterTimeStep and Dimensions==2) {
434 logDebug( "timeStepWithRiemann_sequential(...)", "compute maximum eigenvalue for subsequent time step" );
435 double newMaxEigenvalue = 0.0;
436 for (int x = 0; x < numberOfVolumesPerAxisInPatch; x++)
437 for (int y = 0; y < numberOfVolumesPerAxisInPatch; y++) {
438 newMaxEigenvalue = std::max(
439 newMaxEigenvalue,
440 internal::reduceMaxEigenvalue_LoopBody(
441 *(patchData.QOut + patchIndex),
442 QOutEnumerator,
443 tempMaxEigenvalueX,
444 tempMaxEigenvalueY,
445 tempMaxEigenvalueZ,
446 maxEigenvalueEnumerator,
447 patchData.cellCentre[patchIndex],
448 patchData.cellSize[patchIndex],
449 patchIndex,
450 volumeIndex2d(x,y),
451 patchData.t[patchIndex],
452 patchData.dt[patchIndex],
454 )
455 );
456 }
457 patchData.maxEigenvalue[patchIndex] = newMaxEigenvalue;
458 }
459 else if (evaluateMaximumEigenvalueAfterTimeStep) {
460 double newMaxEigenvalue = 0.0;
461 for (int x = 0; x < numberOfVolumesPerAxisInPatch; x++)
462 for (int y = 0; y < numberOfVolumesPerAxisInPatch; y++)
463 for (int z = 0; z < numberOfVolumesPerAxisInPatch; z++) {
464 newMaxEigenvalue = std::max(
465 newMaxEigenvalue,
466 internal::reduceMaxEigenvalue_LoopBody(
467 *(patchData.QOut + patchIndex),
468 QOutEnumerator,
469 tempMaxEigenvalueX,
470 tempMaxEigenvalueY,
471 tempMaxEigenvalueZ,
472 maxEigenvalueEnumerator,
473 patchData.cellCentre[patchIndex],
474 patchData.cellSize[patchIndex],
475 patchIndex,
476 volumeIndex3d(x,y,z),
477 patchData.t[patchIndex],
478 patchData.dt[patchIndex],
480 )
481 );
482 }
483 patchData.maxEigenvalue[patchIndex] = newMaxEigenvalue;
484 }
485 }
486
487 if (tempFluxX!=nullptr) tarch::freeMemory(tempFluxX, tarch::MemoryLocation::Heap);
488 if (tempFluxY!=nullptr) tarch::freeMemory(tempFluxY, tarch::MemoryLocation::Heap);
489 if (tempFluxZ!=nullptr) tarch::freeMemory(tempFluxZ, tarch::MemoryLocation::Heap);
490
491 if (tempLeftUpdatesX!=nullptr) tarch::freeMemory(tempLeftUpdatesX, tarch::MemoryLocation::Heap);
492 if (tempRightUpdatesX!=nullptr) tarch::freeMemory(tempRightUpdatesX, tarch::MemoryLocation::Heap);
493 if (tempBelowUpdatesY!=nullptr) tarch::freeMemory(tempBelowUpdatesY, tarch::MemoryLocation::Heap);
494 if (tempAboveUpdatesY!=nullptr) tarch::freeMemory(tempAboveUpdatesY, tarch::MemoryLocation::Heap);
495 if (tempBackwardUpdatesZ!=nullptr) tarch::freeMemory(tempBackwardUpdatesZ, tarch::MemoryLocation::Heap);
496 if (tempForwardUpdatesZ!=nullptr) tarch::freeMemory(tempForwardUpdatesZ, tarch::MemoryLocation::Heap);
497
498 if (tempEigenvaluesX!=nullptr) tarch::freeMemory(tempEigenvaluesX, tarch::MemoryLocation::Heap);
499 if (tempEigenvaluesY!=nullptr) tarch::freeMemory(tempEigenvaluesY, tarch::MemoryLocation::Heap);
500 if (tempEigenvaluesZ!=nullptr) tarch::freeMemory(tempEigenvaluesZ, tarch::MemoryLocation::Heap);
501
502 if (tempMaxEigenvalueX!=nullptr) tarch::freeMemory(tempMaxEigenvalueX, tarch::MemoryLocation::Heap);
503 if (tempMaxEigenvalueY!=nullptr) tarch::freeMemory(tempMaxEigenvalueY, tarch::MemoryLocation::Heap);
504 if (tempMaxEigenvalueZ!=nullptr) tarch::freeMemory(tempMaxEigenvalueZ, tarch::MemoryLocation::Heap);
505}
#define assertionEquals(lhs, rhs)
#define logDebug(methodName, logMacroMessageStream)
Definition Log.h:50
Log Device.
Definition Log.h:516
static void timeStepWithRiemann_patchwise_heap_functors(::exahype2::CellData &patchData, int numberOfVolumesPerAxisInPatch, int haloSize, int unknowns, int auxiliaryVariables, bool evaluateFlux, bool evaluateRiemann, bool evaluateMaximumEigenvalueAfterTimeStep, Flux flux, Eigenvalues eigenvalues, SolveRiemannProblem solveRiemannProblem)
void freeMemory(void *data, MemoryLocation location)
@ Heap
Create data on the heap of the local device.
tarch::logging::Log _log("examples::unittests")
Representation of a number of cells which contains all information that's required to process the sto...
Definition CellData.h:79
double * maxEigenvalue
Out values.
Definition CellData.h:111
double ** QOut
Out values.
Definition CellData.h:106
const int numberOfCells
As we store data as SoA, we have to know how big the actual arrays are.
Definition CellData.h:101
double ** QIn
QIn may not be const, as some kernels delete it straightaway once the input data has been handled.
Definition CellData.h:84
tarch::la::Vector< Dimensions, double > * cellSize
Definition CellData.h:86
tarch::la::Vector< Dimensions, double > * cellCentre
Definition CellData.h:85
GPUCallableInlineMethod int size() const InlineMethod