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 2019-04-03 17:26:57 +02:00
parent 7868e420c0
commit b9995f697f
4 changed files with 14 additions and 14 deletions

View File

@ -824,11 +824,7 @@ public:
updateMaxPolymerAdsorption_();
// set up the wells for the next episode.
//
// TODO: the first two arguments seem to be unnecessary
wellModel_.beginEpisode(this->simulator().vanguard().eclState(),
this->simulator().vanguard().schedule(),
isOnRestart);
wellModel_.beginEpisode(isOnRestart);
aquiferModel_.beginEpisode();
@ -1447,7 +1443,7 @@ public:
// initialize the wells. Note that this needs to be done after initializing the
// intrinsic permeabilities and the after applying the initial solution because
// 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
// this point, because determining the threshold pressures may require to access

View File

@ -101,9 +101,10 @@ public:
*
* I.e., well positions, names etc...
*/
void init(const Opm::EclipseState& eclState OPM_UNUSED,
const Opm::Schedule& deckSchedule)
void init()
{
const Opm::Schedule& deckSchedule = simulator_.vanguard().schedule();
// create the wells which intersect with the current process' grid
for (size_t deckWellIdx = 0; deckWellIdx < deckSchedule.numWells(); ++deckWellIdx)
{
@ -130,8 +131,10 @@ public:
* \brief This should be called the problem before each simulation
* 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();
WellConnectionsMap wellCompMap;

View File

@ -112,7 +112,7 @@ namespace Opm {
BlackoilWellModel(Simulator& ebosSimulator);
void init(const Opm::EclipseState& eclState, const Opm::Schedule& schedule);
void init();
/////////////
// <eWoms auxiliary module stuff>
@ -153,9 +153,7 @@ namespace Opm {
// TODO (?)
}
void beginEpisode(const Opm::EclipseState& /* eclState */,
const Opm::Schedule& /* schedule */,
bool isRestart)
void beginEpisode(bool isRestart)
{
size_t episodeIdx = ebosSimulator_.episodeIndex();
// beginEpisode in eclProblem advances the episode index

View File

@ -38,8 +38,11 @@ namespace Opm {
template<typename TypeTag>
void
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];
extractLegacyCellPvtRegionIndex_();