diff --git a/opm/core/io/eclipse/EclipseWriter.cpp b/opm/core/io/eclipse/EclipseWriter.cpp index f554da30..acd0a9f4 100644 --- a/opm/core/io/eclipse/EclipseWriter.cpp +++ b/opm/core/io/eclipse/EclipseWriter.cpp @@ -895,13 +895,10 @@ void EclipseWriter::writeInit(const SimulatorTimer &timer) { fortio.writeKeyword ("PERMZ", *parser_); } -void EclipseWriter::writeTimeStep( - const SimulatorTimer& timer, - const SimulatorState& reservoirState, - const WellState& wellState) { - // eclipse timestep index - const int timeStep = stepNum (timer); - +void EclipseWriter::writeSolution (const int timeStep, + const SimulatorTimer& timer, + const SimulatorState& reservoirState, + const WellState& wellState) { // convert the pressures from Pascals to bar because eclipse // seems to write bars const std::vector& pas = reservoirState.pressure (); @@ -935,6 +932,14 @@ void EclipseWriter::writeTimeStep( uses_.num_phases)); } } +} + +void EclipseWriter::writeTimeStep(const SimulatorTimer& timer, + const SimulatorState& reservoirState, + const WellState& wellState) { + // eclipse timestep index + const int timeStep = stepNum (timer); + writeSolution (timeStep, timer, reservoirState, wellState); /* Summary variables (well reporting) */ // TODO: instead of writing the header (smspec) every time, it should diff --git a/opm/core/io/eclipse/EclipseWriter.hpp b/opm/core/io/eclipse/EclipseWriter.hpp index cc838a55..73c0d551 100644 --- a/opm/core/io/eclipse/EclipseWriter.hpp +++ b/opm/core/io/eclipse/EclipseWriter.hpp @@ -87,6 +87,12 @@ private: std::string outputDir_; std::string baseName_; PhaseUsage uses_; // active phases in the input deck + + /// Write solution field variables (pressure and saturation) + void writeSolution (const int timeStep, + const SimulatorTimer& timer, + const SimulatorState& reservoirState, + const WellState& wellState); }; } // namespace Opm