EclipseWriter: fold the writeSolution_() method back into writeTimeStep()
because this was the only caller...
This commit is contained in:
parent
3ce9d6b3b1
commit
c8683b39d0
@ -1096,9 +1096,21 @@ void EclipseWriter::activeToGlobalCellData_(std::vector<double> &globalCellsBuf,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EclipseWriter::writeSolution_(const SimulatorTimer& timer,
|
void EclipseWriter::writeTimeStep(const SimulatorTimer& timer,
|
||||||
const SimulatorState& reservoirState)
|
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
|
// start writing to files
|
||||||
EclipseRestart rst(outputDir_, baseName_, timer, outputTimeStepIdx_);
|
EclipseRestart rst(outputDir_, baseName_, timer, outputTimeStepIdx_);
|
||||||
rst.writeHeader (timer, outputTimeStepIdx_, uses_, newParserDeck_, reservoirState.pressure().size ());
|
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) */
|
/* Summary variables (well reporting) */
|
||||||
// TODO: instead of writing the header (smspec) every time, it should
|
// TODO: instead of writing the header (smspec) every time, it should
|
||||||
// only be written when there is a change in the well configuration
|
// only be written when there is a change in the well configuration
|
||||||
|
@ -105,10 +105,6 @@ private:
|
|||||||
void activeToGlobalCellData_(std::vector<double> &globalCellsBuf,
|
void activeToGlobalCellData_(std::vector<double> &globalCellsBuf,
|
||||||
const std::vector<double> &activeCellsBuf,
|
const std::vector<double> &activeCellsBuf,
|
||||||
const std::vector<double> &inactiveCellsBuf) const;
|
const std::vector<double> &inactiveCellsBuf) const;
|
||||||
|
|
||||||
/// Write solution field variables (pressure and saturation)
|
|
||||||
void writeSolution_(const SimulatorTimer& timer,
|
|
||||||
const SimulatorState& reservoirState);
|
|
||||||
};
|
};
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user