23 mooseError(
"PointContainmentClassifier: user_selected_ray requires explicit RayOptions.");
52 "PointContainmentClassifier: a SurfaceElementSet is required for the pca_ray and "
53 "user_selected_ray methods.");
59 _pca = std::make_unique<AdaptiveRayContainmentCheck>(set->
elements(),
69 _num_elements = set->
size();
75 _tri = std::make_unique<TriangleManifold>(mesh, tolerance);
76 _bounding_box = _tri->boundingBox();
77 _num_elements = _tri->numTriangles();
89 return _tri->sideness(point);
91 mooseAssert(
_pca,
"PointContainmentClassifier: no backend was constructed.");
92 return _pca->sideness(point);
99 mooseError(
"PointContainmentClassifier::rayDirection() is only defined for the pca_ray and "
100 "user_selected_ray methods; the fixed_x_ray method has no ray-casting backend.");
101 return _pca->rayDirection();
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Unified wrapper (facade) over the point-containment backends.
~PointContainmentClassifier()
SurfaceGeometry::SurfaceSide sideness(const Point &point) const
Classify a query point relative to the closed surface.
Point rayDirection() const
The resolved ray direction of the ray-casting backend (user-selected direction for USER_SELECTED_RAY,...
PointContainmentClassifier(libMesh::MeshBase &mesh, const SurfaceElementSet *set, Method method, Real tolerance)
Builds PCA_RAY with default ray options or FIXED_X_RAY without unused options.
std::unique_ptr< TriangleManifold > _tri
FIXED_X_RAY.
std::unique_ptr< AdaptiveRayContainmentCheck > _pca
One of the two backends is constructed; the other stays null.
Method
Backend algorithm used for point-containment queries.
@ USER_SELECTED_RAY
AdaptiveRayContainmentCheck with a user-supplied ray_direction, used exactly as given (no PCA,...
@ FIXED_X_RAY
TriangleManifold engine (fixed +x ray parity + solid-angle fallback).
@ PCA_RAY
AdaptiveRayContainmentCheck with a PCA-selected ray (default SBM behavior).
A group of surface elements wrapped for point-containment / distance queries.
const libMesh::BoundingBox & boundingBox() const
Global AABB of the group (plain union of element loose bounding boxes).
std::size_t size() const
Number of surface elements in the group.
const std::vector< Point > & centroids() const
Per-element centroids (vertex averages), aligned index-for-index with elements().
const std::vector< std::unique_ptr< SurfaceElement > > & elements() const
Owned surface-element wrappers, one per input element (input order preserved).
@ USER_SPECIFIED
The engine uses the caller-supplied direction exactly, with no auto-selection.
@ AUTO_PCA
The engine auto-selects a robust direction via PCA (may use a fallback).
SurfaceSide
The side of a closed surface where a query point is located.
Ray-backend tuning + debug output; ignored by FIXED_X_RAY (TriangleManifold).
Point ray_direction
Direction used by USER_SELECTED_RAY; ignored by PCA_RAY.
const libMesh::Parallel::Communicator * comm
Ray-direction intent for AdaptiveRayContainmentCheck: an explicit mode plus the direction to use when...