diff --git a/dumux/implicit/staggered/localjacobian.hh b/dumux/implicit/staggered/localjacobian.hh index 852308e27aa7ba485d029f99ae1eb4aa91c5b7b1..983fb36cc09fd56fd98ef0f8bb9c43644d5f8e4f 100644 --- a/dumux/implicit/staggered/localjacobian.hh +++ b/dumux/implicit/staggered/localjacobian.hh @@ -168,8 +168,8 @@ public: ElementBoundaryTypes elemBcTypes; elemBcTypes.update(this->problem_(), element, fvGeometry); - auto& curGlobalFaceVars = this->model_().nonConstCurFaceVars(); - auto& prevGlobalFaceVars = this->model_().prevGlobalFaceVars(); + auto& curGlobalFaceVars = getCurrNonConstGlobalFaceVars_(); + auto& prevGlobalFaceVars = getPrevGlobalFaceVars_(); // calculate the local residual for all dofs of this element this->localResidual().eval(element, fvGeometry, @@ -562,6 +562,19 @@ protected: getCurVolVars(ElementVolumeVariables& elemVolVars, const SubControlVolume& scv) { return elemVolVars[scv]; } + + //! Convenience function to get the current non-const global face vars. This is necessary for classes that inherit from this class. + auto& getCurrNonConstGlobalFaceVars_() + { + return this->model_().nonConstCurFaceVars(); + } + + //! Convenience function to get the previous global face vars + auto& getPrevGlobalFaceVars_() + { + return this->model_().prevGlobalFaceVars(); + } + IndexType ccGlobalI_; int numericDifferenceMethod_;