Other communication measures taken from StandardWells

This commit is contained in:
Lisa Julia Nebel
2024-09-30 09:05:25 +02:00
parent 8a01b89ec9
commit dd895654d7

View File

@@ -807,6 +807,12 @@ namespace Opm
connPI += np; connPI += np;
} }
// Sum with communication in case of distributed well.
const auto& comm = this->parallel_well_info_.communication();
if (comm.size() > 1) {
comm.sum(wellPI, np);
}
assert (static_cast<int>(subsetPerfID) == this->number_of_perforations_ && assert (static_cast<int>(subsetPerfID) == this->number_of_perforations_ &&
"Internal logic error in processing connections for PI/II"); "Internal logic error in processing connections for PI/II");
} }
@@ -1331,6 +1337,8 @@ namespace Opm
} }
} }
} }
this->parallel_well_info_.communication().sum(this->ipr_a_.data(), this->ipr_a_.size());
this->parallel_well_info_.communication().sum(this->ipr_b_.data(), this->ipr_b_.size());
} }
template<typename TypeTag> template<typename TypeTag>
@@ -1951,6 +1959,7 @@ namespace Opm
} }
} }
this->parallel_well_info_.communication().sum(this->ipr_a_.data(), this->ipr_a_.size());
this->linSys_.createSolver(); this->linSys_.createSolver();
} }
@@ -2006,6 +2015,12 @@ namespace Opm
} }
} }
} }
const auto& comm = this->parallel_well_info_.communication();
if (comm.size() > 1)
{
all_drawdown_wrong_direction =
(comm.min(all_drawdown_wrong_direction ? 1 : 0) == 1);
}
return all_drawdown_wrong_direction; return all_drawdown_wrong_direction;
} }
@@ -2240,6 +2255,11 @@ namespace Opm
} }
} }
} }
const auto& comm = this->parallel_well_info_.communication();
if (comm.size() > 1)
{
comm.sum(well_q_s.data(), well_q_s.size());
}
return well_q_s; return well_q_s;
} }