mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Make the parallel reduction when applying the Wells.
The B matrix is basically a component-wise multiplication with a vector followed by a parallel reduction. We do that reduction to all ranks computing for the well to save the broadcast when applying C^T.
This commit is contained in:
@@ -416,6 +416,16 @@ public:
|
||||
int outputInterval = EWOMS_GET_PARAM(TypeTag, int, EclOutputInterval);
|
||||
if (outputInterval >= 0)
|
||||
schedule().restart().overrideRestartWriteInterval(outputInterval);
|
||||
|
||||
// Initialize parallelWells with all local wells
|
||||
const auto& schedule_wells = schedule().getWellsatEnd();
|
||||
parallelWells_.reserve(schedule_wells.size());
|
||||
|
||||
for (const auto& well: schedule_wells)
|
||||
{
|
||||
parallelWells_.emplace_back(well.name(), true);
|
||||
}
|
||||
std::sort(parallelWells_.begin(), parallelWells_.end());
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user