5 const double* __restrict__ QIn,
8 int numberOfAuxiliaryVariables,
9 int numberOfDoFsPerAxisInPatch
14 _numberOfAuxiliaryVariables(numberOfAuxiliaryVariables),
15 _numberOfDoFsPerAxisInPatch(numberOfDoFsPerAxisInPatch) {}
19 if constexpr (Dimensions == 2) {
20 return (_numberOfDoFsPerAxisInPatch + 2 * _haloSize) * (_numberOfDoFsPerAxisInPatch + 2 * _haloSize)
21 * (_unknowns + _numberOfAuxiliaryVariables);
23 return (_numberOfDoFsPerAxisInPatch + 2 * _haloSize) * (_numberOfDoFsPerAxisInPatch + 2 * _haloSize)
24 * (_numberOfDoFsPerAxisInPatch + 2 * _haloSize) * (_unknowns + _numberOfAuxiliaryVariables);
32 if constexpr (Dimensions == 2) {
33 int voxelShift = relativeCellPosition(0)
34 + relativeCellPosition(1) * (_numberOfDoFsPerAxisInPatch + 2 * _haloSize);
35 return _QIn + voxelShift * (_unknowns + _numberOfAuxiliaryVariables);
37 int voxelShift = relativeCellPosition(0) + relativeCellPosition(1) * (_numberOfDoFsPerAxisInPatch + 2 * _haloSize)
38 + relativeCellPosition(2) * (_numberOfDoFsPerAxisInPatch + 2 * _haloSize)
39 * (_numberOfDoFsPerAxisInPatch + 2 * _haloSize);
40 return _QIn + voxelShift * (_unknowns + _numberOfAuxiliaryVariables);
47 return *((*this)(relativeCellPosition) + unknown);
53 relativePosition(normal) = -1;
54 return (*
this)(relativePosition);
60 relativePosition(normal) = 1;
61 return (*
this)(relativePosition);
67 relativePosition(normal) = -1;
68 return (*
this)(relativePosition, unknown);
74 relativePosition(normal) = 1;
75 return (*
this)(relativePosition, unknown);
double centre(int unknown) const
const double *__restrict__ operator()(const tarch::la::Vector< Dimensions, int > &relativeCellPosition) const
Get a pointer to another cell's data.
const double *__restrict__ left(int normal) const
Return access to the left neighbour.
CellAccess(const double *__restrict__ QIn, int haloSize, int unknowns, int numberOfAuxiliaryVariables, int numberOfDoFsPerAxisInPatch)
const double *__restrict__ right(int normal) const