changed: rename BlackoilWellModel::hasWell to hasOpenLocalWell

this to avoid confusion as there is already a hasWell
in BlackoilWellModelGeneric which checks all wells
This commit is contained in:
Arne Morten Kvarving
2025-01-08 11:28:06 +01:00
parent 09acc593dd
commit 98949004c6
2 changed files with 5 additions and 3 deletions

View File

@@ -289,7 +289,7 @@ template<class Scalar> class WellContributions;
const int iterationIdx);
WellInterfacePtr getWell(const std::string& well_name) const;
bool hasWell(const std::string& well_name) const;
bool hasOpenLocalWell(const std::string& well_name) const;
using PressureMatrix = Dune::BCRSMatrix<Opm::MatrixBlock<Scalar, 1, 1>>;

View File

@@ -2099,7 +2099,9 @@ namespace Opm {
DeferredLogger global_deferredLogger = gatherDeferredLogger(local_deferredLogger, comm);
for (const auto& [group_name, to] : this->closed_offending_wells_) {
if (this->hasWell(to.second) && !this->wasDynamicallyShutThisTimeStep(to.second)) {
if (this->hasOpenLocalWell(to.second) &&
!this->wasDynamicallyShutThisTimeStep(to.second))
{
wellTestState.close_well(to.second, WellTestConfig::Reason::GROUP, simulationTime);
this->updateClosedWellsThisStep(to.second);
const std::string msg =
@@ -2379,7 +2381,7 @@ namespace Opm {
template<typename TypeTag>
bool
BlackoilWellModel<TypeTag>::
hasWell(const std::string& well_name) const
hasOpenLocalWell(const std::string& well_name) const
{
return std::any_of(well_container_.begin(), well_container_.end(),
[&well_name](const WellInterfacePtr& elem) -> bool