From a920b43e2180d2a550b8728ba856b265e68ea165 Mon Sep 17 00:00:00 2001 From: Liu Ming Date: Wed, 15 Jun 2016 15:40:38 +0800 Subject: [PATCH 1/3] Rise up a warning if equil region has no active cells. --- opm/core/simulator/initStateEquil.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/opm/core/simulator/initStateEquil.hpp b/opm/core/simulator/initStateEquil.hpp index 2b4b02b1f..bff1813ca 100644 --- a/opm/core/simulator/initStateEquil.hpp +++ b/opm/core/simulator/initStateEquil.hpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -389,11 +390,14 @@ namespace Opm const Grid& G , const double grav) { + int regnum = 0; for (const auto& r : reg.activeRegions()) { + regnum++ ; const auto& cells = reg.cells(r); if (cells.empty()) { - continue; + OpmLog::warning("Equilibration region " + std::to_string(regnum) + + " has no active cells"); } const int repcell = *cells.begin(); From a9c2128daa6e5d469b02b96437480bf5f3934670 Mon Sep 17 00:00:00 2001 From: Liu Ming Date: Wed, 15 Jun 2016 16:52:32 +0800 Subject: [PATCH 2/3] use correct region number. --- opm/core/simulator/initStateEquil.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/opm/core/simulator/initStateEquil.hpp b/opm/core/simulator/initStateEquil.hpp index bff1813ca..7ed55cb56 100644 --- a/opm/core/simulator/initStateEquil.hpp +++ b/opm/core/simulator/initStateEquil.hpp @@ -390,14 +390,13 @@ namespace Opm const Grid& G , const double grav) { - int regnum = 0; for (const auto& r : reg.activeRegions()) { - regnum++ ; const auto& cells = reg.cells(r); if (cells.empty()) { - OpmLog::warning("Equilibration region " + std::to_string(regnum) + OpmLog::warning("Equilibration region " + std::to_string(r) + " has no active cells"); + continue; } const int repcell = *cells.begin(); From 123159460054d65b0fbdec97e0a2cbc0bf695ef4 Mon Sep 17 00:00:00 2001 From: Liu Ming Date: Wed, 15 Jun 2016 16:53:51 +0800 Subject: [PATCH 3/3] it should be the same number in EQLNUM. --- opm/core/simulator/initStateEquil.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/core/simulator/initStateEquil.hpp b/opm/core/simulator/initStateEquil.hpp index 7ed55cb56..b03d488a0 100644 --- a/opm/core/simulator/initStateEquil.hpp +++ b/opm/core/simulator/initStateEquil.hpp @@ -394,7 +394,7 @@ namespace Opm const auto& cells = reg.cells(r); if (cells.empty()) { - OpmLog::warning("Equilibration region " + std::to_string(r) + OpmLog::warning("Equilibration region " + std::to_string(r + 1) + " has no active cells"); continue; }