1#include <libmesh/libmesh.h>
3#include <libmesh/elem.h>
4#include <libmesh/mesh.h>
5#include <libmesh/mesh_generation.h>
37 for (
const auto & elem :
mesh.local_element_ptr_range())
38 for (
const auto & neigh : elem->neighbor_ptr_range())
60 auto range_start =
mesh.elements_begin();
61 const auto range_end =
mesh.elements_end();
62 while (range_start != range_end && (*range_start)->id() < 5)
70 CPPUNIT_ASSERT_EQUAL(old_n_neighbors, new_n_neighbors);
74 CPPUNIT_ASSERT_EQUAL(old_n_neighbors, newer_n_neighbors);
90 CPPUNIT_ASSERT_EQUAL(mesh0.n_nodes(),
dof_id_type(16));
100 mesh0.stitch_meshes(mesh1, 3, 1,
TOLERANCE,
true,
104 CPPUNIT_ASSERT_EQUAL(mesh0.n_nodes(),
dof_id_type(61));
107 CPPUNIT_ASSERT_EQUAL(stitched_n_neighbors, 54);
109 mesh0.all_second_order_range(mesh0.element_ptr_range(),
112 CPPUNIT_ASSERT_EQUAL(new_n_neighbors, 54);
LIBMESH_CPPUNIT_TEST_SUITE(MixedOrderTest)
The goal of this test set is to test libMesh manipulation of meshes with mixed Elem orders.
static int n_neighbor_links(const MeshBase &mesh)
CPPUNIT_TEST(testFindNeighbors)
virtual dof_id_type n_nodes() const override final
This is the MeshBase class.
virtual void all_second_order_range(const SimpleRange< element_iterator > &range, const bool full_ordered=true)=0
Converts a set of this Mesh's elements defined by range from FIRST order to SECOND order.
virtual void find_neighbors(const bool reset_remote_elements=false, const bool reset_current_list=true, const bool assert_valid=true)=0
Locate element face (edge in 2D) neighbors.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
const Parallel::Communicator & comm() const
Communicator * TestCommWorld
CPPUNIT_TEST_SUITE_REGISTRATION(MixedOrderTest)
The libMesh namespace provides an interface to certain functionality in the library.
static constexpr Real TOLERANCE