Go to the documentation of this file. 1 #include <libmesh/libmesh.h>
2 #include <libmesh/node.h>
3 #include <libmesh/mesh_generation.h>
4 #include <libmesh/mesh_tools.h>
5 #include <libmesh/replicated_mesh.h>
26 CPPUNIT_TEST( testEdge2 );
27 CPPUNIT_TEST( testEdge3 );
28 CPPUNIT_TEST( testEdge4 );
30 CPPUNIT_TEST_SUITE_END();
48 std::vector<std::vector<const Elem *>> nodes_to_elem_map;
53 std::vector<const Node*> neighbor_nodes;
63 std::vector<dof_id_type> neighbor_node_ids(neighbor_nodes.size());
64 for (std::size_t i=0; i<neighbor_nodes.size(); ++i)
65 neighbor_node_ids[i] = neighbor_nodes[i]->
id();
66 std::sort(neighbor_node_ids.begin(), neighbor_node_ids.end());
69 for (std::size_t j=0; j<neighbor_node_ids.size(); ++j)
71 CPPUNIT_ASSERT_EQUAL( validation_data[2*ctr + j], neighbor_node_ids[j] );
102 do_test(10,
EDGE2, validation_data);
124 do_test(5,
EDGE3, validation_data);
145 do_test(3,
EDGE4, validation_data);
The libMesh namespace provides an interface to certain functionality in the library.
CPPUNIT_TEST_SUITE_REGISTRATION(NodalNeighborsTest)
void do_test(unsigned n_elem, ElemType elem_type, dof_id_type *validation_data)
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
virtual SimpleRange< node_iterator > node_ptr_range()=0
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
libMesh::Parallel::Communicator * TestCommWorld
ElemType
Defines an enum for geometric element types.