Skip to content
Snippets Groups Projects
Commit e13a5645 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[T] Clarify the next neighbor search fct. name.

parent be0228c3
No related branches found
No related tags found
No related merge requests found
...@@ -53,7 +53,8 @@ std::vector<std::size_t> findElementIdsConnectedToNode(Node const& node) ...@@ -53,7 +53,8 @@ std::vector<std::size_t> findElementIdsConnectedToNode(Node const& node)
} }
// Find all elements connected through all nodes of the element // Find all elements connected through all nodes of the element
std::vector<std::size_t> findByNodeConnectedElements(Element const& element) std::vector<std::size_t> findNextNeighborsConnectedByNode(
Element const& element)
{ {
std::vector<std::size_t> connected_elements; std::vector<std::size_t> connected_elements;
for (unsigned n = 0; n < element.getNumberOfBaseNodes(); ++n) for (unsigned n = 0; n < element.getNumberOfBaseNodes(); ++n)
...@@ -135,7 +136,8 @@ TEST_F(MeshLibFindElementWithinRadius, VerySmallRadius) ...@@ -135,7 +136,8 @@ TEST_F(MeshLibFindElementWithinRadius, VerySmallRadius)
auto result = findElementsWithinRadius(element, 1e-5); auto result = findElementsWithinRadius(element, 1e-5);
std::sort(std::begin(result), std::end(result)); std::sort(std::begin(result), std::end(result));
auto const expected_elements = findByNodeConnectedElements(element); auto const expected_elements =
findNextNeighborsConnectedByNode(element);
return result.size() == expected_elements.size() && return result.size() == expected_elements.size() &&
std::includes(std::begin(result), std::end(result), std::includes(std::begin(result), std::end(result),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment