add method that open all completions
This commit is contained in:
parent
05bac5f59a
commit
cc24920ff9
@ -113,6 +113,7 @@ public:
|
||||
* it is used when WELOPEN or WCON* keyword request to open the well */
|
||||
void openWell(const std::string& well_name);
|
||||
|
||||
void openAllCompletions(const std::string& well_name);
|
||||
|
||||
bool hasCompletion(const std::string& well_name, const int complnum) const;
|
||||
|
||||
|
@ -66,6 +66,13 @@ namespace Opm {
|
||||
well.closed = false;
|
||||
}
|
||||
|
||||
void WellTestState::openAllCompletions(const std::string& well_name) {
|
||||
completions.erase(std::remove_if(completions.begin(),
|
||||
completions.end(),
|
||||
[&well_name](const ClosedCompletion& completion) { return (completion.wellName == well_name); }),
|
||||
completions.end());
|
||||
}
|
||||
|
||||
bool WellTestState::hasWellClosed(const std::string& well_name) const {
|
||||
for (const auto& well : wells)
|
||||
if (well.name == well_name && well.closed)
|
||||
|
Loading…
Reference in New Issue
Block a user