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