logPrimaryVars: move to BlackoilWellModelGeneric

This commit is contained in:
Arne Morten Kvarving 2024-11-18 10:58:07 +01:00
parent 5897805e5b
commit 5217e63309
4 changed files with 18 additions and 22 deletions

View File

@ -387,7 +387,6 @@ template<class Scalar> class WellContributions;
const Domain& domain);
void updateWellControlsDomain(DeferredLogger& deferred_logger, const Domain& domain);
void logPrimaryVars() const;
std::vector<Scalar> getPrimaryVarsDomain(const int domainIdx) const;
void setPrimaryVarsDomain(const int domainIdx, const std::vector<Scalar>& vars);

View File

@ -69,9 +69,8 @@
#include <algorithm>
#include <cassert>
#include <functional>
#include <stack>
#include <stdexcept>
#include <string_view>
#include <sstream>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
@ -2041,6 +2040,21 @@ updateFiltrationModelsPreStep(DeferredLogger& deferred_logger)
}
}
template<class Scalar>
void BlackoilWellModelGeneric<Scalar>::
logPrimaryVars() const
{
std::ostringstream os;
for (const auto& w : this->well_container_generic_) {
os << w->name() << ":";
auto pv = w->getPrimaryVars();
for (const Scalar v : pv) {
os << ' ' << v;
}
os << '\n';
}
OpmLog::debug(os.str());
}
template class BlackoilWellModelGeneric<double>;

View File

@ -219,6 +219,8 @@ public:
}
bool wasDynamicallyShutThisTimeStep(const std::string& well_name) const;
void logPrimaryVars() const;
template<class Serializer>
void serializeOp(Serializer& serializer)
{

View File

@ -2985,25 +2985,6 @@ namespace Opm {
}
template <typename TypeTag>
void
BlackoilWellModel<TypeTag>::
logPrimaryVars() const
{
std::ostringstream os;
for (const auto& w : well_container_) {
os << w->name() << ":";
auto pv = w->getPrimaryVars();
for (const Scalar v : pv) {
os << ' ' << v;
}
os << '\n';
}
OpmLog::debug(os.str());
}
template <typename TypeTag>
std::vector<typename BlackoilWellModel<TypeTag>::Scalar>
BlackoilWellModel<TypeTag>::