SimulatorState --> SimulationDataContainer.

This commit is contained in:
Robert Kloefkorn
2016-03-30 11:01:34 +02:00
parent 9c67c0e135
commit 8d11be71e0
2 changed files with 6 additions and 45 deletions

View File

@@ -259,7 +259,7 @@ namespace Opm
{
BlackoilOutputWriter& writer_;
std::unique_ptr< SimulatorTimerInterface > timer_;
const SimulatorState state_;
const SimulationDataContainer state_;
const WellState wellState_;
const bool substep_;
@@ -267,7 +267,7 @@ namespace Opm
explicit WriterCall( BlackoilOutputWriter& writer,
const SimulatorTimerInterface& timer,
const SimulatorState& state,
const SimulationDataContainer& state,
const WellState& wellState,
bool substep,
std::future< bool >&& asyncWait)
@@ -336,7 +336,7 @@ namespace Opm
void
BlackoilOutputWriter::
writeTimeStepSerial(const SimulatorTimerInterface& timer,
const SimulatorState& state,
const SimulationDataContainer& state,
const WellState& wellState,
bool substep)
{
@@ -372,54 +372,15 @@ namespace Opm
backupfile_.write( (const char *) &reportStep, sizeof(int) );
try {
const BlackoilState& boState = dynamic_cast< const BlackoilState& > (state);
backupfile_ << boState;
backupfile_ << state;
const WellStateFullyImplicitBlackoil& boWellState = static_cast< const WellStateFullyImplicitBlackoil& > (wellState);
backupfile_ << boWellState;
}
catch ( const std::bad_cast& e )
{
// store report step
lastBackupReportStep_ = reportStep;
// write resport step number
backupfile_.write( (const char *) &reportStep, sizeof(int) );
/*
try {
const BlackoilState& boState = dynamic_cast< const BlackoilState& > (state);
backupfile_ << boState;
const WellStateFullyImplicitBlackoil& boWellState = static_cast< const WellStateFullyImplicitBlackoil& > (wellState);
backupfile_ << boWellState;
}
catch ( const std::bad_cast& e )
{
}
*/
/*
const WellStateFullyImplicitBlackoil* boWellState =
dynamic_cast< const WellStateFullyImplicitBlackoil* > (&wellState);
if( boWellState ) {
backupfile_ << (*boWellState);
}
else
OPM_THROW(std::logic_error,"cast to WellStateFullyImplicitBlackoil failed");
*/
backupfile_ << std::flush;
}
/*
const WellStateFullyImplicitBlackoil* boWellState =
dynamic_cast< const WellStateFullyImplicitBlackoil* > (&wellState);
if( boWellState ) {
backupfile_ << (*boWellState);
}
else
OPM_THROW(std::logic_error,"cast to WellStateFullyImplicitBlackoil failed");
*/
backupfile_ << std::flush;
}
} // end backup

View File

@@ -86,7 +86,7 @@ namespace Opm
Opm::DataMap dm;
dm["saturation"] = &state.saturation();
dm["pressure"] = &state.pressure();
for (const auto& pair : state.cellData())
for (const auto& pair : state.cellData())
{
const std::string& name = pair.first;
std::string key;
@@ -223,7 +223,7 @@ namespace Opm
/** \copydoc Opm::OutputWriter::writeTimeStep */
void writeTimeStepSerial(const SimulatorTimerInterface& timer,
const SimulatorState& reservoirState,
const SimulationDataContainer& reservoirState,
const Opm::WellState& wellState,
bool substep);