mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Fix pvtIndex map for cases with non-active eqlnum regions.
This commit is contained in:
parent
30192eac03
commit
f6f2a78a6c
@ -263,6 +263,8 @@ namespace Opm
|
|||||||
const auto& tables = eclipseState.getTableManager();
|
const auto& tables = eclipseState.getTableManager();
|
||||||
// Create (inverse) region mapping.
|
// Create (inverse) region mapping.
|
||||||
const RegionMapping<> eqlmap(equilnum(eclipseState, G));
|
const RegionMapping<> eqlmap(equilnum(eclipseState, G));
|
||||||
|
const int invalidRegion = -1;
|
||||||
|
regionPvtIdx_.resize(rec.size(), invalidRegion);
|
||||||
setRegionPvtIdx(G, eclipseState, eqlmap);
|
setRegionPvtIdx(G, eclipseState, eqlmap);
|
||||||
|
|
||||||
// Create Rs functions.
|
// Create Rs functions.
|
||||||
@ -371,7 +373,6 @@ namespace Opm
|
|||||||
template<class Grid, class RMap>
|
template<class Grid, class RMap>
|
||||||
void setRegionPvtIdx(const Grid& G, const Opm::EclipseState& eclipseState, const RMap& reg) {
|
void setRegionPvtIdx(const Grid& G, const Opm::EclipseState& eclipseState, const RMap& reg) {
|
||||||
|
|
||||||
regionPvtIdx_.reserve(reg.activeRegions().size());
|
|
||||||
std::vector<int> cellPvtRegionIdx;
|
std::vector<int> cellPvtRegionIdx;
|
||||||
extractPvtTableIndex(cellPvtRegionIdx, eclipseState, UgGridHelpers::numCells(G), UgGridHelpers::globalCell(G));
|
extractPvtTableIndex(cellPvtRegionIdx, eclipseState, UgGridHelpers::numCells(G), UgGridHelpers::globalCell(G));
|
||||||
for (const auto& r : reg.activeRegions()) {
|
for (const auto& r : reg.activeRegions()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user