From 0f20e187a6cb50a941398cfbe83076f213ac55b4 Mon Sep 17 00:00:00 2001 From: Robert K Date: Wed, 11 Feb 2015 13:26:57 +0100 Subject: [PATCH] typos and minor changes. --- opm/autodiff/BackupRestore.hpp | 9 +++++---- opm/autodiff/SimulatorFullyImplicitBlackoilOutput.cpp | 9 +++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/opm/autodiff/BackupRestore.hpp b/opm/autodiff/BackupRestore.hpp index 0887f9fd8..62b4fdff2 100644 --- a/opm/autodiff/BackupRestore.hpp +++ b/opm/autodiff/BackupRestore.hpp @@ -161,8 +161,9 @@ namespace Opm { // read id and compare with object int id = -1; readValue( in, id ); - if( id != objectId( state ) ) - OPM_THROW(std::logic_error,"backup-restore object type missmatch"); + if( id != objectId( state ) ) { + OPM_THROW(std::logic_error,"backup-restore object type mismatch"); + } } } @@ -233,11 +234,11 @@ namespace Opm { // check id of stored object checkObjectId( in, state ); - // backup simulator state + // restore simulator state SimulatorState& simstate = static_cast< SimulatorState& > (state); in >> simstate; - // backup additional blackoil state variables + // restore additional blackoil state variables readContainer( in, state.surfacevol() ); readContainer( in, state.gasoilratio() ); readContainer( in, state.rv() ); diff --git a/opm/autodiff/SimulatorFullyImplicitBlackoilOutput.cpp b/opm/autodiff/SimulatorFullyImplicitBlackoilOutput.cpp index 979a89cd1..21c98adfd 100644 --- a/opm/autodiff/SimulatorFullyImplicitBlackoilOutput.cpp +++ b/opm/autodiff/SimulatorFullyImplicitBlackoilOutput.cpp @@ -265,12 +265,9 @@ namespace Opm // write resport step number backupfile_.write( (const char *) &reportStep, sizeof(int) ); - const BlackoilState* boState = dynamic_cast< const BlackoilState* > (&state); - if( boState ) { - backupfile_ << (*boState); - } - else - OPM_THROW(std::logic_error,"cast to BlackoilState failed"); + const BlackoilState& boState = dynamic_cast< const BlackoilState& > (state); + backupfile_ << boState; + const WellStateFullyImplicitBlackoil& boWellState = static_cast< const WellStateFullyImplicitBlackoil& > (wellState); backupfile_ << boWellState; /*