From da0e725eb83ed4a23182118a1fa3d767342955f7 Mon Sep 17 00:00:00 2001 From: Robert Kloefkorn Date: Fri, 15 Apr 2016 12:21:47 +0200 Subject: [PATCH] BackupRestore: remove all specializations for BlackoilState. This is now covered by SimulationDataContainer. --- opm/autodiff/BackupRestore.hpp | 43 ++-------------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) diff --git a/opm/autodiff/BackupRestore.hpp b/opm/autodiff/BackupRestore.hpp index 0885257a3..14dffb14e 100644 --- a/opm/autodiff/BackupRestore.hpp +++ b/opm/autodiff/BackupRestore.hpp @@ -157,18 +157,16 @@ namespace Opm { enum { SimulatorStateId = 0, WellStateId = 1, - BlackoilStateId = 2, WellStateFullyImplicitBackoilId = 3 }; inline int objectId( const SimulationDataContainer& /* state */) { return SimulatorStateId; } + inline int objectId( const WellState& /* state */) { return WellStateId; } - inline int objectId( const BlackoilState& /* state */) { - return BlackoilStateId; - } + inline int objectId( const WellStateFullyImplicitBlackoil& /* state */) { return WellStateFullyImplicitBackoilId; } @@ -227,43 +225,6 @@ namespace Opm { 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 inline std::ostream& operator << (std::ostream& out, const WellState& state )