Merge pull request #3361 from joakim-hove/simplify-conn-check

Suggestion: Simplify check for number of perforations
This commit is contained in:
Joakim Hove 2021-06-11 11:04:21 +02:00 committed by GitHub
commit 2966a52a0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -396,11 +396,7 @@ void WellState::init(const std::vector<double>& cellPressures,
}
const int num_perf_this_well = new_iter->second[2];
const int num_perf_changed = parallel_well_info[w]->communication()
.sum(static_cast<int>(num_perf_old_well != num_perf_this_well));
const bool global_num_perf_same = num_perf_changed == 0;
const bool global_num_perf_same = (num_perf_this_well == num_perf_old_well);
// copy perforation rates when the number of
// perforations is equal, otherwise initialize