mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #1710 from blattms/fix-parallel-well-hasTHPConstraints
Make BlackoilWellModel::hasTHPConstraints() work correctly in parallel.
This commit is contained in:
@@ -122,12 +122,13 @@ namespace Opm {
|
|||||||
BlackoilWellModel<TypeTag>::
|
BlackoilWellModel<TypeTag>::
|
||||||
hasTHPConstraints() const
|
hasTHPConstraints() const
|
||||||
{
|
{
|
||||||
|
int local_result = false;
|
||||||
for (const auto& well : well_container_) {
|
for (const auto& well : well_container_) {
|
||||||
if (well->wellHasTHPConstraints()) {
|
if (well->wellHasTHPConstraints()) {
|
||||||
return true;
|
local_result=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return grid().comm().max(local_result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user