From be79453e80789c012b884193660a6a044e169972 Mon Sep 17 00:00:00 2001 From: Bernd Flemisch <bernd@iws.uni-stuttgart.de> Date: Mon, 8 Oct 2012 15:52:36 +0000 Subject: [PATCH] Deprecate the primaryVarWeight methods according to FS#166. git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@9244 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/boxmodels/2p/2pmodel.hh | 1 + dumux/boxmodels/2p2c/2p2cmodel.hh | 1 + dumux/boxmodels/3p3c/3p3cmodel.hh | 1 + dumux/boxmodels/common/boxmodel.hh | 3 +-- dumux/boxmodels/richards/richardsmodel.hh | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dumux/boxmodels/2p/2pmodel.hh b/dumux/boxmodels/2p/2pmodel.hh index 718f2647b8..27c30c3bd8 100644 --- a/dumux/boxmodels/2p/2pmodel.hh +++ b/dumux/boxmodels/2p/2pmodel.hh @@ -107,6 +107,7 @@ public: * \param globalIdx The global index of the vertex * \param pvIdx The index of the primary variable */ + DUNE_DEPRECATED Scalar primaryVarWeight(int globalIdx, int pvIdx) const { if (pressureIdx == pvIdx) diff --git a/dumux/boxmodels/2p2c/2p2cmodel.hh b/dumux/boxmodels/2p2c/2p2cmodel.hh index 2cc5194cb1..84c47e8fa5 100644 --- a/dumux/boxmodels/2p2c/2p2cmodel.hh +++ b/dumux/boxmodels/2p2c/2p2cmodel.hh @@ -247,6 +247,7 @@ public: * \param globalIdx The global vertex index * \param pvIdx The primary variable index */ + DUNE_DEPRECATED Scalar primaryVarWeight(const int globalIdx, const int pvIdx) const { if (Indices::pressureIdx == pvIdx) diff --git a/dumux/boxmodels/3p3c/3p3cmodel.hh b/dumux/boxmodels/3p3c/3p3cmodel.hh index 2e4ea7764f..7064f4c6f2 100644 --- a/dumux/boxmodels/3p3c/3p3cmodel.hh +++ b/dumux/boxmodels/3p3c/3p3cmodel.hh @@ -215,6 +215,7 @@ public: * \param globalVertexIdx The global vertex index * \param pvIdx The primary variable index */ + DUNE_DEPRECATED Scalar primaryVarWeight(int globalVertexIdx, int pvIdx) const { if (Indices::pressureIdx == pvIdx) diff --git a/dumux/boxmodels/common/boxmodel.hh b/dumux/boxmodels/common/boxmodel.hh index b0cef59e26..5443e8c4cc 100644 --- a/dumux/boxmodels/common/boxmodel.hh +++ b/dumux/boxmodels/common/boxmodel.hh @@ -359,6 +359,7 @@ public: * \param vertIdx The global index of the control volume * \param pvIdx The index of the primary variable */ + DUNE_DEPRECATED Scalar primaryVarWeight(const int vertIdx, const int pvIdx) const { return 1.0/std::max(std::abs(this->prevSol()[vertIdx][pvIdx]), 1.0); @@ -385,8 +386,6 @@ public: { Scalar result = 0.0; for (int j = 0; j < numEq; ++j) { - //Scalar weight = asImp_().primaryVarWeight(vertexIdx, j); - //Scalar eqErr = std::abs(priVars1[j] - priVars2[j])*weight; Scalar eqErr = std::abs(priVars1[j] - priVars2[j]); eqErr /= std::max<Scalar>(1.0, std::abs(priVars1[j] + priVars2[j])/2); diff --git a/dumux/boxmodels/richards/richardsmodel.hh b/dumux/boxmodels/richards/richardsmodel.hh index 114af0f642..e2acd601ab 100644 --- a/dumux/boxmodels/richards/richardsmodel.hh +++ b/dumux/boxmodels/richards/richardsmodel.hh @@ -123,6 +123,7 @@ public: /*! * \copydoc Dumux::BoxModel::primaryVarWeight */ + DUNE_DEPRECATED Scalar primaryVarWeight(const int vertIdx, const int pvIdx) const { if (Indices::pwIdx == pvIdx) -- GitLab