https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PointInPolyhedronCheckUO.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
15
17
29{
30public:
33
34 virtual void initialSetup() override;
35
37 SurfaceGeometry::SurfaceSide sideness(const Point & p) const override
38 {
39 return _classifier->sideness(p);
40 }
41
43 Point rayDirection() const { return _classifier->rayDirection(); }
44
46 virtual Real spatialValue(const Point & p) const override { return contains(p) ? 1.0 : 0.0; }
47
48protected:
51
53 std::unique_ptr<PointContainmentClassifier> _classifier;
54};
Owns a saved boundary (surface) mesh and the SurfaceElementSet wrapping it.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Common base class providing shared parameters and validation for point-containment user objects.
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().
Point rayDirection() const
The resolved ray direction used by the ray-casting backend.
SurfaceGeometry::SurfaceSide sideness(const Point &p) const override
Classify a point against the surface.
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.
virtual Real spatialValue(const Point &p) const override
1 for INSIDE/ON, 0 for OUTSIDE – usable directly by SpatialUserObjectAux.
Mixin interface implemented by user objects that can classify a query point against a closed surface ...
bool contains(const libMesh::Point &p) const
Whether the point is inside or on the surface(s). ON maps to true.
SurfaceSide
The side of a closed surface where a query point is located.
Definition SurfaceSide.h:21