Definition at line 69 of file slit_mesh_test.C.
◆ build_mesh()
void SlitMeshTest::build_mesh |
( |
| ) |
|
|
inlineprotected |
Definition at line 90 of file slit_mesh_test.C.
References libMesh::Elem::build_with_id(), libMesh::QUAD4, and libMesh::Elem::set_node().
92 _mesh = std::make_unique<Mesh>(*TestCommWorld);
108 _mesh->set_mesh_dimension(2);
128 Elem * elem_top_left =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 0));
134 Elem * elem_bottom_left =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 1));
140 Elem * elem_top_right =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 2));
146 Elem * elem_bottom_right =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 3));
152 Elem * elem_top_leftleft =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 4));
158 Elem * elem_bottom_leftleft =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 5));
164 Elem * elem_top_rightright =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 6));
170 Elem * elem_bottom_rightright =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 7));
179 _mesh->allow_renumbering(
false);
181 _mesh->prepare_for_use();
virtual Node *& set_node(const unsigned int i)
This is the base class from which all geometric element types are derived.
std::unique_ptr< Mesh > _mesh
A Point defines a location in LIBMESH_DIM dimensional Real space.
◆ CPPUNIT_TEST()
◆ CPPUNIT_TEST_SUITE_END()
SlitMeshTest::CPPUNIT_TEST_SUITE_END |
( |
| ) |
|
◆ LIBMESH_CPPUNIT_TEST_SUITE()
The goal of this test is to ensure that a 2D mesh with nodes overlapping on opposite sides of an internal, "slit" edge is usable.
The mesh has to be connected at more than one node on each side of the slit, however, to ensure that we can find point neighbors of each node.
◆ setUp()
void SlitMeshTest::setUp |
( |
| ) |
|
|
inline |
◆ tearDown()
void SlitMeshTest::tearDown |
( |
| ) |
|
|
inline |
◆ testMesh()
void SlitMeshTest::testMesh |
( |
| ) |
|
|
inline |
Definition at line 194 of file slit_mesh_test.C.
199 CPPUNIT_ASSERT_EQUAL(static_cast<dof_id_type>(8),
_mesh->n_elem());
202 CPPUNIT_ASSERT_EQUAL(static_cast<dof_id_type>(16),
_mesh->n_nodes());
206 if (
_mesh->query_elem_ptr(0) &&
_mesh->query_elem_ptr(1))
207 CPPUNIT_ASSERT(
_mesh->elem_ref(0).node_id(1) !=
_mesh->elem_ref(1).node_id(2) );
208 if (
_mesh->query_elem_ptr(2) &&
_mesh->query_elem_ptr(3))
209 CPPUNIT_ASSERT(
_mesh->elem_ref(2).node_id(0) !=
_mesh->elem_ref(3).node_id(3) );
213 if (
_mesh->query_elem_ptr(0) &&
_mesh->query_elem_ptr(2))
214 CPPUNIT_ASSERT_EQUAL(
_mesh->elem_ref(0).node_id(1),
215 _mesh->elem_ref(2).node_id(0) );
216 if (
_mesh->query_elem_ptr(1) &&
_mesh->query_elem_ptr(3))
217 CPPUNIT_ASSERT_EQUAL(
_mesh->elem_ref(1).node_id(2),
218 _mesh->elem_ref(3).node_id(3) );
std::unique_ptr< Mesh > _mesh
◆ _mesh
std::unique_ptr<Mesh> SlitMeshTest::_mesh |
|
protected |
The documentation for this class was generated from the following file: