13#include "libmesh/elem.h"
14#include "libmesh/string_to_enum.h"
22 params.
addClassDescription(
"Determines whether a point is inside a closed surface mesh provided "
23 "by a BoundaryMeshBuilder.");
26 "builder",
"The BoundaryMeshBuilder providing the surface mesh and boundary elements.");
48 "fixed_x_ray (the TriangleManifold engine) supports only 3D TRI3 surface meshes. "
49 "For a 2D (EDGE2) surface use pca_ray, or user_selected_ray with "
50 "ray_direction = '1 0 0'.");
55 for (
const auto * elem :
_builder.
mesh().active_element_ptr_range())
56 if (elem->type() != TRI3)
58 "fixed_x_ray (the TriangleManifold engine) supports only TRI3 surface elements, "
59 "but the surface mesh contains ",
61 ". Use pca_ray or user_selected_ray instead.");
70 _classifier = std::make_unique<PointContainmentClassifier>(
registerMooseObject("MooseApp", PointInPolyhedronCheckUO)
Owns a saved boundary (surface) mesh and the SurfaceElementSet wrapping it.
MeshBase & mesh() const
The owned boundary mesh.
const SurfaceElementSet & surfaceElementSet() const
The whole-mesh SurfaceElementSet, built lazily on first call.
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 ...
@ FIXED_X_RAY
TriangleManifold engine (fixed +x ray parity + solid-angle fallback).
Common base class providing shared parameters and validation for point-containment user objects.
const PointContainmentClassifier::Method _method
Selected point-containment backend.
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.
Determines whether a point is inside a single closed surface mesh provided by a BoundaryMeshBuilder.
std::unique_ptr< PointContainmentClassifier > _classifier
The selected point-containment backend, built in initialSetup().
static InputParameters validParams()
const BoundaryMeshBuilder & _builder
Builder that owns the surface mesh and SurfaceElementSet.
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
PointInPolyhedronCheckUO(const InputParameters ¶meters)
A group of surface elements wrapped for point-containment / distance queries.
std::string enum_to_string(const T e)