mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Avoid initializing inactive multi-segment wells + avoid direct MPI call
This commit is contained in:
parent
5191271883
commit
f7ac4f8a3c
@ -227,7 +227,7 @@ doLoadBalance_(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::vector<int> well_on_rank_global(nranks, 0);
|
std::vector<int> well_on_rank_global(nranks, 0);
|
||||||
MPI_Allreduce(&well_on_rank[0], &well_on_rank_global[0], nranks, MPI_INT, MPI_MAX, this->grid_->comm());
|
comm.max(&well_on_rank[0], nranks);
|
||||||
for (int i=0; i<nranks; ++i) {
|
for (int i=0; i<nranks; ++i) {
|
||||||
if (well_on_rank_global[i]) {
|
if (well_on_rank_global[i]) {
|
||||||
parallelWells.emplace_back(well_name, i);
|
parallelWells.emplace_back(well_name, i);
|
||||||
|
@ -694,6 +694,9 @@ void WellState<Scalar>::initWellStateMSWell(const std::vector<Well>& wells_ecl,
|
|||||||
for (int w = 0; w < nw; ++w) {
|
for (int w = 0; w < nw; ++w) {
|
||||||
const auto& well_ecl = wells_ecl[w];
|
const auto& well_ecl = wells_ecl[w];
|
||||||
auto& ws = this->well(w);
|
auto& ws = this->well(w);
|
||||||
|
// If the phase_rates has zero size this is an inactive well that will never be solved
|
||||||
|
if (ws.perf_data.phase_rates.size() == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (well_ecl.isMultiSegment()) {
|
if (well_ecl.isMultiSegment()) {
|
||||||
const WellSegments& segment_set = well_ecl.getSegments();
|
const WellSegments& segment_set = well_ecl.getSegments();
|
||||||
|
Loading…
Reference in New Issue
Block a user