Peano
Loading...
Searching...
No Matches
CellAccess.h
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
3#pragma once
4
5
6#include <functional>
7#include <string>
8
10#include "tarch/la/Vector.h"
11
12
13namespace exahype2 {
29 class CellAccess {
30 public:
32 const double* __restrict__ QIn,
33 int haloSize,
34 int unknowns,
35 int numberOfAuxiliaryVariables,
36 int numberOfDoFsPerAxisInPatch
37 );
38
39 ~CellAccess() = default;
40
41 int size() const;
42
50 const double* __restrict__ operator()(const tarch::la::Vector<Dimensions, int>& relativeCellPosition) const;
51 double operator()(const tarch::la::Vector<Dimensions, int>& relativeCellPosition, int unknown) const;
52
53 double centre(int unknown) const;
54
59 const double* __restrict__ left(int normal) const;
60 const double* __restrict__ right(int normal) const;
61
62 double left(int normal, int unknown) const;
63 double right(int normal, int unknown) const;
64
65 std::string toString() const;
66
67 private:
68 const double* __restrict__ _QIn;
69 const int _haloSize;
70 const int _unknowns;
73 };
74} // namespace exahype2
Cell access class.
Definition CellAccess.h:29
double centre(int unknown) const
const int _numberOfDoFsPerAxisInPatch
Definition CellAccess.h:72
const double *__restrict__ operator()(const tarch::la::Vector< Dimensions, int > &relativeCellPosition) const
Get a pointer to another cell's data.
const int _numberOfAuxiliaryVariables
Definition CellAccess.h:71
std::string toString() const
const double *__restrict__ _QIn
Definition CellAccess.h:68
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)
Definition CellAccess.cpp:4
const double *__restrict__ right(int normal) const
For the generic kernels that I use here most of the time.
Definition CellAccess.h:13
Simple vector class.
Definition Vector.h:134