From 5f21e97618631ff65823c702526a9c8576d013a6 Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt Date: Thu, 3 Aug 2017 18:12:16 +0200 Subject: [PATCH] [staggered][localJacobian] Allow inherting classes access to faceVars * Specialization of the localJacobian need access to the non-const version of the faceVars. This concept might be revised. --- dumux/implicit/staggered/localjacobian.hh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dumux/implicit/staggered/localjacobian.hh b/dumux/implicit/staggered/localjacobian.hh index 852308e27a..983fb36cc0 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_; -- GitLab