diff --git a/opm/simulators/wells/BlackoilWellModel_impl.hpp b/opm/simulators/wells/BlackoilWellModel_impl.hpp index 1e9e249e4..ff0fdfaac 100644 --- a/opm/simulators/wells/BlackoilWellModel_impl.hpp +++ b/opm/simulators/wells/BlackoilWellModel_impl.hpp @@ -1202,9 +1202,7 @@ namespace Opm { auto& well = well_container_[i]; std::shared_ptr > derived = std::dynamic_pointer_cast >(well); if (derived) { - unsigned int numBlocks; - derived->getNumBlocks(numBlocks); - wellContribs.addNumBlocks(numBlocks); + wellContribs.addNumBlocks(derived->getNumBlocks()); } } diff --git a/opm/simulators/wells/StandardWellGeneric.cpp b/opm/simulators/wells/StandardWellGeneric.cpp index 4afc0eb85..7159a6438 100644 --- a/opm/simulators/wells/StandardWellGeneric.cpp +++ b/opm/simulators/wells/StandardWellGeneric.cpp @@ -392,11 +392,11 @@ computeBhpAtThpLimitInj(const std::function(const double)>& } template -void +unsigned int StandardWellGeneric:: -getNumBlocks(unsigned int& numBlocks) const +getNumBlocks() const { - numBlocks = duneB_.nonzeroes(); + return duneB_.nonzeroes(); } template class StandardWellGeneric; diff --git a/opm/simulators/wells/StandardWellGeneric.hpp b/opm/simulators/wells/StandardWellGeneric.hpp index 5b4ea3098..e55c988c6 100644 --- a/opm/simulators/wells/StandardWellGeneric.hpp +++ b/opm/simulators/wells/StandardWellGeneric.hpp @@ -66,7 +66,7 @@ protected: public: /// get the number of blocks of the C and B matrices, used to allocate memory in a WellContributions object - void getNumBlocks(unsigned int& _nnzs) const; + unsigned int getNumBlocks() const; protected: StandardWellGeneric(const WellInterfaceGeneric& baseif);