From 2f8664f2cab76abf4f0cdf362632c9bdc4ec400c Mon Sep 17 00:00:00 2001 From: DennisGlaeser <dennis.glaeser@iws.uni-stuttgart.de> Date: Thu, 11 Jan 2018 18:42:22 +0100 Subject: [PATCH] [box][gridvolvars] introduce [] operator for scv in case of caching This is needed for compatibility with the new FvAssemblerBase class. --- dumux/discretization/box/gridvolumevariables.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dumux/discretization/box/gridvolumevariables.hh b/dumux/discretization/box/gridvolumevariables.hh index 7875b88304..b4aa07fd26 100644 --- a/dumux/discretization/box/gridvolumevariables.hh +++ b/dumux/discretization/box/gridvolumevariables.hh @@ -86,6 +86,12 @@ public: friend inline ElementVolumeVariables localView(const BoxGridVolumeVariables& global) { return ElementVolumeVariables(global); } + const VolumeVariables& volVars(const SubControlVolume& scv) const + { return volumeVariables_[scv.elementIndex()][scv.indexInElement()]; } + + VolumeVariables& volVars(const SubControlVolume& scv) + { return volumeVariables_[scv.elementIndex()][scv.indexInElement()]; } + const VolumeVariables& volVars(const IndexType eIdx, const IndexType scvIdx) const { return volumeVariables_[eIdx][scvIdx]; } -- GitLab