output writers: remove the state parameters from writeInit()

because as discussed with Atgeirr, this function should no longer
write the initial solution, it also does no longer need to know the
initial simulator state...
This commit is contained in:
Andreas Lauser
2014-04-02 16:38:53 +02:00
parent a02f315ace
commit 3ce9d6b3b1
5 changed files with 22 additions and 28 deletions

View File

@@ -25,11 +25,9 @@ struct MultiWriter : public OutputWriter {
MultiWriter (ptr_t writers) : writers_ (std::move (writers)) { }
/// Forward the call to all writers
virtual void writeInit(const SimulatorTimer &timer,
const SimulatorState& reservoirState,
const WellState& wellState) {
virtual void writeInit(const SimulatorTimer &timer) {
for (it_t it = writers_->begin (); it != writers_->end (); ++it) {
(*it)->writeInit (timer, reservoirState, wellState);
(*it)->writeInit (timer);
}
}

View File

@@ -67,15 +67,12 @@ public:
virtual ~OutputWriter () { }
/**
* Write the static eclipse data (grid, PVT curves, etc) as well as the
* initial state to disk.
* Write the static data (grid, PVT curves, etc) to disk.
*
* This routine should be called before the first timestep (i.e. when
* timer.currentStepNum () == 0)
*/
virtual void writeInit(const SimulatorTimer &timer,
const SimulatorState& reservoirState,
const WellState& wellState) = 0;
virtual void writeInit(const SimulatorTimer &timer) = 0;
/*!
* \brief Write a blackoil reservoir state to disk for later inspection with

View File

@@ -1035,9 +1035,7 @@ EclipseSummary::addWells (Opm::DeckConstPtr newParserDeck,
namespace Opm {
void EclipseWriter::writeInit(const SimulatorTimer &timer,
const SimulatorState& reservoirState,
const WellState& wellState)
void EclipseWriter::writeInit(const SimulatorTimer &timer)
{
// if we don't want to write anything, this method becomes a
// no-op...
@@ -1076,9 +1074,6 @@ void EclipseWriter::writeInit(const SimulatorTimer &timer,
fortio.writeKeyword ("PERMZ", data);
}
/* Initial solution (pressure and saturation) */
writeSolution_(timer, reservoirState);
/* Create summary object (could not do it at construction time,
since it requires knowledge of the start time). */
summary_.reset(new EclipseSummary(outputDir_, baseName_, timer, newParserDeck_));
@@ -1169,14 +1164,14 @@ void EclipseWriter::writeTimeStep(const SimulatorTimer& timer,
// will contain data from the whole simulation, instead of just
// the last step.
summary_->writeTimeStep(timer, wellState);
++outputTimeStepIdx_;
}
#else
namespace Opm {
void EclipseWriter::writeInit(const SimulatorTimer&,
const SimulatorState&,
const WellState&)
void EclipseWriter::writeInit(const SimulatorTimer&)
{
// if we don't want to write anything, this method becomes a
// no-op...

View File

@@ -69,16 +69,20 @@ public:
virtual ~EclipseWriter ();
/**
* Write the static eclipse data (grid, PVT curves, etc) as well as the
* initial state to disk.
* Write the static eclipse data (grid, PVT curves, etc) to disk.
*/
virtual void writeInit(const SimulatorTimer &timer,
const SimulatorState& reservoirState,
const WellState& wellState);
virtual void writeInit(const SimulatorTimer &timer);
/*!
* \brief Write a blackoil reservoir state to disk for later inspection with
* visualization tools like ResInsight
* \brief Write a reservoir state and summary information to disk.
*
*
* The reservoir state can be inspected with visualization tools like
* ResInsight.
*
* The summary information can then be visualized using tools from
* ERT or ECLIPSE. Note that calling this method is only
* meaningful after the first time step has been completed.
*
* \param[in] reservoirState The thermodynamic state of the reservoir
* \param[in] wellState The production/injection data for all wells

View File

@@ -53,7 +53,7 @@ SimulatorOutputBase::SimulatorOutputBase (
, next_ (0) {
// write the static initialization files, even before simulation starts
writer_->writeInit (*timer, *state, *wellState);
writer_->writeInit (*timer);
}
// default destructor is OK, just need to be defined