Merge pull request #551 from atgeirr/silence-warnings

Remove unneeded function parameter for SimulatorBase::run(), fix warnings.
This commit is contained in:
Bård Skaflestad
2015-12-07 16:13:25 +01:00
7 changed files with 10 additions and 13 deletions

View File

@@ -434,7 +434,7 @@ try
<< std::flush; << std::flush;
} }
SimulatorReport fullReport = simulator.run(eclipseState, simtimer, state); SimulatorReport fullReport = simulator.run(simtimer, state);
if( output_cout ) if( output_cout )
{ {

View File

@@ -315,7 +315,7 @@ try
std::cout << "\n\n================ Starting main simulation loop ===============\n" std::cout << "\n\n================ Starting main simulation loop ===============\n"
<< std::flush; << std::flush;
SimulatorReport fullReport = simulator.run(eclipseState, simtimer, state); SimulatorReport fullReport = simulator.run(simtimer, state);
std::cout << "\n\n================ End of simulation ===============\n\n"; std::cout << "\n\n================ End of simulation ===============\n\n";
fullReport.report(std::cout); fullReport.report(std::cout);

View File

@@ -407,7 +407,7 @@ try
<< std::flush; << std::flush;
} }
SimulatorReport fullReport = simulator.run(eclipseState, simtimer, state); SimulatorReport fullReport = simulator.run(simtimer, state);
if( output_cout ) if( output_cout )
{ {

View File

@@ -254,7 +254,7 @@ try
deck, deck,
*fis_solver, *fis_solver,
grav); grav);
fullReport= simulator.run(eclipseState, simtimer, state); fullReport= simulator.run(simtimer, state);
std::cout << "\n\n================ End of simulation ===============\n\n"; std::cout << "\n\n================ End of simulation ===============\n\n";
fullReport.report(std::cout); fullReport.report(std::cout);

View File

@@ -20,8 +20,10 @@
#ifndef OPM_PARALLELRESTRICTEDADDITIVESCHWARZ_HEADER_INCLUDED #ifndef OPM_PARALLELRESTRICTEDADDITIVESCHWARZ_HEADER_INCLUDED
#define OPM_PARALLELRESTRICTEDADDITIVESCHWARZ_HEADER_INCLUDED #define OPM_PARALLELRESTRICTEDADDITIVESCHWARZ_HEADER_INCLUDED
#include <opm/common/utility/platform_dependent/disable_warnings.h>
#include <dune/istl/preconditioner.hh> #include <dune/istl/preconditioner.hh>
#include <dune/istl/paamg/smoother.hh> #include <dune/istl/paamg/smoother.hh>
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
namespace Opm namespace Opm
{ {

View File

@@ -115,7 +115,7 @@ namespace Opm
/// \param[in] gravity if non-null, gravity vector /// \param[in] gravity if non-null, gravity vector
/// \param[in] disgas true for dissolved gas option /// \param[in] disgas true for dissolved gas option
/// \param[in] vapoil true for vaporized oil option /// \param[in] vapoil true for vaporized oil option
/// \param[in] eclipse_state /// \param[in] eclipse_state the object which represents an internalized ECL deck
/// \param[in] output_writer /// \param[in] output_writer
/// \param[in] threshold_pressures_by_face if nonempty, threshold pressures that inhibit flow /// \param[in] threshold_pressures_by_face if nonempty, threshold pressures that inhibit flow
SimulatorBase(const parameter::ParameterGroup& param, SimulatorBase(const parameter::ParameterGroup& param,
@@ -134,13 +134,10 @@ namespace Opm
/// Run the simulation. /// Run the simulation.
/// This will run succesive timesteps until timer.done() is true. It will /// This will run succesive timesteps until timer.done() is true. It will
/// modify the reservoir and well states. /// modify the reservoir and well states.
/// \param[in] eclState the object which represents an internalized ECL deck
/// \param[in,out] timer governs the requested reporting timesteps /// \param[in,out] timer governs the requested reporting timesteps
/// \param[in,out] state state of reservoir: pressure, fluxes /// \param[in,out] state state of reservoir: pressure, fluxes
/// \param[in,out] well_state state of wells: bhp, perforation rates
/// \return simulation report, with timing data /// \return simulation report, with timing data
SimulatorReport run(EclipseStateConstPtr eclState, SimulatorReport run(SimulatorTimer& timer,
SimulatorTimer& timer,
ReservoirState& state); ReservoirState& state);
protected: protected:

View File

@@ -74,8 +74,7 @@ namespace Opm
} }
template <class Implementation> template <class Implementation>
SimulatorReport SimulatorBase<Implementation>::run(EclipseStateConstPtr eclState, SimulatorReport SimulatorBase<Implementation>::run(SimulatorTimer& timer,
SimulatorTimer& timer,
ReservoirState& state) ReservoirState& state)
{ {
WellState prev_well_state; WellState prev_well_state;
@@ -89,7 +88,7 @@ namespace Opm
std::string tstep_filename = output_writer_.outputDirectory() + "/step_timing.txt"; std::string tstep_filename = output_writer_.outputDirectory() + "/step_timing.txt";
std::ofstream tstep_os(tstep_filename.c_str()); std::ofstream tstep_os(tstep_filename.c_str());
const auto& schedule = eclState->getSchedule(); const auto& schedule = eclipse_state_->getSchedule();
const auto& events = schedule->getEvents(); const auto& events = schedule->getEvents();
// adaptive time stepping // adaptive time stepping
@@ -177,7 +176,6 @@ namespace Opm
// section // section
// //
// TODO (?): handle the parallel case (maybe this works out of the box) // TODO (?): handle the parallel case (maybe this works out of the box)
ScheduleConstPtr schedule = eclipse_state_->getSchedule();
DeckConstPtr miniDeck = schedule->getModifierDeck(nextTimeStepIdx); DeckConstPtr miniDeck = schedule->getModifierDeck(nextTimeStepIdx);
eclipse_state_->applyModifierDeck(miniDeck); eclipse_state_->applyModifierDeck(miniDeck);
geo_.update(grid_, props_, eclipse_state_, gravity_); geo_.update(grid_, props_, eclipse_state_, gravity_);