Definition at line 65 of file slit_mesh_test.C.
◆ build_mesh()
void SlitMeshTest::build_mesh |
( |
| ) |
|
|
inlineprotected |
Definition at line 86 of file slit_mesh_test.C.
References libMesh::Elem::build_with_id(), libMesh::QUAD4, and libMesh::Elem::set_node().
88 _mesh = std::make_unique<Mesh>(*TestCommWorld);
104 _mesh->set_mesh_dimension(2);
124 Elem * elem_top_left =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 0));
130 Elem * elem_bottom_left =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 1));
136 Elem * elem_top_right =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 2));
142 Elem * elem_bottom_right =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 3));
148 Elem * elem_top_leftleft =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 4));
154 Elem * elem_bottom_leftleft =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 5));
160 Elem * elem_top_rightright =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 6));
166 Elem * elem_bottom_rightright =
_mesh->add_elem(Elem::build_with_id(
QUAD4, 7));
175 _mesh->allow_renumbering(
false);
177 _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 190 of file slit_mesh_test.C.
195 CPPUNIT_ASSERT_EQUAL(static_cast<dof_id_type>(8),
_mesh->n_elem());
198 CPPUNIT_ASSERT_EQUAL(static_cast<dof_id_type>(16),
_mesh->n_nodes());
202 if (
_mesh->query_elem_ptr(0) &&
_mesh->query_elem_ptr(1))
203 CPPUNIT_ASSERT(
_mesh->elem_ref(0).node_id(1) !=
_mesh->elem_ref(1).node_id(2) );
204 if (
_mesh->query_elem_ptr(2) &&
_mesh->query_elem_ptr(3))
205 CPPUNIT_ASSERT(
_mesh->elem_ref(2).node_id(0) !=
_mesh->elem_ref(3).node_id(3) );
209 if (
_mesh->query_elem_ptr(0) &&
_mesh->query_elem_ptr(2))
210 CPPUNIT_ASSERT_EQUAL(
_mesh->elem_ref(0).node_id(1),
211 _mesh->elem_ref(2).node_id(0) );
212 if (
_mesh->query_elem_ptr(1) &&
_mesh->query_elem_ptr(3))
213 CPPUNIT_ASSERT_EQUAL(
_mesh->elem_ref(1).node_id(2),
214 _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: