BlackoilWellModel: move getMaxWellConnections to generic class

This commit is contained in:
Arne Morten Kvarving
2023-05-22 10:01:33 +02:00
parent 7ab8d94215
commit dd9a2835fe
4 changed files with 25 additions and 27 deletions

View File

@@ -1369,4 +1369,28 @@ assignWellTracerRates(data::Wells& wsrpt,
}
}
std::vector<std::vector<int>>
BlackoilWellModelGeneric::
getMaxWellConnections() const
{
std::vector<std::vector<int>> wells;
auto schedule_wells = schedule().getWellsatEnd();
schedule_wells.erase(std::remove_if(schedule_wells.begin(), schedule_wells.end(), not_on_process_), schedule_wells.end());
wells.reserve(schedule_wells.size());
// initialize the additional cell connections introduced by wells.
for ( const auto& well : schedule_wells )
{
std::vector<int> compressed_well_perforations = this->getCellsForConnections(well);
// also include wells with no perforations in case
std::sort(compressed_well_perforations.begin(),
compressed_well_perforations.end());
wells.push_back(compressed_well_perforations);
}
return wells;
}
}