Definition at line 15 of file point_locator_test.C.
◆ CPPUNIT_TEST() [1/4]
◆ CPPUNIT_TEST() [2/4]
◆ CPPUNIT_TEST() [3/4]
◆ CPPUNIT_TEST() [4/4]
◆ CPPUNIT_TEST_SUITE()
◆ CPPUNIT_TEST_SUITE_END()
PointLocatorTest::CPPUNIT_TEST_SUITE_END |
( |
| ) |
|
◆ setUp()
void PointLocatorTest::setUp |
( |
| ) |
|
|
inline |
◆ tearDown()
void PointLocatorTest::tearDown |
( |
| ) |
|
|
inline |
◆ testLocator()
void PointLocatorTest::testLocator |
( |
const ElemType |
elem_type | ) |
|
|
inline |
Definition at line 39 of file point_locator_test.C.
43 const unsigned int n_elem_per_side = 5;
44 const std::unique_ptr<Elem> test_elem = Elem::build(elem_type);
45 const unsigned int ymax = test_elem->dim() > 1;
46 const unsigned int zmax = test_elem->dim() > 2;
47 const unsigned int ny = ymax * n_elem_per_side;
48 const unsigned int nz = zmax * n_elem_per_side;
62 locator->enable_out_of_mesh_mode();
64 for (
unsigned int i=0; i != n_elem_per_side+1; ++i)
66 for (
unsigned int j=0; j != ny+1; ++j)
68 for (
unsigned int k=0; k != nz+1; ++k)
71 Point p(i*h, j*h, k*h);
73 const Elem *elem = locator->operator()(p);
75 bool found_elem = elem;
79 CPPUNIT_ASSERT(found_elem);
85 const Node *node = locator->locate_node(p);
87 bool found_node = node;
91 CPPUNIT_ASSERT(found_node);
95 LIBMESH_ASSERT_FP_EQUAL((*node)(0), i*h,
98 LIBMESH_ASSERT_FP_EQUAL((*node)(1), j*h,
101 LIBMESH_ASSERT_FP_EQUAL((*node)(2), k*h,
References libMesh::Elem::build(), libMesh::MeshTools::Generation::build_cube(), libMesh::ParallelObject::comm(), libMesh::Elem::contains_point(), libMesh::MeshBase::is_serial(), mesh, libMesh::Real, libMesh::MeshBase::sub_point_locator(), TestCommWorld, and libMesh::TOLERANCE.
◆ testLocatorOnEdge3()
void PointLocatorTest::testLocatorOnEdge3 |
( |
| ) |
|
|
inline |
◆ testLocatorOnHex27()
void PointLocatorTest::testLocatorOnHex27 |
( |
| ) |
|
|
inline |
◆ testLocatorOnQuad9()
void PointLocatorTest::testLocatorOnQuad9 |
( |
| ) |
|
|
inline |
◆ testLocatorOnTri6()
void PointLocatorTest::testLocatorOnTri6 |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: