mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adapt to the change of the API due to using compressed instead of cartesian indices
This commit is contained in:
@@ -251,9 +251,21 @@ try
|
||||
const PhaseUsage pu = Opm::phaseUsageFromDeck(deck);
|
||||
Opm::BlackoilOutputWriter outputWriter(grid, param, eclipseState, pu );
|
||||
|
||||
int numCells = Opm::UgGridHelpers::numCells(grid);
|
||||
const auto& globalCell = Opm::UgGridHelpers::globalCell(grid);
|
||||
std::vector<int> compressedToCartesianIdx(numCells);
|
||||
for (unsigned cellIdx = 0; cellIdx < numCells; ++cellIdx) {
|
||||
if (globalCell) {
|
||||
compressedToCartesianIdx[cellIdx] = globalCell[cellIdx];
|
||||
}
|
||||
else {
|
||||
compressedToCartesianIdx[cellIdx] = cellIdx;
|
||||
}
|
||||
}
|
||||
|
||||
typedef BlackoilPropsAdFromDeck::MaterialLawManager MaterialLawManager;
|
||||
auto materialLawManager = std::make_shared<MaterialLawManager>();
|
||||
materialLawManager->initFromDeck(deck, eclipseState);
|
||||
materialLawManager->initFromDeck(deck, eclipseState, compressedToCartesianIdx);
|
||||
|
||||
// Rock and fluid init
|
||||
BlackoilPropertiesFromDeck props( deck, eclipseState, materialLawManager,
|
||||
|
||||
Reference in New Issue
Block a user