18 if (method ==
"pca_ray")
20 if (method ==
"user_selected_ray")
30 params.
addClassDescription(
"Base class for user objects that determine whether a point is inside "
31 "a closed surface mesh.");
33 MooseEnum methods(
"pca_ray user_selected_ray fixed_x_ray",
"pca_ray");
35 "point_containment_method",
37 "Algorithm used for point-containment queries. 'pca_ray' (default) uses the ray-casting "
38 "engine with a PCA-selected ray; 'user_selected_ray' uses the ray-casting engine with the "
39 "'ray_direction' parameter; 'fixed_x_ray' uses the TriangleManifold engine (fixed +x ray, "
40 "TRI3 surfaces only).");
45 "Ray direction for the 'user_selected_ray' method, used exactly as given (no "
46 "auto-selection). Any finite non-zero direction is allowed, including oblique; for a 2D "
47 "surface it must lie in the mesh plane (zero z component). The user is responsible for "
48 "avoiding directions that graze vertices/edges or are tangent to the surface. Other "
49 "methods ignore this parameter.");
53 "Tolerance used for intersection or surface-proximity checks. Determines "
54 "whether a point is considered on the surface.");
57 "leaf_max_size", 10,
"Maximum number of elements in a leaf node of the KD-tree.");
59 params.
addParam<FileName>(
"obb_file_name",
"",
"Oriented Bounding Box (OBB) debug file name.");
60 params.
addParam<FileName>(
"ray_file_name",
"",
"Ray debug file name.");
67 _method(methodFromEnum(getParam<
MooseEnum>(
"point_containment_method"))),
68 _ray_direction(getParam<Point>(
"ray_direction")),
69 _tolerance(getParam<Real>(
"tolerance")),
70 _leaf_max_size(getParam<
int>(
"leaf_max_size")),
71 _obb_file_name(getParam<FileName>(
"obb_file_name")),
72 _ray_file_name(getParam<FileName>(
"ray_file_name"))
75 paramError(
"leaf_max_size",
"must be greater than zero.");
77 paramError(
"tolerance",
"must be greater than zero.");
79 const bool ray_direction_set = !
_ray_direction.absolute_fuzzy_equals(Point(0.0, 0.0, 0.0));
85 "must be set to a non-zero vector when point_containment_method = user_selected_ray.");
87 paramError(
"ray_direction",
"is only used by point_containment_method = user_selected_ray.");
92 mooseInfo(
"point_containment_method = fixed_x_ray does not produce OBB/ray debug files; "
93 "obb_file_name/ray_file_name will be ignored.");
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
void ErrorVector unsigned int
static InputParameters validParams()
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
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).
PointInPolyhedronBaseUO(const InputParameters ¶meters)
const Point _ray_direction
User-supplied ray direction (used only by user_selected_ray).
const PointContainmentClassifier::Method _method
Selected point-containment backend.
const FileName _obb_file_name
Oriented Bounding Box (OBB) debug file name (ray backends only).
const FileName _ray_file_name
Ray debug file name (ray backends only).
static InputParameters validParams()
PointContainmentClassifier::RayOptions pcaRayOptions() const
Assemble the ray-backend tuning/debug options from the shared parameters.
const Real _tolerance
eps / surface tolerance for on-surface and intersection checks.
const int _leaf_max_size
Maximum number of elements in a leaf node of the KD-tree (ray backends).
const Parallel::Communicator & comm() const
static constexpr Real TOLERANCE
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