Merge pull request #1710 from blattms/fix-parallel-well-hasTHPConstraints

Make BlackoilWellModel::hasTHPConstraints() work correctly in parallel.
This commit is contained in:
Atgeirr Flø Rasmussen 2019-01-15 09:50:55 +01:00 committed by GitHub
commit f9f02724b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,12 +122,13 @@ namespace Opm {
BlackoilWellModel<TypeTag>::
hasTHPConstraints() const
{
int local_result = false;
for (const auto& well : well_container_) {
if (well->wellHasTHPConstraints()) {
return true;
local_result=true;
}
}
return false;
return grid().comm().max(local_result);
}