From a47ef1412c795082b59b2e9e35d19045f950fa49 Mon Sep 17 00:00:00 2001 From: DennisGlaeser <dennis.glaeser@iws.uni-stuttgart.de> Date: Mon, 11 Dec 2017 16:49:30 +0100 Subject: [PATCH] [elemsol] get rid of /= operator --- dumux/discretization/box/elementsolution.hh | 8 -------- dumux/discretization/cellcentered/elementsolution.hh | 8 -------- dumux/porousmediumflow/2p/implicit/griddatatransfer.hh | 5 +++-- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/dumux/discretization/box/elementsolution.hh b/dumux/discretization/box/elementsolution.hh index 59f21e4394..6e5e27539f 100644 --- a/dumux/discretization/box/elementsolution.hh +++ b/dumux/discretization/box/elementsolution.hh @@ -103,14 +103,6 @@ public: PrimaryVariables& operator [](IndexType i) { return priVars_[i]; } - //! \brief vector space division by scalar - template <typename FieldType> - BoxElementSolution& operator/= (const FieldType& k) - { - priVars_ /= k; - return *this; - } - private: Dune::BlockVector<PrimaryVariables> priVars_; }; diff --git a/dumux/discretization/cellcentered/elementsolution.hh b/dumux/discretization/cellcentered/elementsolution.hh index 328825fccf..6cc65557f0 100644 --- a/dumux/discretization/cellcentered/elementsolution.hh +++ b/dumux/discretization/cellcentered/elementsolution.hh @@ -94,14 +94,6 @@ public: return priVars_; } - //! \brief vector space division by scalar - template <typename FieldType> - CCElementSolution& operator/= (const FieldType& k) - { - priVars_ /= k; - return *this; - } - private: PrimaryVariables priVars_; }; diff --git a/dumux/porousmediumflow/2p/implicit/griddatatransfer.hh b/dumux/porousmediumflow/2p/implicit/griddatatransfer.hh index d6bd08b01a..158f170e76 100644 --- a/dumux/porousmediumflow/2p/implicit/griddatatransfer.hh +++ b/dumux/porousmediumflow/2p/implicit/griddatatransfer.hh @@ -204,7 +204,8 @@ public: //! obtain element solution from map (divide by count!) auto elemSol = adaptedValues.u; - elemSol /= adaptedValues.count; + if (!isBox) + elemSol[0] /= adaptedValues.count; const auto elementVolume = element.geometry().volume(); for (const auto& scv : scvs(fvGeometry)) @@ -275,7 +276,7 @@ public: // obtain the element solution through the father auto elemSolSon = adaptedValuesFather.u; - elemSolSon /= adaptedValuesFather.count; + elemSolSon[0] /= adaptedValuesFather.count; auto fvGeometry = localView(*fvGridGeometry_); fvGeometry.bindElement(element); -- GitLab