mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fix the build
and also, do not std::move a unique_ptr. (that's a quite strange thing, semantically.)
This commit is contained in:
parent
511a934323
commit
ec1f136f37
@ -556,10 +556,12 @@ namespace Opm
|
|||||||
// output_writer_
|
// output_writer_
|
||||||
void setupOutputWriter()
|
void setupOutputWriter()
|
||||||
{
|
{
|
||||||
|
const PhaseUsage pu = Opm::phaseUsageFromDeck(deck());
|
||||||
output_writer_.reset(new OutputWriter(grid(),
|
output_writer_.reset(new OutputWriter(grid(),
|
||||||
param_,
|
param_,
|
||||||
eclState(),
|
eclState(),
|
||||||
std::move(eclIO_));
|
*eclIO_,
|
||||||
|
pu));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run the simulator.
|
// Run the simulator.
|
||||||
|
@ -156,7 +156,7 @@ namespace Opm
|
|||||||
bool substep)
|
bool substep)
|
||||||
{
|
{
|
||||||
// ECL output
|
// ECL output
|
||||||
if ( eclIO_ )
|
if (output())
|
||||||
{
|
{
|
||||||
const auto& initConfig = eclipseState_.getInitConfig();
|
const auto& initConfig = eclipseState_.getInitConfig();
|
||||||
if (initConfig.restartRequested() && ((initConfig.getRestartStep()) == (timer.currentStepNum()))) {
|
if (initConfig.restartRequested() && ((initConfig.getRestartStep()) == (timer.currentStepNum()))) {
|
||||||
@ -164,11 +164,11 @@ namespace Opm
|
|||||||
} else {
|
} else {
|
||||||
data::Solution combined_sol = simToSolution(state, phaseUsage_); // Get "normal" data (SWAT, PRESSURE, ...)
|
data::Solution combined_sol = simToSolution(state, phaseUsage_); // Get "normal" data (SWAT, PRESSURE, ...)
|
||||||
combined_sol.insert(sol.begin(), sol.end()); // ... insert "extra" data (KR, VISC, ...)
|
combined_sol.insert(sol.begin(), sol.end()); // ... insert "extra" data (KR, VISC, ...)
|
||||||
eclIO_->writeTimeStep(timer.reportStepNum(),
|
eclIO_.writeTimeStep(timer.reportStepNum(),
|
||||||
substep,
|
substep,
|
||||||
timer.simulationTimeElapsed(),
|
timer.simulationTimeElapsed(),
|
||||||
combined_sol,
|
combined_sol,
|
||||||
wellState.report(phaseUsage_));
|
wellState.report(phaseUsage_));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ namespace Opm
|
|||||||
BlackoilOutputWriterEbos(const Grid& grid,
|
BlackoilOutputWriterEbos(const Grid& grid,
|
||||||
const parameter::ParameterGroup& param,
|
const parameter::ParameterGroup& param,
|
||||||
const EclipseState& eclipseState,
|
const EclipseState& eclipseState,
|
||||||
std::unique_ptr<EclipseIO>&& eclIO,
|
EclipseIO& eclIO,
|
||||||
const Opm::PhaseUsage &phaseUsage);
|
const Opm::PhaseUsage &phaseUsage);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -159,7 +159,7 @@ namespace Opm
|
|||||||
|
|
||||||
std::ofstream backupfile_;
|
std::ofstream backupfile_;
|
||||||
Opm::PhaseUsage phaseUsage_;
|
Opm::PhaseUsage phaseUsage_;
|
||||||
std::unique_ptr<EclipseIO> eclIO_;
|
EclipseIO& eclIO_;
|
||||||
const EclipseState& eclipseState_;
|
const EclipseState& eclipseState_;
|
||||||
|
|
||||||
std::unique_ptr< ThreadHandle > asyncOutput_;
|
std::unique_ptr< ThreadHandle > asyncOutput_;
|
||||||
@ -177,7 +177,7 @@ namespace Opm
|
|||||||
BlackoilOutputWriterEbos(const Grid& grid,
|
BlackoilOutputWriterEbos(const Grid& grid,
|
||||||
const parameter::ParameterGroup& param,
|
const parameter::ParameterGroup& param,
|
||||||
const Opm::EclipseState& eclipseState,
|
const Opm::EclipseState& eclipseState,
|
||||||
std::unique_ptr<EclipseIO>&& eclIO,
|
EclipseIO& eclIO,
|
||||||
const Opm::PhaseUsage &phaseUsage)
|
const Opm::PhaseUsage &phaseUsage)
|
||||||
: output_( param.getDefault("output", true) ),
|
: output_( param.getDefault("output", true) ),
|
||||||
parallelOutput_( output_ ? new ParallelDebugOutput< Grid >( grid, eclipseState, phaseUsage.num_phases, phaseUsage ) : 0 ),
|
parallelOutput_( output_ ? new ParallelDebugOutput< Grid >( grid, eclipseState, phaseUsage.num_phases, phaseUsage ) : 0 ),
|
||||||
@ -185,13 +185,12 @@ namespace Opm
|
|||||||
output_interval_( output_ ? param.getDefault("output_interval", 1): 0 ),
|
output_interval_( output_ ? param.getDefault("output_interval", 1): 0 ),
|
||||||
lastBackupReportStep_( -1 ),
|
lastBackupReportStep_( -1 ),
|
||||||
phaseUsage_( phaseUsage ),
|
phaseUsage_( phaseUsage ),
|
||||||
|
eclIO_(eclIO),
|
||||||
eclipseState_(eclipseState),
|
eclipseState_(eclipseState),
|
||||||
asyncOutput_()
|
asyncOutput_()
|
||||||
{
|
{
|
||||||
// For output.
|
// For output.
|
||||||
if (output_ && parallelOutput_->isIORank() ) {
|
if (output_ && parallelOutput_->isIORank() ) {
|
||||||
eclIO_ = std::move(eclIO);
|
|
||||||
|
|
||||||
// Ensure that output dir exists
|
// Ensure that output dir exists
|
||||||
boost::filesystem::path fpath(outputDir_);
|
boost::filesystem::path fpath(outputDir_);
|
||||||
try {
|
try {
|
||||||
@ -262,7 +261,7 @@ namespace Opm
|
|||||||
|
|
||||||
const Wells* wells = wellsmanager.c_wells();
|
const Wells* wells = wellsmanager.c_wells();
|
||||||
wellstate.resize(wells, simulatorstate, phaseusage ); //Resize for restart step
|
wellstate.resize(wells, simulatorstate, phaseusage ); //Resize for restart step
|
||||||
auto state = eclIO_->loadRestart(solution_keys);
|
auto state = eclIO_.loadRestart(solution_keys);
|
||||||
solutionToSim( state.first, phaseusage, simulatorstate );
|
solutionToSim( state.first, phaseusage, simulatorstate );
|
||||||
wellsToState( state.second, phaseusage, wellstate );
|
wellsToState( state.second, phaseusage, wellstate );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user