Merge pull request #3065 from joakim-hove/haswell

Implement BlackoilWellModel::hasWell() method
This commit is contained in:
Joakim Hove
2021-02-15 09:04:12 +01:00
committed by GitHub
2 changed files with 10 additions and 0 deletions

View File

@@ -268,6 +268,7 @@ namespace Opm {
bool forceShutWellByNameIfPredictionMode(const std::string& wellname, const double simulation_time); bool forceShutWellByNameIfPredictionMode(const std::string& wellname, const double simulation_time);
double wellPI(int well_index) const; double wellPI(int well_index) const;
bool hasWell(const std::string& wname);
protected: protected:
Simulator& ebosSimulator_; Simulator& ebosSimulator_;

View File

@@ -1726,6 +1726,15 @@ namespace Opm {
} }
template<typename TypeTag>
bool
BlackoilWellModel<TypeTag>::
hasWell(const std::string& wname) {
auto iter = std::find_if( this->wells_ecl_.begin(), this->wells_ecl_.end(), [&wname](const Well& well) { return well.name() == wname; });
return (iter != this->wells_ecl_.end());
}
// convert well data from opm-common to well state from opm-core // convert well data from opm-common to well state from opm-core
template<typename TypeTag> template<typename TypeTag>
void void