21 "Functions defining the surfaces to measure distance to; each must be a ParsedFunction "
22 "level set or an UnsignedDistanceToSurfaceMesh.");
24 "signed_distance",
false,
"Whether the distance functions are signed or unsigned.");
26 "Computes the shortest distance vector and true normal to one or more surfaces defined by "
27 "parsed level-set functions and/or mesh-based distance functions.");
34 const auto function_names = getParam<std::vector<FunctionName>>(
"surfaces");
registerMooseObject("ShiftedBoundaryMethodApp", ShortestDistanceToSurface)
User object that computes the shortest distance to one or more surfaces defined by function- and/or m...
static InputParameters validParams()
RealVectorValue trueNormalByFunc(const Point &pt, Real t, const Function *func) const
Compute true normal using a specific distance function.
RealVectorValue distanceVector(const Point &pt) const
Return the closest distance vector from point pt to the boundaries.
RealVectorValue trueNormal(const Point &pt) const
Return the true normal vector at the closest point on the boundaries.
RealVectorValue distanceVectorByFunc(const Point &pt, Real t, const Function *func) const
Compute distance vector using a specific distance function.
RealVectorValue distanceVectorByIndex(unsigned int idx, const Point &pt) const
A distance vector from a point pt to a specific surface specified by index idx in the 'surfaces' para...
ShortestDistanceToSurface(const InputParameters ¶meters)
std::vector< const Function * > _distance_functions
Optional signed-distance function.
RealVectorValue trueNormalByIndex(unsigned int idx, const Point &pt) const
A true normal vector at the projected point of pt onto a specific surface specified by index idx in t...
virtual Real value(Real t, const Point &p) const
Returns the minimum distance from point pt to a collection of surfaces.
static InputParameters validParams()
Real unionSignedDistance(const std::vector< const Function * > &funcs, Real t, const Point &p)
Computes the union signed distance by taking the minimum of all signed distance functions.
RealVectorValue closestTrueNormalVector(const std::vector< const Function * > &funcs, const libMesh::Point &pt, Real t)
Scan all distance functions and return the corresponding normal vector.
std::vector< const Function * > buildDistanceFunctions(const std::vector< FunctionName > &function_names, const FunctionInterface &function_provider)
Build a list of distance functions based on names specified in input.
RealVectorValue distanceVectorFromFunction(const Function *func, const libMesh::Point &pt, Real t)
Compute the distance vector induced by a distance function.
RealVectorValue trueNormalFromFunction(const Function *func, const libMesh::Point &pt, Real t)
Compute the true boundary surface normal at the point on the boundary closest to pt.
RealVectorValue closestDistanceVector(const std::vector< const Function * > &funcs, const libMesh::Point &pt, Real t)
Scan all distance functions and return the closest distance vector.