putting more things in the prototyping test.

This commit is contained in:
Kai Bao
2016-10-06 18:00:08 +02:00
parent 999b80a91a
commit a9335266c6
4 changed files with 35 additions and 7 deletions

View File

@@ -194,12 +194,19 @@ namespace Opm
//TODO: later, it should be extended to update group targets
bool WellCollection::needUpdateWellTargets() const
{
bool any_group_control_node = false;
bool any_should_update_node = false;
for (size_t i = 0; i < leaf_nodes_.size(); ++i) {
if (leaf_nodes_[i]->shouldUpdateWellTargets() && !leaf_nodes_[i]->individualControl()) {
return true;
std::cout << " well " << leaf_nodes_[i]->name() << " under group control ? " << !leaf_nodes_[i]->individualControl() << " should update well target? " << leaf_nodes_[i]->shouldUpdateWellTargets() << std::endl;
if (leaf_nodes_[i]->shouldUpdateWellTargets()) {
any_should_update_node = true;
}
if (!leaf_nodes_[i]->individualControl()) {
any_group_control_node = true;
}
}
return false;
std::cout << " any_group_control_node " << any_group_control_node << " any_should_update_node " << any_should_update_node << std::endl;
return (any_group_control_node && any_should_update_node);
}
@@ -215,4 +222,12 @@ namespace Opm
return leaf_nodes_[i];
}
bool WellCollection::justUpdateWellTargets() const {
return just_update_well_targets_;
}
void WellCollection::setJustUpdateWellTargets(const bool flag) {
just_update_well_targets_ = flag;
}
}