addressing a few comments.

This commit is contained in:
Kai Bao 2016-11-16 09:51:06 +01:00
parent 6714c53dc8
commit 0e6214723c
3 changed files with 3 additions and 11 deletions

View File

@ -288,7 +288,7 @@ namespace Opm
return leaf_nodes_[i];
}
void WellCollection::updateWellTargets(const std::vector<double> well_rates)
void WellCollection::updateWellTargets(const std::vector<double>& 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;
}
}

View File

@ -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<double> well_rates);
void updateWellTargets(const std::vector<double>& 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<std::shared_ptr<WellsGroupInterface> > roots_;
@ -152,7 +149,7 @@ namespace Opm
// This will be used to traverse the bottom nodes.
std::vector<WellNode*> leaf_nodes_;
bool having_vrep_groups_;
bool having_vrep_groups_ = false;
};

View File

@ -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);
}