23 template<
class Equation>
29 typename Equation::ConstViews& in,
30 size_t x,
size_t y,
size_t z,
31 typename Equation::Views& leftView,
32 typename Equation::Views& rightView,
33 bool xDir,
bool yDir,
bool zDir) {
34 const size_t indexOut = leftView.index(x, y, z);
35 const size_t indexRight = leftView.index(x + xDir, y + yDir, z + zDir);
36 const size_t indexLeft = leftView.index(x - xDir, y - yDir, z - zDir);
38 for (
size_t var = 0; var < Equation::getNumberOfConservedVariables(); ++var) {
39 const real left = in.get(var).at(indexLeft);
40 const real middle = in.get(var).at(indexOut);
41 const real right = in.get(var).at(indexRight);
43 const real sigma =
minmod(2 * (right - middle),
47 leftView.get(var).at(indexOut) = middle - sigma / 2;
48 rightView.get(var).at(indexOut) = middle + sigma / 2;
__device__ static __host__ size_t getNumberOfGhostCells()
Definition: MC.hpp:53
alsfvm::shared_ptr< reconstruction::Reconstruction > & reconstruction
Definition: NumericalFluxFactory.cpp:101
__device__ __host__ real minmod(real a, real b)
Definition: minmod.hpp:22
#define __host__
Definition: types.hpp:46
double real
Definition: types.hpp:65
#define __device__
Definition: types.hpp:45
__device__ static __host__ void reconstruct(Equation eq, typename Equation::ConstViews &in, size_t x, size_t y, size_t z, typename Equation::Views &leftView, typename Equation::Views &rightView, bool xDir, bool yDir, bool zDir)
Definition: MC.hpp:28
Various utility functions to implement the tecno flux.
Definition: types.hpp:30