diff --git a/opm/core/grid/GridUtilities.cpp b/opm/core/grid/GridUtilities.cpp index 8d1e3439..673a015e 100644 --- a/opm/core/grid/GridUtilities.cpp +++ b/opm/core/grid/GridUtilities.cpp @@ -29,7 +29,7 @@ namespace Opm /// For each cell, find indices of all other cells sharing a vertex with it. /// \param[in] grid A grid object. /// \return A table of neighbour cell-indices by cell. - SparseTable vertexNeighbours(const UnstructuredGrid& grid) + SparseTable cellNeighboursAcrossVertices(const UnstructuredGrid& grid) { // 1. Create vertex->cell mapping. We do this by iterating // over all faces, and adding both its cell neighbours diff --git a/opm/core/grid/GridUtilities.hpp b/opm/core/grid/GridUtilities.hpp index 48a44d61..fa870078 100644 --- a/opm/core/grid/GridUtilities.hpp +++ b/opm/core/grid/GridUtilities.hpp @@ -29,7 +29,7 @@ namespace Opm /// For each cell, find indices of all cells sharing a vertex with it. /// \param[in] grid A grid object. /// \return A table of neighbour cell-indices by cell. - SparseTable vertexNeighbours(const UnstructuredGrid& grid); + SparseTable cellNeighboursAcrossVertices(const UnstructuredGrid& grid); /// For each cell, order the (cell) neighbours counterclockwise. /// \param[in] grid A 2d grid object. diff --git a/tests/test_gridutilities.cpp b/tests/test_gridutilities.cpp index 3d4f7901..123973b7 100644 --- a/tests/test_gridutilities.cpp +++ b/tests/test_gridutilities.cpp @@ -33,11 +33,11 @@ using namespace Opm; -BOOST_AUTO_TEST_CASE(cartesian_2d_vertexNeighbours) +BOOST_AUTO_TEST_CASE(cartesian_2d_cellNeighboursAcrossVertices) { const GridManager gm(2, 2); const UnstructuredGrid& grid = *gm.c_grid(); - const SparseTable vnb = vertexNeighbours(grid); + const SparseTable vnb = cellNeighboursAcrossVertices(grid); const int num_elem = 12; const int elem[num_elem] = { 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2 }; @@ -47,11 +47,11 @@ BOOST_AUTO_TEST_CASE(cartesian_2d_vertexNeighbours) BOOST_CHECK(vnb == truth); } -BOOST_AUTO_TEST_CASE(cartesian_3d_vertexNeighbours) +BOOST_AUTO_TEST_CASE(cartesian_3d_cellNeighboursAcrossVertices) { const GridManager gm(3, 2, 2); const UnstructuredGrid& grid = *gm.c_grid(); - const SparseTable vnb = vertexNeighbours(grid); + const SparseTable vnb = cellNeighboursAcrossVertices(grid); BOOST_CHECK_EQUAL(int(vnb.size()), grid.number_of_cells); BOOST_REQUIRE(!vnb.empty()); @@ -65,7 +65,7 @@ BOOST_AUTO_TEST_CASE(cartesian_2d_orderCounterClockwise) { const GridManager gm(2, 2); const UnstructuredGrid& grid = *gm.c_grid(); - SparseTable vnb = vertexNeighbours(grid); + SparseTable vnb = cellNeighboursAcrossVertices(grid); orderCounterClockwise(grid, vnb); BOOST_REQUIRE(!vnb.empty());