well models: remove superfluous arguments

concretely this means the `eclState` and `schedule` arguments to the
`init()` and `beginTimeStep()` methods.
This commit is contained in:
Andreas Lauser committed 2019-05-03 14:07:15 +02:00
1 parent 7868e420c0
commit b9995f697f
4 files changed
+14 -14

No files matched your search

+2 -6
View File
@@ -824,11 +824,7 @@ public:
updateMaxPolymerAdsorption_(); updateMaxPolymerAdsorption_();
// set up the wells for the next episode. // set up the wells for the next episode.
// wellModel_.beginEpisode(isOnRestart);
// TODO: the first two arguments seem to be unnecessary
wellModel_.beginEpisode(this->simulator().vanguard().eclState(),
this->simulator().vanguard().schedule(),
isOnRestart);
aquiferModel_.beginEpisode(); aquiferModel_.beginEpisode();
@@ -1447,7 +1443,7 @@ public:
// initialize the wells. Note that this needs to be done after initializing the // initialize the wells. Note that this needs to be done after initializing the
// intrinsic permeabilities and the after applying the initial solution because // intrinsic permeabilities and the after applying the initial solution because
// the well model uses these... // the well model uses these...
wellModel_.init(eclState, this->simulator().vanguard().schedule()); wellModel_.init();
// let the object for threshold pressures initialize itself. this is done only at // let the object for threshold pressures initialize itself. this is done only at
// this point, because determining the threshold pressures may require to access // this point, because determining the threshold pressures may require to access
+6 -3
View File
@@ -101,9 +101,10 @@ public:
* *
* I.e., well positions, names etc... * I.e., well positions, names etc...
*/ */
void init(const Opm::EclipseState& eclState OPM_UNUSED, void init()
const Opm::Schedule& deckSchedule)
{ {
const Opm::Schedule& deckSchedule = simulator_.vanguard().schedule();
// create the wells which intersect with the current process' grid // create the wells which intersect with the current process' grid
for (size_t deckWellIdx = 0; deckWellIdx < deckSchedule.numWells(); ++deckWellIdx) for (size_t deckWellIdx = 0; deckWellIdx < deckSchedule.numWells(); ++deckWellIdx)
{ {
@@ -130,8 +131,10 @@ public:
* \brief This should be called the problem before each simulation * \brief This should be called the problem before each simulation
* episode to adapt the well controls. * episode to adapt the well controls.
*/ */
void beginEpisode(const Opm::EclipseState& eclState, const Opm::Schedule& deckSchedule, bool wasRestarted=false) void beginEpisode(bool wasRestarted=false)
{ {
const Opm::EclipseState& eclState = simulator_.vanguard().eclState();
const Opm::Schedule& deckSchedule = simulator_.vanguard().schedule();
unsigned episodeIdx = simulator_.episodeIndex(); unsigned episodeIdx = simulator_.episodeIndex();
WellConnectionsMap wellCompMap; WellConnectionsMap wellCompMap;
+2 -4
View File
@@ -112,7 +112,7 @@ namespace Opm {
BlackoilWellModel(Simulator& ebosSimulator); BlackoilWellModel(Simulator& ebosSimulator);
void init(const Opm::EclipseState& eclState, const Opm::Schedule& schedule); void init();
///////////// /////////////
// <eWoms auxiliary module stuff> // <eWoms auxiliary module stuff>
@@ -153,9 +153,7 @@ namespace Opm {
// TODO (?) // TODO (?)
} }
void beginEpisode(const Opm::EclipseState& /* eclState */, void beginEpisode(bool isRestart)
const Opm::Schedule& /* schedule */,
bool isRestart)
{ {
size_t episodeIdx = ebosSimulator_.episodeIndex(); size_t episodeIdx = ebosSimulator_.episodeIndex();
// beginEpisode in eclProblem advances the episode index // beginEpisode in eclProblem advances the episode index
+4 -1
View File
@@ -38,8 +38,11 @@ namespace Opm {
template<typename TypeTag> template<typename TypeTag>
void void
BlackoilWellModel<TypeTag>:: BlackoilWellModel<TypeTag>::
init(const Opm::EclipseState& eclState, const Opm::Schedule& /* schedule */) init()
{ {
const Opm::EclipseState& eclState = ebosSimulator_.vanguard().eclState();
const Opm::Schedule& schedule = ebosSimulator_.vanguard().schedule();
gravity_ = ebosSimulator_.problem().gravity()[2]; gravity_ = ebosSimulator_.problem().gravity()[2];
extractLegacyCellPvtRegionIndex_(); extractLegacyCellPvtRegionIndex_();