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
225 const double* __restrict__ Q,
226 int unknownsPlusAuxiliaryVariables,
227 int numberOfVolumesPerAxisInPatch,
232 double* __restrict__ gradient
243 const double* __restrict__ Q,
262 const double* __restrict__ Q,
264 int auxiliaryVariables,
265 int numberOfVolumesPerAxisInPatch,
267 const std::string& location =
"",
268 bool triggerNonCriticalAssertion =
true,
269 double* minValues =
nullptr,
270 double* maxValues =
nullptr
282 const double* __restrict__ Q,
284 int auxiliaryVariables,
285 int numberOfVolumesPerAxisInPatch,
287 bool prettyPrint =
false
292 const double* __restrict__ Q,
294 int auxiliaryVariables,
295 int numberOfGridCellsPerPatchPerAxis,
298 bool prettyPrint =
false
310 int unknownsPlusAuxiliaryVariables,
311 int numberOfGridCellsPerPatchPerAxis,
315 const double* __restrict__ srcQ,
316 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)
void computeOneSidedGradient(const double *__restrict__ Q, int unknownsPlusAuxiliaryVariables, int numberOfVolumesPerAxisInPatch, const tarch::la::Vector< Dimensions, int > &volume, int normal, bool isRight, double volumeSize, double *__restrict__ gradient)
Compute a one-sided difference quotient of the solution within a patch.
std::string plotVolume(const double *__restrict__ Q, int unknowns)
Helper routine that I need in the log statements.
This file is part of the ExaHyPE 2 project within Peano 4.