From 55793cc9093d1352c464e9ca25f694ec48ca60a6 Mon Sep 17 00:00:00 2001 From: Xavier Raynaud Date: Tue, 4 Sep 2012 15:01:14 +0200 Subject: [PATCH] Use same search interval in computation of flux and gravity residuals. --- .../transport/reorder/TransportModelCompressibleTwophase.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opm/core/transport/reorder/TransportModelCompressibleTwophase.cpp b/opm/core/transport/reorder/TransportModelCompressibleTwophase.cpp index 9bfd8b7bb..0364c4d3a 100644 --- a/opm/core/transport/reorder/TransportModelCompressibleTwophase.cpp +++ b/opm/core/transport/reorder/TransportModelCompressibleTwophase.cpp @@ -444,9 +444,8 @@ namespace Opm GravityResidual res(*this, cells, pos, gravflux); if (std::fabs(res(saturation_[cell])) > tol_) { int iters_used; - saturation_[cell] = RootFinder::solve(res, smin_[2*cell], smax_[2*cell], maxit_, tol_, iters_used); + saturation_[cell] = RootFinder::solve(res, 0.0, 1.0, maxit_, tol_, iters_used); } - saturation_[cell] = std::min(std::max(saturation_[cell], smin_[2*cell]), smax_[2*cell]); mobility(saturation_[cell], cell, &mob_[2*cell]); }