considering not OPEN connection when updateCompletions

in WellInterface.
This commit is contained in:
Kai Bao 2019-06-24 21:02:47 +02:00
parent 6d0aa4351a
commit e15a8f62e8
2 changed files with 9 additions and 5 deletions

View File

@ -331,7 +331,9 @@ namespace Opm
* } * }
* The integer IDs correspond to the COMPLETION id given by the COMPLUMP keyword. * The integer IDs correspond to the COMPLETION id given by the COMPLUMP keyword.
* When there is no COMPLUMP keyword used, a default completion number will be assigned * When there is no COMPLUMP keyword used, a default completion number will be assigned
* based on the order of the declaration of the connections * based on the order of the declaration of the connections.
* Since the connections not OPEN is not included in the Wells, so they will not be considered
* in this mapping relation.
*/ */
std::map<int, std::vector<int>> completions_; std::map<int, std::vector<int>> completions_;

View File

@ -150,11 +150,13 @@ namespace Opm
const WellConnections& connections = well_ecl_.getConnections(); const WellConnections& connections = well_ecl_.getConnections();
const int num_conns = connections.size(); const int num_conns = connections.size();
assert(num_conns == number_of_perforations_); int num_active_connections = 0;
for (int c = 0; c < num_conns; ++c) {
for (int c = 0; c < num_conns; c++) { if (connections[c].state() == WellCompletion::OPEN) {
completions_[connections[c].complnum()].push_back(c); completions_[connections[c].complnum()].push_back(num_active_connections++);
}
} }
assert(num_active_connections == number_of_perforations_);
} }