mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move hasOpenLocalWell to BlackoilWellModelGeneric
This commit is contained in:
parent
98949004c6
commit
64f9ebb06c
@ -289,7 +289,6 @@ template<class Scalar> class WellContributions;
|
||||
const int iterationIdx);
|
||||
|
||||
WellInterfacePtr getWell(const std::string& well_name) const;
|
||||
bool hasOpenLocalWell(const std::string& well_name) const;
|
||||
|
||||
using PressureMatrix = Dune::BCRSMatrix<Opm::MatrixBlock<Scalar, 1, 1>>;
|
||||
|
||||
|
@ -149,13 +149,27 @@ template<class Scalar>
|
||||
bool BlackoilWellModelGeneric<Scalar>::
|
||||
hasWell(const std::string& wname) const
|
||||
{
|
||||
return std::any_of(this->wells_ecl_.begin(), this->wells_ecl_.end(),
|
||||
return std::any_of(this->wells_ecl_.begin(),
|
||||
this->wells_ecl_.end(),
|
||||
[&wname](const Well& well)
|
||||
{
|
||||
return well.name() == wname;
|
||||
});
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
bool
|
||||
BlackoilWellModelGeneric<Scalar>::
|
||||
hasOpenLocalWell(const std::string& wname) const
|
||||
{
|
||||
return std::any_of(well_container_generic_.begin(),
|
||||
well_container_generic_.end(),
|
||||
[&wname](const auto* elem) -> bool
|
||||
{
|
||||
return elem->name() == wname;
|
||||
});
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
bool BlackoilWellModelGeneric<Scalar>::
|
||||
wellsActive() const
|
||||
|
@ -103,8 +103,13 @@ public:
|
||||
|
||||
/// return true if wells are available in the reservoir
|
||||
bool wellsActive() const;
|
||||
|
||||
//! \brief Returns true if well is defined and has connections on current rank.
|
||||
bool hasWell(const std::string& wname) const;
|
||||
|
||||
//! \brief Returns true if well is defined, open and has connections on current rank.
|
||||
bool hasOpenLocalWell(const std::string& well_name) const;
|
||||
|
||||
/// return true if network is active (at least one network well in prediction mode)
|
||||
bool networkActive() const;
|
||||
|
||||
|
@ -2378,21 +2378,6 @@ namespace Opm {
|
||||
return *well;
|
||||
}
|
||||
|
||||
template<typename TypeTag>
|
||||
bool
|
||||
BlackoilWellModel<TypeTag>::
|
||||
hasOpenLocalWell(const std::string& well_name) const
|
||||
{
|
||||
return std::any_of(well_container_.begin(), well_container_.end(),
|
||||
[&well_name](const WellInterfacePtr& elem) -> bool
|
||||
{
|
||||
return elem->name() == well_name;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename TypeTag>
|
||||
int
|
||||
BlackoilWellModel<TypeTag>::
|
||||
|
Loading…
Reference in New Issue
Block a user