EclipseWriter: fold the writeSolution_() method back into writeTimeStep()

because this was the only caller...
This commit is contained in:
Andreas Lauser 2014-04-02 16:45:46 +02:00
parent 3ce9d6b3b1
commit c8683b39d0
2 changed files with 14 additions and 27 deletions

View File

@ -1096,9 +1096,21 @@ void EclipseWriter::activeToGlobalCellData_(std::vector<double> &globalCellsBuf,
}
}
void EclipseWriter::writeSolution_(const SimulatorTimer& timer,
const SimulatorState& reservoirState)
void EclipseWriter::writeTimeStep(const SimulatorTimer& timer,
const SimulatorState& reservoirState,
const WellState& wellState)
{
// if we don't want to write anything, this method becomes a
// no-op...
if (!enableOutput_) {
return;
}
// respected the output_interval parameter
if (outputTimeStepIdx_ % outputInterval_ != 0) {
return;
}
// start writing to files
EclipseRestart rst(outputDir_, baseName_, timer, outputTimeStepIdx_);
rst.writeHeader (timer, outputTimeStepIdx_, uses_, newParserDeck_, reservoirState.pressure().size ());
@ -1128,27 +1140,6 @@ void EclipseWriter::writeSolution_(const SimulatorTimer& timer,
}
}
++outputTimeStepIdx_;
}
void EclipseWriter::writeTimeStep(const SimulatorTimer& timer,
const SimulatorState& reservoirState,
const WellState& wellState)
{
// if we don't want to write anything, this method becomes a
// no-op...
if (!enableOutput_) {
return;
}
// respected the output_interval parameter
if (timer.currentStepNum() % outputInterval_ != 0) {
return;
}
/* Field variables (pressure, saturation) */
writeSolution_(timer, reservoirState);
/* Summary variables (well reporting) */
// TODO: instead of writing the header (smspec) every time, it should
// only be written when there is a change in the well configuration

View File

@ -105,10 +105,6 @@ private:
void activeToGlobalCellData_(std::vector<double> &globalCellsBuf,
const std::vector<double> &activeCellsBuf,
const std::vector<double> &inactiveCellsBuf) const;
/// Write solution field variables (pressure and saturation)
void writeSolution_(const SimulatorTimer& timer,
const SimulatorState& reservoirState);
};
} // namespace Opm