Merge pull request #829 from bska/groupid-out-of-bounds

INTEHEAD: Store Actual Maximum Number of Groups in Item 21
This commit is contained in:
Joakim Hove 2019-06-19 15:36:33 +02:00 committed by GitHub
commit 2da74c7d80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,6 +71,7 @@ namespace {
Opm::RestartIO::InteHEAD::WellTableDim
getWellTableDims(const int nwgmax,
const int ngmax,
const ::Opm::Runspec& rspec,
const ::Opm::Schedule& sched,
const std::size_t lookup_step)
@ -86,7 +87,8 @@ namespace {
const auto maxWellInGroup =
std::max(wd.maxWellsPerGroup(), nwgmax);
const auto maxGroupInField = wd.maxGroupsInField();
const auto maxGroupInField =
std::max(wd.maxGroupsInField(), ngmax);
return {
numWells,
@ -258,7 +260,8 @@ createInteHead(const EclipseState& es,
.dimensions (grid.getNXYZ())
.numActive (static_cast<int>(grid.getNumActive()))
.unitConventions (getUnitConvention(es.getDeckUnitSystem()))
.wellTableDimensions(getWellTableDims(nwgmax, rspec, sched, lookup_step))
.wellTableDimensions(getWellTableDims(nwgmax, ngmax, rspec,
sched, lookup_step))
.calendarDate (getSimulationTimePoint(sched.posixStartTime(), simTime))
.activePhases (getActivePhases(rspec))
// The numbers below have been determined experimentally to work