From dd97fc89082efdaa5bede37d41f9b1834f5f127c Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Thu, 23 Nov 2017 11:15:50 +0100 Subject: [PATCH] Some clean up. --- opm/autodiff/StandardWell_impl.hpp | 7 +------ opm/autodiff/WellInterface.hpp | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/opm/autodiff/StandardWell_impl.hpp b/opm/autodiff/StandardWell_impl.hpp index 65c685d16..33b944401 100644 --- a/opm/autodiff/StandardWell_impl.hpp +++ b/opm/autodiff/StandardWell_impl.hpp @@ -884,12 +884,7 @@ namespace Opm // F_solvent is added to F_gas. This means that well_rate[Gas] also contains solvent. // More testing is needed to make sure this is correct for well groups and THP. if (has_solvent){ - const double scal = scalingFactor(contiSolventEqIdx); - if (scal > 0) { - F_solvent /= scal ; - } else { - F_solvent = 0.; - } + F_solvent /= scalingFactor(contiSolventEqIdx); F[pu.phase_pos[Gas]] += F_solvent; } diff --git a/opm/autodiff/WellInterface.hpp b/opm/autodiff/WellInterface.hpp index 3365794c6..20a420a08 100644 --- a/opm/autodiff/WellInterface.hpp +++ b/opm/autodiff/WellInterface.hpp @@ -280,7 +280,7 @@ namespace Opm // The pvt region of the well. We assume // We assume a well to not penetrate more than one pvt region. - int pvtRegionIdx_; + const int pvtRegionIdx_; const std::vector& active() const;