From 708bfd169b3641b844e2a816ba84e6e5c65daa14 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Wed, 16 Nov 2016 09:51:06 +0100 Subject: [PATCH] addressing a few comments. --- opm/core/wells/WellCollection.cpp | 6 +----- opm/core/wells/WellCollection.hpp | 7 ++----- opm/core/wells/WellsManager_impl.hpp | 1 - 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/opm/core/wells/WellCollection.cpp b/opm/core/wells/WellCollection.cpp index 095d1763..1a21bd87 100644 --- a/opm/core/wells/WellCollection.cpp +++ b/opm/core/wells/WellCollection.cpp @@ -288,7 +288,7 @@ namespace Opm return leaf_nodes_[i]; } - void WellCollection::updateWellTargets(const std::vector well_rates) + void WellCollection::updateWellTargets(const std::vector& well_rates) { if ( !needUpdateWellTargets() ) { return; @@ -323,8 +323,4 @@ namespace Opm return having_vrep_groups_; } - void WellCollection::setHavingVREPGroups(const bool vrep) { - having_vrep_groups_ = vrep; - } - } diff --git a/opm/core/wells/WellCollection.hpp b/opm/core/wells/WellCollection.hpp index 77662e6c..b4018db3 100644 --- a/opm/core/wells/WellCollection.hpp +++ b/opm/core/wells/WellCollection.hpp @@ -137,14 +137,11 @@ namespace Opm WellNode* getNode(size_t i) const; /// Updating the well targets based on the well rates. - void updateWellTargets(const std::vector well_rates); + void updateWellTargets(const std::vector& well_rates); /// When we have VREP group, we need to update the targets based on the updated production voidage rates for each iteration. bool havingVREPGroups() const; - /// Setting the VREP group flag when creating the well collection. - void setHavingVREPGroups(const bool vrep); - private: // To account for the possibility of a forest std::vector > roots_; @@ -152,7 +149,7 @@ namespace Opm // This will be used to traverse the bottom nodes. std::vector leaf_nodes_; - bool having_vrep_groups_; + bool having_vrep_groups_ = false; }; diff --git a/opm/core/wells/WellsManager_impl.hpp b/opm/core/wells/WellsManager_impl.hpp index 17667710..b6fd9e2c 100644 --- a/opm/core/wells/WellsManager_impl.hpp +++ b/opm/core/wells/WellsManager_impl.hpp @@ -409,7 +409,6 @@ WellsManager::init(const Opm::EclipseState& eclipseState, const auto& fieldGroup = schedule.getGroup(fieldNode->name()); - well_collection_.setHavingVREPGroups(false); well_collection_.addField(fieldGroup, timeStep, pu); addChildGroups(*fieldNode, schedule, timeStep, pu); }