From 26b67c68b11fc3c0035cac148b2ca03b1b14efca Mon Sep 17 00:00:00 2001 From: Timo Koch <timokoch@math.uio.no> Date: Thu, 30 Sep 2021 14:42:09 +0000 Subject: [PATCH] [freeflow][momentum][fcstaggered] Check dimensions of neumann flux The dimension is non-standard in the sense that we only have one dof per face but require the problem for convenience to return a full dimension vector for each coordinate direction. --- dumux/freeflow/navierstokes/momentum/localresidual.hh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dumux/freeflow/navierstokes/momentum/localresidual.hh b/dumux/freeflow/navierstokes/momentum/localresidual.hh index 54d44144bc..41807e1302 100644 --- a/dumux/freeflow/navierstokes/momentum/localresidual.hh +++ b/dumux/freeflow/navierstokes/momentum/localresidual.hh @@ -212,6 +212,13 @@ public: const SubControlVolumeFace& scvf) const { static_assert(FVElementGeometry::GridGeometry::discMethod == DiscretizationMethod::fcstaggered); // TODO overload this method for different discretizations + static_assert( + std::decay_t<decltype( + problem.neumann(element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf) + )>::size() == ModelTraits::dim(), + "The momentum model expects problem.neumann to return a vector of size dim. " + "When in doubt you should be able to use 'using NumEqVector = typename ParentType::NumEqVector;'." + ); assert(elemBcTypes.hasNeumann()); const auto& scv = fvGeometry.scv(scvf.insideScvIdx()); -- GitLab