typos and minor changes.

This commit is contained in:
Robert K 2015-02-11 13:26:57 +01:00
parent 61144a73af
commit 0f20e187a6
2 changed files with 8 additions and 10 deletions

View File

@ -161,8 +161,9 @@ namespace Opm {
// read id and compare with object // read id and compare with object
int id = -1; int id = -1;
readValue( in, id ); readValue( in, id );
if( id != objectId( state ) ) if( id != objectId( state ) ) {
OPM_THROW(std::logic_error,"backup-restore object type missmatch"); OPM_THROW(std::logic_error,"backup-restore object type mismatch");
}
} }
} }
@ -233,11 +234,11 @@ namespace Opm {
// check id of stored object // check id of stored object
checkObjectId( in, state ); checkObjectId( in, state );
// backup simulator state // restore simulator state
SimulatorState& simstate = static_cast< SimulatorState& > (state); SimulatorState& simstate = static_cast< SimulatorState& > (state);
in >> simstate; in >> simstate;
// backup additional blackoil state variables // restore additional blackoil state variables
readContainer( in, state.surfacevol() ); readContainer( in, state.surfacevol() );
readContainer( in, state.gasoilratio() ); readContainer( in, state.gasoilratio() );
readContainer( in, state.rv() ); readContainer( in, state.rv() );

View File

@ -265,12 +265,9 @@ namespace Opm
// write resport step number // write resport step number
backupfile_.write( (const char *) &reportStep, sizeof(int) ); backupfile_.write( (const char *) &reportStep, sizeof(int) );
const BlackoilState* boState = dynamic_cast< const BlackoilState* > (&state); const BlackoilState& boState = dynamic_cast< const BlackoilState& > (state);
if( boState ) { backupfile_ << boState;
backupfile_ << (*boState);
}
else
OPM_THROW(std::logic_error,"cast to BlackoilState failed");
const WellStateFullyImplicitBlackoil& boWellState = static_cast< const WellStateFullyImplicitBlackoil& > (wellState); const WellStateFullyImplicitBlackoil& boWellState = static_cast< const WellStateFullyImplicitBlackoil& > (wellState);
backupfile_ << boWellState; backupfile_ << boWellState;
/* /*