From 911e55c5e63414f04fbf3808e8ffab842870df9e Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Tue, 18 Mar 2014 12:41:23 +0100 Subject: [PATCH 1/2] fix a few harmless CLang warnings i.e. rename class to struct in two forward declarations and remove an unused private attribute... --- opm/polymer/SimulatorCompressiblePolymer.hpp | 2 +- opm/polymer/SimulatorPolymer.cpp | 1 - opm/polymer/SimulatorPolymer.hpp | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/opm/polymer/SimulatorCompressiblePolymer.hpp b/opm/polymer/SimulatorCompressiblePolymer.hpp index 76d76d6d1..96986298b 100644 --- a/opm/polymer/SimulatorCompressiblePolymer.hpp +++ b/opm/polymer/SimulatorCompressiblePolymer.hpp @@ -39,7 +39,7 @@ namespace Opm class SimulatorTimer; class PolymerBlackoilState; class WellState; - class SimulatorReport; + struct SimulatorReport; /// Class collecting all necessary components for a two-phase simulation. class SimulatorCompressiblePolymer diff --git a/opm/polymer/SimulatorPolymer.cpp b/opm/polymer/SimulatorPolymer.cpp index db18092fb..e521b4b0a 100644 --- a/opm/polymer/SimulatorPolymer.cpp +++ b/opm/polymer/SimulatorPolymer.cpp @@ -140,7 +140,6 @@ namespace Opm const PolymerInflowInterface& polymer_inflow_; const std::vector& src_; const FlowBoundaryConditions* bcs_; - const double* gravity_; // Solvers IncompTpfaPolymer psolver_; TransportSolverTwophasePolymer tsolver_; diff --git a/opm/polymer/SimulatorPolymer.hpp b/opm/polymer/SimulatorPolymer.hpp index 08f97c5ba..c566a87eb 100644 --- a/opm/polymer/SimulatorPolymer.hpp +++ b/opm/polymer/SimulatorPolymer.hpp @@ -39,7 +39,7 @@ namespace Opm class SimulatorTimer; class PolymerState; class WellState; - class SimulatorReport; + struct SimulatorReport; /// Class collecting all necessary components for a two-phase simulation. class SimulatorPolymer From 3cce559d5266731f48755486c38ab25918c50fdb Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Tue, 18 Mar 2014 12:42:42 +0100 Subject: [PATCH 2/2] adapt to the SimulatorTimer renames of opm-core --- opm/polymer/SimulatorCompressiblePolymer.cpp | 6 +++--- opm/polymer/SimulatorPolymer.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/opm/polymer/SimulatorCompressiblePolymer.cpp b/opm/polymer/SimulatorCompressiblePolymer.cpp index 829761fb4..59fd08c9b 100644 --- a/opm/polymer/SimulatorCompressiblePolymer.cpp +++ b/opm/polymer/SimulatorCompressiblePolymer.cpp @@ -388,7 +388,7 @@ namespace Opm Opm::computeTransportSource(props_, wells_, well_state, transport_src); // Find inflow rate. - const double current_time = timer.currentTime(); + const double current_time = timer.simulationTimeElapsed(); double stepsize = timer.currentStepLength(); polymer_inflow_.getInflowValues(current_time, current_time + stepsize, polymer_inflow_c); @@ -488,12 +488,12 @@ namespace Opm << std::endl; std::cout.precision(8); - watercut.push(timer.currentTime() + timer.currentStepLength(), + watercut.push(timer.simulationTimeElapsed() + timer.currentStepLength(), produced[0]/(produced[0] + produced[1]), tot_produced[0]/tot_porevol_init); if (wells_) { wellreport.push(props_, *wells_, state.pressure(), state.surfacevol(), - state.saturation(), timer.currentTime() + timer.currentStepLength(), + state.saturation(), timer.simulationTimeElapsed() + timer.currentStepLength(), well_state.bhp(), well_state.perfRates()); } } diff --git a/opm/polymer/SimulatorPolymer.cpp b/opm/polymer/SimulatorPolymer.cpp index e521b4b0a..547c97189 100644 --- a/opm/polymer/SimulatorPolymer.cpp +++ b/opm/polymer/SimulatorPolymer.cpp @@ -410,7 +410,7 @@ namespace Opm wells_, well_state.perfRates(), transport_src); // Find inflow rate. - const double current_time = timer.currentTime(); + const double current_time = timer.simulationTimeElapsed(); double stepsize = timer.currentStepLength(); polymer_inflow_.getInflowValues(current_time, current_time + stepsize, polymer_inflow_c); @@ -497,12 +497,12 @@ namespace Opm << std::endl; std::cout.precision(8); - watercut.push(timer.currentTime() + timer.currentStepLength(), + watercut.push(timer.simulationTimeElapsed() + timer.currentStepLength(), produced[0]/(produced[0] + produced[1]), tot_produced[0]/tot_porevol_init); if (wells_) { wellreport.push(props_, *wells_, state.saturation(), - timer.currentTime() + timer.currentStepLength(), + timer.simulationTimeElapsed() + timer.currentStepLength(), well_state.bhp(), well_state.perfRates()); } } @@ -620,7 +620,7 @@ namespace Opm Opm::estimateCellVelocity(grid, state.faceflux(), cell_velocity); dm["velocity"] = &cell_velocity; - writeECLData(grid, dm, simtimer.currentStepNum(), simtimer.currentTime(), simtimer.currentDateTime(), + writeECLData(grid, dm, simtimer.currentStepNum(), simtimer.simulationTimeElapsed(), simtimer.currentDateTime(), output_dir, "polymer_ecl"); #else OPM_THROW(std::runtime_error, "Cannot call outputStateBinary() without ert library support. Reconfigure with --with-ert and recompile.");