mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-22 09:16:27 -06:00
Add inactive wells to rank 0 for output
This commit is contained in:
parent
7ee218b1e2
commit
cd26ce5568
@ -949,7 +949,7 @@ private:
|
||||
const auto need_wells = param.local_domain_partition_method_ == "zoltan";
|
||||
|
||||
const auto wells = need_wells
|
||||
? this->model_.simulator().vanguard().schedule().getActiveWellsatEnd()
|
||||
? this->model_.simulator().vanguard().schedule().getWellsatEnd()
|
||||
: std::vector<Well>{};
|
||||
|
||||
const auto& possibleFutureConnectionSet = need_wells
|
||||
|
@ -194,7 +194,7 @@ doLoadBalance_(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
}
|
||||
|
||||
const auto wells = ((mpiSize > 1) || partitionJacobiBlocks)
|
||||
? schedule.getActiveWellsatEnd()
|
||||
? schedule.getActiveWellsAtEnd()
|
||||
: std::vector<Well>{};
|
||||
const auto& possibleFutureConnections = schedule.getPossibleFutureConnections();
|
||||
// Distribute the grid and switch to the distributed view.
|
||||
@ -207,6 +207,14 @@ doLoadBalance_(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
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
|
||||
// cells that exist only on other ranks even in the case of
|
||||
// distributed wells. But we need all connections to figure out the
|
||||
|
Loading…
Reference in New Issue
Block a user