diff --git a/dumux/implicit/localresidual.hh b/dumux/implicit/localresidual.hh index 61d66ea4de12aa03bd8903ed97df4b49664391f1..71192cc5ad7d40756cb08fa6e2a2c652e9e9caed 100644 --- a/dumux/implicit/localresidual.hh +++ b/dumux/implicit/localresidual.hh @@ -41,6 +41,7 @@ namespace Dumux template<class TypeTag> class ImplicitLocalResidual { + friend class typename GET_PROP_TYPE(TypeTag, LocalJacobian); private: typedef typename GET_PROP_TYPE(TypeTag, LocalResidual) Implementation; typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem; @@ -244,7 +245,7 @@ protected: // calculate the mass flux over the scv faces and subtract for (auto&& scvFace : fvGeometry_().scvfs()) { - PrimaryVariables flux = asImp_().computeFlux_(flux, scvFace); + PrimaryVariables flux = asImp_().computeFlux_(scvFace); if (!isBox) residual_[0] += flux; @@ -259,6 +260,18 @@ protected: } } + PrimaryVariables evalFlux_(const int scvFaceIdx) + { + auto&& scvFace = problem_().model().fvGeometries().subControlVolumeFace(scvFaceIdx); + + return evalFlux_(scvFace); + } + + PrimaryVariables evalFlux_(const subControlVolumeFace &scvFace) + { + return asImp_().computeFlux_(scvFace); + } + /*! * \brief Set the local residual to the storage terms of all * sub-control volumes of the current element.