44 const unsigned int n_elem_per_side = 5;
45 const unsigned int dim = Elem::type_to_dim_map[elem_type];
46 const unsigned int ymax =
dim > 1;
47 const unsigned int zmax =
dim > 2;
48 const unsigned int ny = ymax * n_elem_per_side;
49 const unsigned int nz = zmax * n_elem_per_side;
63 locator->enable_out_of_mesh_mode();
65 for (
unsigned int i=0; i != n_elem_per_side+1; ++i)
67 for (
unsigned int j=0; j != ny+1; ++j)
69 for (
unsigned int k=0; k != nz+1; ++k)
72 Point p(i*h, j*h, k*h);
74 const Elem *elem = locator->operator()(p);
76 bool found_elem = elem;
80 CPPUNIT_ASSERT(found_elem);
86 const Node *node = locator->locate_node(p);
88 bool found_node = node;
92 CPPUNIT_ASSERT(found_node);
96 LIBMESH_ASSERT_FP_EQUAL(i*h, (*node)(0),
99 LIBMESH_ASSERT_FP_EQUAL(j*h, (*node)(1),
102 LIBMESH_ASSERT_FP_EQUAL(k*h, (*node)(2),
A Node is like a Point, but with more information.
std::unique_ptr< PointLocatorBase > sub_point_locator() const
libMesh::Parallel::Communicator * TestCommWorld
static constexpr Real TOLERANCE
This is the base class from which all geometric element types are derived.
const Parallel::Communicator & comm() const
virtual bool is_serial() const
virtual bool contains_point(const Point &p, Real tol=TOLERANCE) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void max(const T &r, T &o, Request &req) const
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
A Point defines a location in LIBMESH_DIM dimensional Real space.