mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-22 15:33:29 -06:00
Merge pull request #5791 from totto82/allow3
Allow for the third group switch
This commit is contained in:
commit
c1f16bd981
@ -581,7 +581,7 @@ updateGroupIndividualControl(const Group& group,
|
||||
if (auto groupPos = switched_inj.find(group.name()); groupPos != switched_inj.end()) {
|
||||
auto& ctrls = groupPos->second[static_cast<std::underlying_type_t<Phase>>(phase)];
|
||||
for (const auto& ctrl : ctrls) {
|
||||
if (std::count(ctrls.begin(), ctrls.end(), ctrl) < max_number_of_group_switch) {
|
||||
if (std::count(ctrls.begin(), ctrls.end(), ctrl) <= max_number_of_group_switch) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -633,7 +633,7 @@ updateGroupIndividualControl(const Group& group,
|
||||
if (auto groupPos = switched_prod.find(group.name()); groupPos != switched_prod.end()) {
|
||||
auto& ctrls = groupPos->second;
|
||||
for (const auto& ctrl : ctrls) {
|
||||
if (std::count(ctrls.begin(), ctrls.end(), ctrl) < max_number_of_group_switch) {
|
||||
if (std::count(ctrls.begin(), ctrls.end(), ctrl) <= max_number_of_group_switch) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -631,7 +631,7 @@ checkGroupHigherConstraints(const Group& group,
|
||||
if (auto groupPos = switched_inj_groups_.find(group.name()); groupPos != switched_inj_groups_.end()) {
|
||||
auto& ctrls = groupPos->second[static_cast<std::underlying_type_t<Phase>>(phase)];
|
||||
for (const auto& ctrl : ctrls) {
|
||||
if (std::count(ctrls.begin(), ctrls.end(), ctrl) < max_number_of_group_switch) {
|
||||
if (std::count(ctrls.begin(), ctrls.end(), ctrl) <= max_number_of_group_switch) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -705,7 +705,7 @@ checkGroupHigherConstraints(const Group& group,
|
||||
if (auto groupPos = switched_prod_groups_.find(group.name()); groupPos != switched_prod_groups_.end()) {
|
||||
auto& ctrls = groupPos->second;
|
||||
for (const auto& ctrl : ctrls) {
|
||||
if (std::count(ctrls.begin(), ctrls.end(), ctrl) < max_number_of_group_switch) {
|
||||
if (std::count(ctrls.begin(), ctrls.end(), ctrl) <= max_number_of_group_switch) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -761,10 +761,7 @@ namespace Opm {
|
||||
local_deferredLogger.info(msg);
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& [grname, grdata] : this->switched_inj_groups_) {
|
||||
//const std::string& name = key.first;
|
||||
//const Opm::Phase& phase = key.second;
|
||||
const Phase all[] = {Phase::WATER, Phase::OIL, Phase::GAS};
|
||||
for (Phase phase : all) {
|
||||
const auto& ctrls = grdata[static_cast<std::underlying_type_t<Phase>>(phase)];
|
||||
|
Loading…
Reference in New Issue
Block a user