21 "builder",
"SBMSurfaceMeshBuilder that provides KDTree, elem_id_map, and boundary elements.");
24 "Returns unsigned distance to a surface mesh using KDTree nearest neighbor search. " 25 "The gradient returns the unit vector pointing from boundary to query point.");
37 const auto builder = &getUserObject<SBMSurfaceMeshBuilder>(
"builder");
39 if (!builder->hasKDTree())
42 "' requires SBMSurfaceMeshBuilder '",
44 "' to be configured with 'build_kd_tree = true'.");
54 std::vector<std::size_t> ret_index(1);
virtual void initialSetup() override
Computes the unsigned distance to a surface mesh using KDTree nearest neighbor lookup from SBMSurface...
static constexpr Real TOLERANCE
RealGradient gradient(Real t, const Point &p) const override
Return the spatial gradient of the unsigned distance function.
const std::vector< std::unique_ptr< SBMBndElementBase > > * _boundary_elements
static InputParameters validParams()
Real value(Real t, const Point &p) const override
Return unsigned distance value.
const std::string & name() const
Base class for SBM boundary elements.
registerMooseObject("ShiftedBoundaryMethodApp", UnsignedDistanceToSurfaceMesh)
void neighborSearch(const Point &query_point, unsigned int patch_size, std::vector< std::size_t > &return_index)
KDTree * _kd_tree
Cached pointers for speed.
const Point & normal() const
Getter for the normal vector.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Point distanceFrom(const Point &pt) const
Compute the distance vector from an arbitrary point to this boundary element.
const SBMBndElementBase & closestBoundaryElem(const Point &p) const
find closest boundary element using KDTree
void mooseError(Args &&... args) const
UnsignedDistanceToSurfaceMesh(const InputParameters ¶meters)
RealVectorValue distanceVectorToSurface(const Point &p) const
find closest boundary element and return its distance vector
static InputParameters validParams()
RealVectorValue surfaceNormal(const Point &p) const
Return the true boundary surface normal evaluated at the closest point obtained by projecting the que...