mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: move isPressureControlled to WellInterfaceGeneric
no typetag dependence. also no need for this to be virtual
This commit is contained in:
@@ -416,4 +416,18 @@ void WellInterfaceGeneric::reportWellSwitching(const SingleWellState& ws, Deferr
|
||||
}
|
||||
}
|
||||
|
||||
bool WellInterfaceGeneric::isPressureControlled(const WellState& well_state) const
|
||||
{
|
||||
const auto& ws = well_state.well(this->index_of_well_);
|
||||
if (this->isInjector()) {
|
||||
const Well::InjectorCMode& current = ws.injection_cmode;
|
||||
return current == Well::InjectorCMode::THP ||
|
||||
current == Well::InjectorCMode::BHP;
|
||||
} else {
|
||||
const Well::ProducerCMode& current = ws.production_cmode;
|
||||
return current == Well::ProducerCMode::THP ||
|
||||
current == Well::ProducerCMode::BHP;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
Reference in New Issue
Block a user