diff --git a/opm/core/wells/WellCollection.cpp b/opm/core/wells/WellCollection.cpp index 9bcaf140c..9fa9909f1 100644 --- a/opm/core/wells/WellCollection.cpp +++ b/opm/core/wells/WellCollection.cpp @@ -209,7 +209,7 @@ namespace Opm any_should_update_node = true; } - if (leaf_nodes_[i]->individualControl()) { + if (!leaf_nodes_[i]->individualControl()) { any_group_control_node = true; } } @@ -228,7 +228,7 @@ namespace Opm any_should_update_node = true; } - if (leaf_nodes_[i]->individualControl()) { + if (!leaf_nodes_[i]->individualControl()) { any_group_control_node = true; } } diff --git a/opm/core/wells/WellsGroup.hpp b/opm/core/wells/WellsGroup.hpp index 309e770ed..92ce81472 100644 --- a/opm/core/wells/WellsGroup.hpp +++ b/opm/core/wells/WellsGroup.hpp @@ -325,7 +325,10 @@ namespace Opm const std::vector& well_surfacerates_phase); template - void updateWellTargets(const WellState& well_state); + void updateWellProductionTargets(const WellState& well_state); + + template + void updateWellInjectionTargets(const WellState& well_state); private: std::vector > children_;