Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions opm/simulators/wells/BlackoilWellModelConstraints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,42 +322,6 @@ checkGroupProductionConstraints(const Group& group, DeferredLogger& deferred_log
return std::make_pair(Group::ProductionCMode::NONE, Scalar(1.0));
}

template<typename Scalar, typename IndexTraits>
bool BlackoilWellModelConstraints<Scalar, IndexTraits>::
checkGroupConstraints(const Group& group,
const int reportStepIdx,
DeferredLogger& deferred_logger) const
{
if (group.isInjectionGroup()) {
const Phase all[] = {Phase::WATER, Phase::OIL, Phase::GAS};
for (Phase phase : all) {
if (!group.hasInjectionControl(phase)) {
continue;
}
const auto& check = this->checkGroupInjectionConstraints(group,
reportStepIdx, phase);
if (check.first != Group::InjectionCMode::NONE) {
return true;
}
}
}
if (group.isProductionGroup()) {
const auto& check = this->checkGroupProductionConstraints(group, deferred_logger);
if (check.first != Group::ProductionCMode::NONE)
{
return true;
}
}

// call recursively down the group hierarchy
bool violated = false;
for (const std::string& groupName : group.groups()) {
const auto& grp = wellModel_.schedule().getGroup(groupName, reportStepIdx);
violated = violated || this->checkGroupConstraints(grp, reportStepIdx, deferred_logger);
}
return violated;
}

template<typename Scalar, typename IndexTraits>
void BlackoilWellModelConstraints<Scalar, IndexTraits>::
actionOnBrokenConstraints(const Group& group,
Expand Down
5 changes: 0 additions & 5 deletions opm/simulators/wells/BlackoilWellModelConstraints.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ class BlackoilWellModelConstraints
: wellModel_(wellModel)
{}

//! \brief Check the constraints of a well group.
bool checkGroupConstraints(const Group& group,
const int reportStepIdx,
DeferredLogger& deferred_logger) const;

//! \brief Execute action for broken constraint for an injection well group.
void actionOnBrokenConstraints(const Group& group,
const Group::InjectionCMode& newControl,
Expand Down