removing function localWellsActive()

This commit is contained in:
Kai Bao 2022-09-14 11:27:22 +02:00
parent 83529b22c7
commit 734b9a792f
3 changed files with 4 additions and 27 deletions

View File

@ -386,13 +386,6 @@ wellsActive() const
return wells_active_;
}
bool
BlackoilWellModelGeneric::
localWellsActive() const
{
return numLocalWells() > 0;
}
bool
BlackoilWellModelGeneric::
anyMSWellOpenLocal() const
@ -2140,10 +2133,6 @@ void
BlackoilWellModelGeneric::
calculateEfficiencyFactors(const int reportStepIdx)
{
if ( !localWellsActive() ) {
return;
}
for (auto& well : well_container_generic_) {
const Well& wellEcl = well->wellEcl();
double well_efficiency_factor = wellEcl.getEfficiencyFactor();

View File

@ -90,8 +90,7 @@ public:
/// return true if wells are available in the reservoir
bool wellsActive() const;
bool hasWell(const std::string& wname);
/// return true if wells are available on this process
bool localWellsActive() const;
// whether there exists any multisegment well open on this process
bool anyMSWellOpenLocal() const;

View File

@ -1104,10 +1104,6 @@ namespace Opm {
BlackoilWellModel<TypeTag>::
apply( BVector& r) const
{
if ( ! localWellsActive() ) {
return;
}
for (auto& well : well_container_) {
well->apply(r);
}
@ -1120,11 +1116,6 @@ namespace Opm {
BlackoilWellModel<TypeTag>::
apply(const BVector& x, BVector& Ax) const
{
// TODO: do we still need localWellsActive()?
if ( ! localWellsActive() ) {
return;
}
for (auto& well : well_container_) {
well->apply(x, Ax);
}
@ -1176,7 +1167,7 @@ namespace Opm {
BlackoilWellModel<TypeTag>::
applyScaleAdd(const Scalar alpha, const BVector& x, BVector& Ax) const
{
if ( ! localWellsActive() ) {
if (this->well_container_.empty()) {
return;
}
@ -1304,10 +1295,8 @@ namespace Opm {
DeferredLogger local_deferredLogger;
OPM_BEGIN_PARALLEL_TRY_CATCH();
{
if (localWellsActive()) {
for (auto& well : well_container_) {
well->recoverWellSolutionAndUpdateWellState(x, this->wellState(), local_deferredLogger);
}
for (auto& well : well_container_) {
well->recoverWellSolutionAndUpdateWellState(x, this->wellState(), local_deferredLogger);
}
}