Peano 4
Loading...
Searching...
No Matches
PostprocessingKernels.cpp
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
5#include "peano4/utils/Loop.h"
6
7
9 double* __restrict__ Q,
10 int unknowns,
11 int auxiliaryVariables,
12 int numberOfVolumesPerAxisInPatch,
13 int fromIndex,
14 int toIndex
15) {
17 1, // only one patch
18 numberOfVolumesPerAxisInPatch,
19 0, // int haloSize,
21 auxiliaryVariables
22 );
23
24 for (int d=0; d<Dimensions; d++) {
25 dfore(k,numberOfVolumesPerAxisInPatch,d,0) {
28
29 dest(d) = 0;
30 for (int dd=0; dd<Dimensions; dd++) {
31 if (dest(dd)==0) src(dd)=1;
32 if (dest(dd)==numberOfVolumesPerAxisInPatch-1) src(dd)=numberOfVolumesPerAxisInPatch-2;
33 }
34 Q[ enumerator(0,dest,toIndex) ] = Q[ enumerator(0,src,fromIndex) ];
35
36 dest(d) = numberOfVolumesPerAxisInPatch-1;
37 for (int dd=0; dd<Dimensions; dd++) {
38 if (dest(dd)==0) src(dd)=1;
39 if (dest(dd)==numberOfVolumesPerAxisInPatch-1) src(dd)=numberOfVolumesPerAxisInPatch-2;
40 }
41 Q[ enumerator(0,dest,toIndex) ] = Q[ enumerator(0,src,fromIndex) ];
42 }
43 }
44
45}
we integrate over each cell and then take the sum across each of the cells We also consider the terms that enter the f$ k
#define dfore(counter, max, dim, value)
This is an exclusive d-dimensional for loop.
Definition Loop.h:937
void mapInnerNeighbourVoxelAlongBoundayOntoAuxiliaryVariable(double *__restrict__ Q, int unknowns, int auxiliaryVariables, int numberOfVolumesPerAxisInPatch, int fromIndex, int toIndex)
Simple extrapolation within patch.
Simple vector class.
Definition Vector.h:134