mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
getPrimaryVarsDomain: move to BlackoilWellModelGeneric
This commit is contained in:
@@ -387,7 +387,6 @@ template<class Scalar> class WellContributions;
|
||||
const Domain& domain);
|
||||
void updateWellControlsDomain(DeferredLogger& deferred_logger, const Domain& domain);
|
||||
|
||||
std::vector<Scalar> getPrimaryVarsDomain(const int domainIdx) const;
|
||||
void setPrimaryVarsDomain(const int domainIdx, const std::vector<Scalar>& vars);
|
||||
|
||||
void setupDomains(const std::vector<Domain>& domains);
|
||||
|
@@ -2056,6 +2056,21 @@ logPrimaryVars() const
|
||||
OpmLog::debug(os.str());
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
std::vector<Scalar>
|
||||
BlackoilWellModelGeneric<Scalar>::
|
||||
getPrimaryVarsDomain(const int domainIdx) const
|
||||
{
|
||||
std::vector<Scalar> ret;
|
||||
for (const auto& well : this->well_container_generic_) {
|
||||
if (this->well_domain_.at(well->name()) == domainIdx) {
|
||||
const auto& pv = well->getPrimaryVars();
|
||||
ret.insert(ret.end(), pv.begin(), pv.end());
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
template class BlackoilWellModelGeneric<double>;
|
||||
|
||||
#if FLOW_INSTANTIATE_FLOAT
|
||||
|
@@ -220,6 +220,7 @@ public:
|
||||
bool wasDynamicallyShutThisTimeStep(const std::string& well_name) const;
|
||||
|
||||
void logPrimaryVars() const;
|
||||
std::vector<Scalar> getPrimaryVarsDomain(const int domainIdx) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
|
@@ -2985,23 +2985,6 @@ namespace Opm {
|
||||
}
|
||||
|
||||
|
||||
template <typename TypeTag>
|
||||
std::vector<typename BlackoilWellModel<TypeTag>::Scalar>
|
||||
BlackoilWellModel<TypeTag>::
|
||||
getPrimaryVarsDomain(const int domainIdx) const
|
||||
{
|
||||
std::vector<Scalar> ret;
|
||||
for (const auto& well : well_container_) {
|
||||
if (this->well_domain_.at(well->name()) == domainIdx) {
|
||||
const auto& pv = well->getPrimaryVars();
|
||||
ret.insert(ret.end(), pv.begin(), pv.end());
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template <typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
|
Reference in New Issue
Block a user