mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
BlackoilWellModel: move getMaxWellConnections to generic class
This commit is contained in:
parent
7ab8d94215
commit
dd9a2835fe
@ -329,8 +329,6 @@ namespace Opm {
|
||||
|
||||
void addWellPressureEquations(PressureMatrix& jacobian, const BVector& weights,const bool use_well_weights) const;
|
||||
|
||||
std::vector<std::vector<int>> getMaxWellConnections() const;
|
||||
|
||||
void addWellPressureEquationsStruct(PressureMatrix& jacobian) const;
|
||||
|
||||
void initGliftEclWellMap(GLiftEclWells &ecl_well_map);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -382,6 +382,7 @@ protected:
|
||||
virtual int compressedIndexForInterior(int cartesian_cell_idx) const = 0;
|
||||
|
||||
std::vector<int> getCellsForConnections(const Well& well) const;
|
||||
std::vector<std::vector<int>> getMaxWellConnections() const;
|
||||
|
||||
std::vector<std::string> getWellsForTesting(const int timeStepIdx,
|
||||
const double simulationTime);
|
||||
|
@ -1472,31 +1472,6 @@ namespace Opm {
|
||||
return w.size();
|
||||
}
|
||||
|
||||
template<typename TypeTag>
|
||||
std::vector<std::vector<int>>
|
||||
BlackoilWellModel<TypeTag>::
|
||||
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;
|
||||
}
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
|
Loading…
Reference in New Issue
Block a user