12#ifndef DUMUX_NAVIERSTOKES_STAGGERED_VELOCITYRECONSTRUCTION_HH
13#define DUMUX_NAVIERSTOKES_STAGGERED_VELOCITYRECONSTRUCTION_HH
26 template<
class VelocityHelper,
class FVElementGeometry>
28 const FVElementGeometry& fvGeometry)
31 using VelocityVector =
typename FVElementGeometry::GridGeometry::GlobalCoordinate;
32 VelocityVector result(0.0);
36 return std::find_if(vector.begin(), vector.end(), [](
const auto& x) { return std::abs(x) > 1e-8; } ) - vector.begin();
39 for (
const auto& scvf : scvfs(fvGeometry))
42 result[dirIdx] += 0.5*getFaceVelocity(fvGeometry, scvf)[dirIdx];
static unsigned int directionIndex(Vector &&vector)
Returns the direction index of the facet (0 = x, 1 = y, 2 = z)
Definition: staggeredgeometryhelper.hh:121
The available discretization methods in Dumux.
constexpr CCTpfa cctpfa
Definition: method.hh:145
Helper class for reconstructing the velocity.
Definition: velocityreconstruction.hh:24
static auto cellCenterVelocity(const VelocityHelper &getFaceVelocity, const FVElementGeometry &fvGeometry)
Return the velocity vector at the center of the primal grid.
Definition: velocityreconstruction.hh:27