40 _use_close_to_point_tol (false),
69 return libmesh_make_unique<PointLocatorTree>(
mesh, master);
78 libmesh_error_msg(
"ERROR: Bad PointLocatorType = " << t);
105 const std::set<subdomain_id_type> * allowed_subdomains,
108 std::set<const Elem *> candidate_elements;
109 this->
operator()(p, candidate_elements, allowed_subdomains);
111 for (
const auto & elem : candidate_elements)
113 const int elem_n_nodes = elem->n_nodes();
114 const Real hmax = elem->hmax();
115 const Real dist_tol_sq = (tol * hmax) * (tol * hmax);
117 for (
int n=0; n != elem_n_nodes; ++n)
118 if ((elem->point(n) - p).
norm_sq() < dist_tol_sq)
119 return elem->node_ptr(n);
virtual ~PointLocatorBase()
A geometric point in (x,y,z) space associated with a DOF.
virtual void set_close_to_point_tol(Real close_to_point_tol)
bool _use_close_to_point_tol
static const Real TOLERANCE
virtual const Node * locate_node(const Point &p, const std::set< subdomain_id_type > *allowed_subdomains=nullptr, Real tol=TOLERANCE) const
PointLocatorBase(const MeshBase &mesh, const PointLocatorBase *master)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual const Elem * operator()(const Point &p, const std::set< subdomain_id_type > *allowed_subdomains=nullptr) const =0
virtual void unset_close_to_point_tol()
static std::unique_ptr< PointLocatorBase > build(PointLocatorType t, const MeshBase &mesh, const PointLocatorBase *master=nullptr)
A geometric point in (x,y,z) space.
const MeshBase & get_mesh() const