1 #include <libmesh/libmesh.h> 2 #include <libmesh/replicated_mesh.h> 3 #include <libmesh/elem.h> 4 #include <libmesh/mesh_generation.h> 5 #include <libmesh/mesh_modification.h> 6 #include <libmesh/mesh_tools.h> 12 #include <unordered_set> 13 #include <unordered_map> 29 CPPUNIT_TEST( testDistortQuad );
34 CPPUNIT_TEST( testDistortHex );
37 CPPUNIT_TEST_SUITE_END();
51 perturb_and_check(
mesh);
65 perturb_and_check(
mesh);
73 std::unordered_map<dof_id_type, Point> pts_before;
74 for (
const auto & node :
mesh.node_ptr_range())
75 pts_before[node->id()] = *node;
77 std::unordered_set<dof_id_type> boundary_node_ids =
86 for (
const auto & node :
mesh.node_ptr_range())
88 bool equal = node->absolute_fuzzy_equals(pts_before[node->id()]);
89 CPPUNIT_ASSERT(boundary_node_ids.count(node->id()) ? equal : !equal);
ElemType
Defines an enum for geometric element types.
CPPUNIT_TEST_SUITE_REGISTRATION(DistortTest)
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
libMesh::Parallel::Communicator * TestCommWorld
void test_helper_2D(ElemType elem_type)
The libMesh namespace provides an interface to certain functionality in the library.
void test_helper_3D(ElemType elem_type)
void perturb_and_check(ReplicatedMesh &mesh)