EclipseWriter: deal with the concept of active cells for PERM[XYZ]

... and also with grids that reorder their cell indices.
This commit is contained in:
Andreas Lauser 2016-03-14 17:52:36 +01:00
parent 3e8d6b521f
commit 31aac3481d

View File

@ -1184,16 +1184,19 @@ void EclipseWriter::writeInit(const SimulatorTimerInterface &timer)
if (eclipseState_->hasDeckDoubleGridProperty("PERMX")) {
auto data = eclipseState_->getDoubleGridProperty("PERMX")->getData();
EclipseWriterDetails::convertFromSiTo(data, Opm::prefix::milli * Opm::unit::darcy);
EclipseWriterDetails::restrictAndReorderToActiveCells(data, gridToEclipseIdx_.size(), gridToEclipseIdx_.data());
fortio.writeKeyword("PERMX", data);
}
if (eclipseState_->hasDeckDoubleGridProperty("PERMY")) {
auto data = eclipseState_->getDoubleGridProperty("PERMY")->getData();
EclipseWriterDetails::convertFromSiTo(data, Opm::prefix::milli * Opm::unit::darcy);
EclipseWriterDetails::restrictAndReorderToActiveCells(data, gridToEclipseIdx_.size(), gridToEclipseIdx_.data());
fortio.writeKeyword("PERMY", data);
}
if (eclipseState_->hasDeckDoubleGridProperty("PERMZ")) {
auto data = eclipseState_->getDoubleGridProperty("PERMZ")->getData();
EclipseWriterDetails::convertFromSiTo(data, Opm::prefix::milli * Opm::unit::darcy);
EclipseWriterDetails::restrictAndReorderToActiveCells(data, gridToEclipseIdx_.size(), gridToEclipseIdx_.data());
fortio.writeKeyword("PERMZ", data);
}
}