Replaced SimulatorState -> SimulationDatacontainer

Have removed the SimulatorState base class, and instead replaced with
the SimulationDatacontainer class from opm-common. The SimulatorState
objects were typcially created with a default constructor, and then
explicitly initialized with a SimulatorState::init() method. For the
SimulationDataContainer RAII is employed; the init( ) has been removed -
and there is no default constructor.
This commit is contained in:
Joakim Hove 2016-02-25 21:47:47 +01:00
parent e5b20cb614
commit 25e82cf160
3 changed files with 4 additions and 8 deletions

View File

@ -163,10 +163,8 @@ try
/// <CODE>Opm::IncompTPFA</CODE>.
/// \snippet tutorial2.cpp state
/// \internal [state]
Opm::TwophaseState state;
state.pressure().resize(num_cells, 0.0);
state.faceflux().resize(num_faces, 0.0);
state.saturation().resize(num_cells, 1.0);
Opm::TwophaseState state( num_cells , num_faces );
Opm::WellState well_state;
/// \internal [state]
/// \endinternal

View File

@ -266,8 +266,7 @@ try
/// initialize water saturation to minimum everywhere.
/// \snippet tutorial3.cpp two-phase state
/// \internal [two-phase state]
TwophaseState state;
state.init(grid.number_of_cells , grid.number_of_faces, 2);
TwophaseState state( grid.number_of_cells , grid.number_of_faces );
initSaturation( allcells , props , state , MinSat );
/// \internal [two-phase state]

View File

@ -213,8 +213,7 @@ try
/// initialise water saturation to minimum everywhere.
/// \snippet tutorial4.cpp two-phase state
/// \internal[two-phase state]
TwophaseState state;
state.init(grid.number_of_cells , grid.number_of_faces, 2);
TwophaseState state( grid.number_of_cells , grid.number_of_faces );
initSaturation( allcells , props , state , MinSat );