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>
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);
void test_helper_2D(ElemType elem_type)
void perturb_and_check(ReplicatedMesh &mesh)
LIBMESH_CPPUNIT_TEST_SUITE(DistortTest)
The goal of this test is to make sure that boundary nodes are not restricted during distortion.
void test_helper_3D(ElemType elem_type)
CPPUNIT_TEST(testDistortHex)
CPPUNIT_TEST(testDistortQuad)
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
Communicator * TestCommWorld
CPPUNIT_TEST_SUITE_REGISTRATION(DistortTest)
The libMesh namespace provides an interface to certain functionality in the library.
ElemType
Defines an enum for geometric element types.