Use more generic simulator state
We can dump the state of the two-phase incompressible simulators as well as the blackoil simulators by just using the common interface.
This commit is contained in:
parent
754ff4c2ee
commit
aff6fad661
@ -32,7 +32,7 @@ struct MultiWriter : public OutputWriter {
|
||||
}
|
||||
|
||||
virtual void writeTimeStep(const SimulatorTimer& timer,
|
||||
const BlackoilState& reservoirState,
|
||||
const SimulatorState& reservoirState,
|
||||
const WellState& wellState) {
|
||||
for (it_t it = writers_->begin (); it != writers_->end(); ++it) {
|
||||
(*it)->writeTimeStep (timer, reservoirState, wellState);
|
||||
|
@ -27,9 +27,9 @@ struct UnstructuredGrid;
|
||||
namespace Opm {
|
||||
|
||||
// forward declaration
|
||||
class BlackoilState;
|
||||
class EclipseGridParser;
|
||||
namespace parameter { class ParameterGroup; }
|
||||
class SimulatorState;
|
||||
class SimulatorTimer;
|
||||
class WellState;
|
||||
|
||||
@ -72,7 +72,7 @@ public:
|
||||
* \param[in] wellState The production/injection data for all wells
|
||||
*/
|
||||
virtual void writeTimeStep(const SimulatorTimer& timer,
|
||||
const BlackoilState& reservoirState,
|
||||
const SimulatorState& reservoirState,
|
||||
const WellState& wellState) = 0;
|
||||
|
||||
/*!
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <opm/core/io/eclipse/EclipseGridParser.hpp>
|
||||
#include <opm/core/props/BlackoilPhases.hpp>
|
||||
#include <opm/core/props/phaseUsageFromDeck.hpp>
|
||||
#include <opm/core/simulator/BlackoilState.hpp>
|
||||
#include <opm/core/simulator/SimulatorState.hpp>
|
||||
#include <opm/core/simulator/SimulatorTimer.hpp>
|
||||
#include <opm/core/simulator/WellState.hpp>
|
||||
#include <opm/core/utility/ErrorMacros.hpp>
|
||||
@ -896,7 +896,7 @@ void EclipseWriter::writeInit(const SimulatorTimer &timer) {
|
||||
|
||||
void EclipseWriter::writeTimeStep(
|
||||
const SimulatorTimer& timer,
|
||||
const BlackoilState& reservoirState,
|
||||
const SimulatorState& reservoirState,
|
||||
const WellState& wellState) {
|
||||
// convert the pressures from Pascals to bar because eclipse
|
||||
// seems to write bars
|
||||
@ -945,7 +945,7 @@ void EclipseWriter::writeInit(const SimulatorTimer &timer) {
|
||||
|
||||
void EclipseWriter::writeTimeStep(
|
||||
const SimulatorTimer& timer,
|
||||
const BlackoilState& reservoirState,
|
||||
const SimulatorState& reservoirState,
|
||||
const WellState& wellState) {
|
||||
OPM_THROW(std::runtime_error,
|
||||
"The ERT libraries are required to write ECLIPSE output files.");
|
||||
|
@ -32,8 +32,8 @@ struct UnstructuredGrid;
|
||||
namespace Opm {
|
||||
|
||||
// forward declarations
|
||||
class BlackoilState;
|
||||
class EclipseGridParser;
|
||||
class SimulatorState;
|
||||
class SimulatorTimer;
|
||||
class WellState;
|
||||
|
||||
@ -83,7 +83,7 @@ public:
|
||||
* \param[in] wellState The production/injection data for all wells
|
||||
*/
|
||||
virtual void writeTimeStep(const SimulatorTimer& timer,
|
||||
const BlackoilState& reservoirState,
|
||||
const SimulatorState& reservoirState,
|
||||
const WellState& wellState);
|
||||
|
||||
private:
|
||||
|
@ -33,7 +33,7 @@ SimulatorOutputBase::SimulatorOutputBase (
|
||||
std::shared_ptr <const EclipseGridParser> parser,
|
||||
std::shared_ptr <const UnstructuredGrid> grid,
|
||||
std::shared_ptr <const SimulatorTimer> timer,
|
||||
std::shared_ptr <const BlackoilState> state,
|
||||
std::shared_ptr <const SimulatorState> state,
|
||||
std::shared_ptr <const WellState> wellState)
|
||||
|
||||
// store all parameters passed into the object, making them curried
|
||||
|
@ -32,10 +32,10 @@ struct UnstructuredGrid;
|
||||
namespace Opm {
|
||||
|
||||
// forward definitions
|
||||
class BlackoilState;
|
||||
class EclipseGridParser;
|
||||
class OutputWriter;
|
||||
namespace parameter { class ParameterGroup; }
|
||||
class SimulatorState;
|
||||
class SimulatorTimer;
|
||||
class WellState;
|
||||
|
||||
@ -56,7 +56,7 @@ protected:
|
||||
std::shared_ptr <const EclipseGridParser> parser,
|
||||
std::shared_ptr <const UnstructuredGrid> grid,
|
||||
std::shared_ptr <const SimulatorTimer> timer,
|
||||
std::shared_ptr <const BlackoilState> state,
|
||||
std::shared_ptr <const SimulatorState> state,
|
||||
std::shared_ptr <const WellState> wellState);
|
||||
|
||||
/**
|
||||
@ -75,7 +75,7 @@ protected:
|
||||
|
||||
/// Just hold a reference to these objects that are owned elsewhere.
|
||||
std::shared_ptr <const SimulatorTimer> timer_;
|
||||
std::shared_ptr <const BlackoilState> reservoirState_;
|
||||
std::shared_ptr <const SimulatorState> reservoirState_;
|
||||
std::shared_ptr <const WellState> wellState_;
|
||||
|
||||
/// Created locally and destructed together with us
|
||||
@ -142,7 +142,7 @@ struct SimulatorOutput : public SimulatorOutputBase {
|
||||
std::shared_ptr <const EclipseGridParser> parser,
|
||||
std::shared_ptr <const UnstructuredGrid> grid,
|
||||
std::shared_ptr <const SimulatorTimer> timer,
|
||||
std::shared_ptr <const BlackoilState> state,
|
||||
std::shared_ptr <const SimulatorState> state,
|
||||
std::shared_ptr <const WellState> wellState,
|
||||
std::shared_ptr <Simulator> sim)
|
||||
// send all other parameters to base class
|
||||
@ -164,7 +164,7 @@ struct SimulatorOutput : public SimulatorOutputBase {
|
||||
const EclipseGridParser& parser,
|
||||
const UnstructuredGrid& grid,
|
||||
const SimulatorTimer& timer,
|
||||
const BlackoilState& state,
|
||||
const SimulatorState& state,
|
||||
const WellState& wellState,
|
||||
Simulator& sim)
|
||||
// send all other parameters to base class
|
||||
|
Loading…
Reference in New Issue
Block a user