1 #include <libmesh/mesh.h> 
    2 #include <libmesh/mesh_generation.h> 
    3 #include <libmesh/elem.h> 
    4 #include <libmesh/node.h> 
    5 #include <libmesh/parallel.h> 
   19   CPPUNIT_TEST( testLocatorOnEdge3 );
 
   21   CPPUNIT_TEST( testLocatorOnQuad9 );
 
   22   CPPUNIT_TEST( testLocatorOnTri6 );
 
   25   CPPUNIT_TEST( testLocatorOnHex27 );
 
   28   CPPUNIT_TEST_SUITE_END();
 
   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,