BlackoilWellModel: move numLocalWellsEnd to generic class

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

View File

@ -325,8 +325,6 @@ namespace Opm {
using PressureMatrix = Dune::BCRSMatrix<Opm::MatrixBlock<double, 1, 1>>;
int numLocalWellsEnd() const;
void addWellPressureEquations(PressureMatrix& jacobian, const BVector& weights,const bool use_well_weights) const;
void addWellPressureEquationsStruct(PressureMatrix& jacobian) const;

View File

@ -1393,4 +1393,11 @@ getMaxWellConnections() const
return wells;
}
int BlackoilWellModelGeneric::numLocalWellsEnd() const
{
auto w = schedule().getWellsatEnd();
w.erase(std::remove_if(w.begin(), w.end(), not_on_process_), w.end());
return w.size();
}
}

View File

@ -86,6 +86,7 @@ public:
virtual ~BlackoilWellModelGeneric() = default;
int numLocalWells() const;
int numLocalWellsEnd() const;
int numPhases() const;
/// return true if wells are available in the reservoir

View File

@ -1462,16 +1462,6 @@ namespace Opm {
}
template<typename TypeTag>
int
BlackoilWellModel<TypeTag>::
numLocalWellsEnd() const
{
auto w = schedule().getWellsatEnd();
w.erase(std::remove_if(w.begin(), w.end(), not_on_process_), w.end());
return w.size();
}
template<typename TypeTag>
void
BlackoilWellModel<TypeTag>::