[bugfix] Search all NNCs when applying EDITNNC.

The latter is not sorted. Therefore we either need to search the whole
range or sort it before processing it. Io pted for the former.
This commit is contained in:
Markus Blatt 2019-04-30 17:07:47 +02:00 committed by Arne Morten Kvarving
parent d2efdcfaa5
commit 781fb46e61

View File

@ -71,7 +71,7 @@ std::vector<Opm::NNCdata> sortNncAndApplyEditnnc(const std::vector<Opm::NNCdata>
continue;
}
if (candidate->cell1 != edit.cell1 || candidate->cell2 != edit.cell2) {
candidate = std::lower_bound(candidate, nncData.end(), Opm::NNCdata(edit.cell1, edit.cell2, 0), nncLess);
candidate = std::lower_bound(nncData.begin(), nncData.end(), Opm::NNCdata(edit.cell1, edit.cell2, 0), nncLess);
if (candidate == nncData.end() && log) {
// no more NNCs left
printNncWarning(edit.cell1, edit.cell2);