21 params.
addClassDescription(
"Assign subdomain ID based on geometric inclusion using per-subdomain "
22 "in-out checks provided by a subdomain_id_tester.");
25 "subdomain_id_tester",
26 "The UserObject (PointInSubdomainCheckUO) for subdomain in/out tests.");
42 mooseError(
"SubdomainElementModifier: _current_elem is null!");
45 if (all_checkers.empty())
46 mooseError(
"SubdomainElementModifier: subdomain checker collection is empty!");
49 std::vector<SBMUtils::SubdomainOccupancy> candidate_occupancies;
50 candidate_occupancies.reserve(all_checkers.size());
51 for (
const auto & [subdomain_id, checker_ptr] : all_checkers)
53 const auto *
const checker = checker_ptr.get();
54 const auto is_in_domain = [checker](
const Point & point)
55 {
return checker->sideness(point) != SurfaceGeometry::SurfaceSide::OUTSIDE; };
56 candidate_occupancies.push_back(
subdomain_id_type SubdomainID
registerMooseObject("ShiftedBoundaryMethodApp", SubdomainElementModifier)
const Elem *const & _current_elem
void mooseError(Args &&... args) const
Performs in-out testing and identifies the subdomain containing a point.
const std::map< subdomain_id_type, std::unique_ptr< const PointContainmentClassifier > > & subdomainCheckers() const
Read-only view of the per-subdomain checkers (subdomain id -> checker).
const SBMUtils::InterceptedSubdomainPolicy _intercepted_subdomain_policy
Policy for assigning partial elements to a dedicated intercepted subdomain.
const Order _qrule_order
Quadrature order used to estimate the retained-domain fraction.
const Real _lambda
Threshold applied to the fraction outside the retained domain for a partial element.
Common partial-element classification parameters for shifted boundary element modifiers.
static InputParameters validParams()
Modifies element subdomains dynamically based on point-in-subdomain geometric checks provided by Poin...
SubdomainElementModifier(const InputParameters ¶meters)
const PointInSubdomainCheckUO & _subdomain_id_tester
The user object containing subdomain-wise in/out checkers.
virtual SubdomainID computeSubdomainID() override
static InputParameters validParams()
const SubdomainID INVALID_BLOCK_ID
std::optional< SubdomainID > selectSubdomainFromOccupancies(const std::vector< SubdomainOccupancy > &candidate_occupancies, const InterceptedSubdomainPolicy &intercepted_policy, Real lambda)
Select a subdomain based on how multiple candidate domains occupy an element.
ElementDomainOccupancy elementDomainOccupancy(const Elem &elem, Order qrule_order, const std::function< bool(const libMesh::Point &)> &is_in_domain)
Test an element against the domain defined by is_in_domain.