diff --git a/src/opm/parser/eclipse/EclipseState/Grid/NNC.cpp b/src/opm/parser/eclipse/EclipseState/Grid/NNC.cpp index f92ede12e..3cffd54be 100644 --- a/src/opm/parser/eclipse/EclipseState/Grid/NNC.cpp +++ b/src/opm/parser/eclipse/EclipseState/Grid/NNC.cpp @@ -117,6 +117,10 @@ bool is_neighbor(const EclipseGrid& grid, std::size_t g1, std::size_t g2) { std::vector nnc_edit; for (const auto& keyword_ptr : deck.getKeywordList()) { for (const auto& record : *keyword_ptr) { + double tran_mult = record.getItem(6).get(0); + if (tran_mult == 1.0) + continue; + auto index_pair = make_index_pair(grid, record); if (!index_pair) continue; @@ -125,7 +129,6 @@ bool is_neighbor(const EclipseGrid& grid, std::size_t g1, std::size_t g2) { if (is_neighbor(grid, g1, g2)) continue; - double tran_mult = record.getItem(6).get(0); nnc_edit.emplace_back( g1, g2, tran_mult); } diff --git a/tests/parser/integration/NNCTests.cpp b/tests/parser/integration/NNCTests.cpp index a93c76729..81c5ee7dd 100644 --- a/tests/parser/integration/NNCTests.cpp +++ b/tests/parser/integration/NNCTests.cpp @@ -112,7 +112,7 @@ EDIT EDITNNC 5 1 1 1 5 3 0.5 / -- Inactive cell 2 2 1 3 3 1 0.5 / -- Valid - coupled to NNC -4 4 1 5 5 1 1.0 / -- Valid +4 4 1 5 5 1 2.0 / -- Valid -1 4 4 -1 7 7 1.0 / -- Very invalid / @@ -352,7 +352,7 @@ BOOST_AUTO_TEST_CASE(ACTNUM) BOOST_CHECK_EQUAL(edit.size(), 1); BOOST_CHECK_EQUAL(input.size(), 1); check_nnc(input, grid.getGlobalIndex(1,1,0), grid.getGlobalIndex(2,2,0), 0.5); - check_edit_nnc(edit, grid.getGlobalIndex(3,3,0), grid.getGlobalIndex(4,4,0), 1.0); + check_edit_nnc(edit, grid.getGlobalIndex(3,3,0), grid.getGlobalIndex(4,4,0), 2.0); check_order(editnnc); }