diff --git a/dumux/discretization/evalgradients.hh b/dumux/discretization/evalgradients.hh index 0384c97c0b42ea06c5d4a6eab6b69b665c624fd0..ebce370cde58314be2e2314c17c301a0781bd56c 100644 --- a/dumux/discretization/evalgradients.hh +++ b/dumux/discretization/evalgradients.hh @@ -61,15 +61,15 @@ evalGradients(const Element& element, // evaluate gradients using the local finite element basis const auto& localBasis = fvGridGeometry.feCache().get(geometry.type()).localBasis(); - // the inverse transposed of the jacobian matrix - const auto jacInvT = g.jacobianInverseTransposed(local); - // evaluate the shape function gradients at the scv center - using ShapeJacobian = typename decltype(localBasis)::Traits::JacobianType; + using ShapeJacobian = typename std::decay_type< decltype(localBasis) >::Traits::JacobianType; const auto localPos = geometry.local(globalPos); std::vector< ShapeJacobian > shapeJacobian; localBasis.evaluateJacobian(localPos, shapeJacobian); + // the inverse transposed of the jacobian matrix + const auto jacInvT = geometry.jacobianInverseTransposed(localPos); + // interpolate the gradients Dune::FieldVector<GlobalPosition, PrimaryVariables::dimension> result( PrimaryVariables(0.0) ); for (int i = 0; i < element.subEntities(Element::Geometry::mydimension); ++i)