Copy and save a Grid copy in Writer; apply actnum

Simulators might modify the grid post EclipseState creation, so the Grid
fetched from there is unreliable. Copy the Deck-provided grid and apply
the manipulations at EclipseWriter construction time to ensure it uses
the same dimensions and has the same properties as the simulator.
This commit is contained in:
Jørgen Kvalsvik
2016-06-16 13:16:00 +02:00
parent 6f531033be
commit 7c82e69a00
6 changed files with 58 additions and 51 deletions

View File

@@ -141,9 +141,9 @@ BOOST_AUTO_TEST_CASE(EclipseWriteRestartWellInfo) {
auto es = Parser::parse( eclipse_data_filename, ParseContext() );
auto eclipseState = std::make_shared< EclipseState >( es );
const auto num_cells = eclipseState->getInputGrid()->getCartesianSize();
EclipseWriter eclipseWriter( eclipseState, num_cells, nullptr );
EclipseWriter eclipseWriter( eclipseState, num_cells, nullptr, NNC() );
eclipseWriter.writeInit( NNC() );
eclipseWriter.writeInit();
int countTimeStep = eclipseState->getSchedule()->getTimeMap()->numTimesteps();