99 std::vector<subdomain_id_type> matches;
103 if (side == SurfaceGeometry::SurfaceSide::INSIDE || side == SurfaceGeometry::SurfaceSide::ON)
104 matches.push_back(subdomain_id);
108 return libMesh::Elem::invalid_subdomain_id;
110 if (matches.size() > 1)
112 std::ostringstream ids;
113 for (
const auto i : index_range(matches))
114 ids << (i ?
", " :
"") << matches[i];
117 " is contained in multiple subdomains (",
119 "); the geometry is ambiguous for a single-subdomain query.");
122 return matches.front();
registerMooseObject("ShiftedBoundaryMethodApp", PointInSubdomainCheckUO)
Performs in-out testing and identifies the subdomain containing a point.
const SurfaceMeshBySubdomainBuilder & _builder
Builder providing subdomain-wise SurfaceElementSets.
virtual void initialSetup() override
std::map< subdomain_id_type, std::unique_ptr< const PointContainmentClassifier > > _subdomain_id_checkers
Each subdomain has its own PointContainmentClassifier (owns the checkers).
virtual subdomain_id_type whichSubdomain(const Point &p) const
Determine which subdomain the point belongs to (returns "OUTSIDE" if none)
static InputParameters validParams()
virtual bool ifInside(const Point &p) const
Check if the point is inside any subdomain.
PointInSubdomainCheckUO(const InputParameters ¶meters)
BoundaryMeshBuilder specialization that groups the surface elements by subdomain, building one Surfac...
const std::unordered_map< subdomain_id_type, SurfaceElementSet > & getSurfaceElementSetsBySubdomain() const
Per-subdomain SurfaceElementSets. Valid after initialSetup().