mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add inactive wells to rank 0 for output
This commit is contained in:
@@ -949,7 +949,7 @@ private:
|
|||||||
const auto need_wells = param.local_domain_partition_method_ == "zoltan";
|
const auto need_wells = param.local_domain_partition_method_ == "zoltan";
|
||||||
|
|
||||||
const auto wells = need_wells
|
const auto wells = need_wells
|
||||||
? this->model_.simulator().vanguard().schedule().getActiveWellsatEnd()
|
? this->model_.simulator().vanguard().schedule().getWellsatEnd()
|
||||||
: std::vector<Well>{};
|
: std::vector<Well>{};
|
||||||
|
|
||||||
const auto& possibleFutureConnectionSet = need_wells
|
const auto& possibleFutureConnectionSet = need_wells
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ doLoadBalance_(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
|||||||
}
|
}
|
||||||
|
|
||||||
const auto wells = ((mpiSize > 1) || partitionJacobiBlocks)
|
const auto wells = ((mpiSize > 1) || partitionJacobiBlocks)
|
||||||
? schedule.getActiveWellsatEnd()
|
? schedule.getActiveWellsAtEnd()
|
||||||
: std::vector<Well>{};
|
: std::vector<Well>{};
|
||||||
const auto& possibleFutureConnections = schedule.getPossibleFutureConnections();
|
const auto& possibleFutureConnections = schedule.getPossibleFutureConnections();
|
||||||
// Distribute the grid and switch to the distributed view.
|
// Distribute the grid and switch to the distributed view.
|
||||||
@@ -207,6 +207,14 @@ doLoadBalance_(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
|||||||
eclState1, parallelWells);
|
eclState1, parallelWells);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add inactive wells to RANK0 (possibly needed for RFT file output)
|
||||||
|
const bool hasInactive = this->grid_->comm().rank() == 0;
|
||||||
|
const auto inactive_well_names = schedule.getInactiveWellNamesAtEnd();
|
||||||
|
for (const auto& well_name : inactive_well_names) {
|
||||||
|
parallelWells.emplace_back(well_name, hasInactive);
|
||||||
|
}
|
||||||
|
std::sort(parallelWells.begin(), parallelWells.end());
|
||||||
|
|
||||||
// Calling Schedule::filterConnections would remove any perforated
|
// Calling Schedule::filterConnections would remove any perforated
|
||||||
// cells that exist only on other ranks even in the case of
|
// cells that exist only on other ranks even in the case of
|
||||||
// distributed wells. But we need all connections to figure out the
|
// distributed wells. But we need all connections to figure out the
|
||||||
|
|||||||
Reference in New Issue
Block a user