26 int numberOfVolumesPerAxisInPatch
32 for (
int d=0; d<2; d++) {
33 #if !defined(GPUOffloadingSYCL) and !defined(GPUOffloadingOMP)
34 assertion2( numberOfVolumesPerAxisInPatch>=1, h, numberOfVolumesPerAxisInPatch );
36 volumeSize(d) = h(d)/numberOfVolumesPerAxisInPatch;
45 int numberOfVolumesPerAxisInPatch
51 for (
int d=0; d<3; d++) {
52 volumeSize(d) = h(d)/numberOfVolumesPerAxisInPatch;
61 int numberOfVolumesPerAxisInPatch
71 int numberOfVolumesPerAxisInPatch
97 int numberOfVolumesPerAxisInPatch,
104 for (
int d=0; d<2; d++) {
105 result(d) += index(d) * volumeSize(d);
114 int numberOfVolumesPerAxisInPatch,
121 for (
int d=0; d<3; d++) {
122 result(d) += index(d) * volumeSize(d);
131 int numberOfVolumesPerAxisInPatch,
141 for (
int d=0; d<2; d++) {
143 result(d) = x(d) - overlap * volumeSize(d) + 0.5 * volumeSize(d);
146 result(d) = x(d) - 0.5 * h(d) + 0.5 * volumeSize(d);
148 result(d) += index(d) * volumeSize(d);
158 int numberOfVolumesPerAxisInPatch,
168 for (
int d=0; d<3; d++) {
170 result(d) = x(d) - overlap * volumeSize(d) + 0.5 * volumeSize(d);
173 result(d) = x(d) - 0.5 * h(d) + 0.5 * volumeSize(d);
175 result(d) += index(d) * volumeSize(d);
191 int numberOfVolumesPerAxisInPatch
197 int numberOfVolumesPerAxisInPatch
208 const double* __restrict__ Q,
227 const double* __restrict__ Q,
229 int auxiliaryVariables,
230 int numberOfVolumesPerAxisInPatch,
232 const std::string& location =
"",
233 bool triggerNonCriticalAssertion =
true,
234 double* minValues =
nullptr,
235 double* maxValues =
nullptr
247 const double* __restrict__ Q,
249 int auxiliaryVariables,
250 int numberOfVolumesPerAxisInPatch,
252 bool prettyPrint =
false
257 const double* __restrict__ Q,
259 int auxiliaryVariables,
260 int numberOfGridCellsPerPatchPerAxis,
263 bool prettyPrint =
false
275 int unknownsPlusAuxiliaryVariables,
276 int numberOfGridCellsPerPatchPerAxis,
280 const double* __restrict__ srcQ,
281 double* __restrict__ destQ
#define assertion2(expr, param0, param1)
static tarch::la::Vector< 2, double > getVolumeCentre(const tarch::la::Vector< 2, double > &x, const tarch::la::Vector< 2, double > &h, int numberOfVolumesPerAxisInPatch, const tarch::la::Vector< 2, int > &index)
In ExaHyPE's Finite Volume setup, a cell hosts a patch of Finite Volumes.
void validatePatch(const double *__restrict__ Q, int unknowns, int auxiliaryVariables, int numberOfVolumesPerAxisInPatch, int haloSize, const std::string &location="", bool triggerNonCriticalAssertion=true, double *minValues=nullptr, double *maxValues=nullptr)
Just runs over the patch and ensures that no entry is non or infinite.
static tarch::la::Vector< 2, double > getFaceCentre(const tarch::la::Vector< 2, double > &x, const tarch::la::Vector< 2, double > &h, int numberOfVolumesPerAxisInPatch, int overlap, int normal, const tarch::la::Vector< 2, int > &index)
std::string plotPatch(const double *__restrict__ Q, int unknowns, int auxiliaryVariables, int numberOfVolumesPerAxisInPatch, int haloSize, bool prettyPrint=false)
Plot patch.
double getVolumeLength(const tarch::la::Vector< 2, double > &h, int numberOfVolumesPerAxisInPatch)
With GCC 10, it was impossible to return/copy the vector class.
void copyHalfOfHalo(int unknownsPlusAuxiliaryVariables, int numberOfGridCellsPerPatchPerAxis, int haloSize, int normal, bool isRightLayer, const double *__restrict__ srcQ, double *__restrict__ destQ)
A face always holds a left and a right overlap.
static tarch::la::Vector< 2, double > getVolumeSize(const tarch::la::Vector< 2, double > &h, int numberOfVolumesPerAxisInPatch)
We need this routine within vectorised and GPUised code.
std::string plotPatchOverlap(const double *__restrict__ Q, int unknowns, int auxiliaryVariables, int numberOfGridCellsPerPatchPerAxis, int haloSize, int normal, bool prettyPrint=false)
static tarch::la::Vector< 2, double > getFaceSize(const tarch::la::Vector< 2, double > &h, int numberOfVolumesPerAxisInPatch)
std::string plotVolume(const double *__restrict__ Q, int unknowns)
Helper routine that I need in the log statements.
For the generic kernels that I use here most of the time.