Rise up a warning if equil region has no active cells.

This commit is contained in:
Liu Ming 2016-06-15 15:40:38 +08:00 committed by Andreas Lauser
parent 9e4af968db
commit f089b00a30

View File

@ -37,6 +37,7 @@
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp> #include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/RsvdTable.hpp> #include <opm/parser/eclipse/EclipseState/Tables/RsvdTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/RvvdTable.hpp> #include <opm/parser/eclipse/EclipseState/Tables/RvvdTable.hpp>
#include <opm/common/OpmLog/OpmLog.hpp>
#include <array> #include <array>
#include <cassert> #include <cassert>
@ -389,11 +390,14 @@ namespace Opm
const Grid& G , const Grid& G ,
const double grav) const double grav)
{ {
int regnum = 0;
for (const auto& r : reg.activeRegions()) { for (const auto& r : reg.activeRegions()) {
regnum++ ;
const auto& cells = reg.cells(r); const auto& cells = reg.cells(r);
if (cells.empty()) if (cells.empty())
{ {
continue; OpmLog::warning("Equilibration region " + std::to_string(regnum)
+ " has no active cells");
} }
const int repcell = *cells.begin(); const int repcell = *cells.begin();