mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
BackupRestore: remove all specializations for BlackoilState. This is now covered by
SimulationDataContainer.
This commit is contained in:
parent
fd99a9e6e9
commit
da0e725eb8
@ -157,18 +157,16 @@ namespace Opm {
|
|||||||
|
|
||||||
enum { SimulatorStateId = 0,
|
enum { SimulatorStateId = 0,
|
||||||
WellStateId = 1,
|
WellStateId = 1,
|
||||||
BlackoilStateId = 2,
|
|
||||||
WellStateFullyImplicitBackoilId = 3 };
|
WellStateFullyImplicitBackoilId = 3 };
|
||||||
|
|
||||||
inline int objectId( const SimulationDataContainer& /* state */) {
|
inline int objectId( const SimulationDataContainer& /* state */) {
|
||||||
return SimulatorStateId;
|
return SimulatorStateId;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int objectId( const WellState& /* state */) {
|
inline int objectId( const WellState& /* state */) {
|
||||||
return WellStateId;
|
return WellStateId;
|
||||||
}
|
}
|
||||||
inline int objectId( const BlackoilState& /* state */) {
|
|
||||||
return BlackoilStateId;
|
|
||||||
}
|
|
||||||
inline int objectId( const WellStateFullyImplicitBlackoil& /* state */) {
|
inline int objectId( const WellStateFullyImplicitBlackoil& /* state */) {
|
||||||
return WellStateFullyImplicitBackoilId;
|
return WellStateFullyImplicitBackoilId;
|
||||||
}
|
}
|
||||||
@ -227,43 +225,6 @@ namespace Opm {
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
// BlackoilState
|
|
||||||
inline
|
|
||||||
std::ostream& operator << (std::ostream& out, const BlackoilState& state )
|
|
||||||
{
|
|
||||||
// write id of object to stream
|
|
||||||
writeValue( out, objectId( state ) );
|
|
||||||
|
|
||||||
// backup simulator state
|
|
||||||
const SimulationDataContainer& simstate = static_cast< const SimulationDataContainer& > (state);
|
|
||||||
out << simstate;
|
|
||||||
|
|
||||||
// backup additional blackoil state variables
|
|
||||||
writeContainer( out, state.surfacevol() );
|
|
||||||
writeContainer( out, state.gasoilratio() );
|
|
||||||
writeContainer( out, state.rv() );
|
|
||||||
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
std::istream& operator >> (std::istream& in, BlackoilState& state )
|
|
||||||
{
|
|
||||||
// check id of stored object
|
|
||||||
checkObjectId( in, state );
|
|
||||||
|
|
||||||
// restore simulator state
|
|
||||||
SimulationDataContainer& simstate = static_cast< SimulationDataContainer& > (state);
|
|
||||||
in >> simstate;
|
|
||||||
|
|
||||||
// restore additional blackoil state variables
|
|
||||||
readContainer( in, state.surfacevol() );
|
|
||||||
readContainer( in, state.gasoilratio() );
|
|
||||||
readContainer( in, state.rv() );
|
|
||||||
|
|
||||||
return in;
|
|
||||||
}
|
|
||||||
|
|
||||||
// WellState
|
// WellState
|
||||||
inline
|
inline
|
||||||
std::ostream& operator << (std::ostream& out, const WellState& state )
|
std::ostream& operator << (std::ostream& out, const WellState& state )
|
||||||
|
Loading…
Reference in New Issue
Block a user