Classes | |
| struct | ClassificationSubdomains |
| The subdomain IDs a (possibly partial) element can be labeled with. More... | |
| struct | ElementDomainOccupancy |
| Results of testing an element against a domain. More... | |
| struct | InterceptedSubdomainPolicy |
| Policy for assigning partial elements to a dedicated intercepted subdomain. More... | |
| struct | SubdomainOccupancy |
| A candidate subdomain and its occupancy of an element. More... | |
Functions | |
| libMesh::Point | distanceFrom (const SurfaceElement &surface_elem, const libMesh::Point &pt) |
| Returns the vector from pt to the nearest point on the surface element: the normal projection if it falls inside the element, otherwise the nearest edge or vertex. | |
| bool | checkWatertightnessFromRawElems (const std::vector< const Elem * > &bd_elements) |
| Real | activeElementFraction (const Elem &elem, Order qrule_order, const std::function< bool(const libMesh::Point &)> &is_active) |
| Compute the fraction of an element's quadrature-weighted measure satisfying a predicate. | |
| bool | isInactive (Real active_fraction, Real lambda) |
| Return whether a partial element is inactive, i.e. | |
| 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. | |
| ElementDomainOccupancy | elementDomainOccupancy (const Elem &elem, Order qrule_order, const std::function< bool(const libMesh::Point &)> &is_in_domain, const std::function< bool(const libMesh::Point &)> &is_outside_domain) |
| As above, but use is_outside_domain to test nodes separately. | |
| 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. | |
| SubdomainID | classifySubdomainFromOccupancy (const ElementDomainOccupancy &occupancy, const ClassificationSubdomains &subdomain_id_settings, bool mark_intercepted, Real lambda) |
| Classify an element from its retained-domain occupancy measurements. | |
| std::vector< const Function * > | buildDistanceFunctions (const std::vector< FunctionName > &function_names, const FunctionInterface &function_provider) |
| Build a list of distance functions based on names specified in input. | |
| RealVectorValue | distanceVectorFromFunction (const Function *func, const libMesh::Point &pt, Real t) |
| Compute the distance vector induced by a distance function. | |
| RealVectorValue | trueNormalFromFunction (const Function *func, const libMesh::Point &pt, Real t) |
| Compute the true boundary surface normal at the point on the boundary closest to pt. | |
| RealVectorValue | closestDistanceVector (const std::vector< const Function * > &funcs, const libMesh::Point &pt, Real t) |
| Scan all distance functions and return the closest distance vector. | |
| RealVectorValue | closestTrueNormalVector (const std::vector< const Function * > &funcs, const libMesh::Point &pt, Real t) |
| Scan all distance functions and return the corresponding normal vector. | |
| Real | unionSignedDistance (const std::vector< const Function * > &funcs, Real t, const Point &p) |
| Computes the union signed distance by taking the minimum of all signed distance functions. | |
| Point | distanceFrom (const SurfaceElement &surface_elem, const Point &pt) |
| Real SBMUtils::activeElementFraction | ( | const Elem & | elem, |
| Order | qrule_order, | ||
| const std::function< bool(const libMesh::Point &)> & | is_active | ||
| ) |
Compute the fraction of an element's quadrature-weighted measure satisfying a predicate.
Definition at line 26 of file SBMUtils.C.
Referenced by elementDomainOccupancy(), and TEST().
| std::vector< const Function * > SBMUtils::buildDistanceFunctions | ( | const std::vector< FunctionName > & | function_names, |
| const FunctionInterface & | function_provider | ||
| ) |
Build a list of distance functions based on names specified in input.
Definition at line 172 of file SBMUtils.C.
Referenced by BoundaryShortestDistanceToSurface::BoundaryShortestDistanceToSurface(), and ShortestDistanceToSurface::ShortestDistanceToSurface().
| bool SBMUtils::checkWatertightnessFromRawElems | ( | const std::vector< const Elem * > & | bd_elements | ) |
| SubdomainID SBMUtils::classifySubdomainFromOccupancy | ( | const ElementDomainOccupancy & | occupancy, |
| const ClassificationSubdomains & | subdomain_id_settings, | ||
| bool | mark_intercepted, | ||
| Real | lambda | ||
| ) |
Classify an element from its retained-domain occupancy measurements.
An element whose nodes and measure are entirely in the domain is inside; one whose nodes and measure are entirely outside the domain is outside. A remaining (partial) element is assigned the intercepted subdomain when mark_intercepted is true, and otherwise is resolved by the lambda threshold (see isInactive).
Definition at line 138 of file SBMUtils.C.
Referenced by InterceptedElementModifier::computeSubdomainID(), and SubdomainInterceptedGenerator::generate().
| RealVectorValue SBMUtils::closestDistanceVector | ( | const std::vector< const Function * > & | funcs, |
| const libMesh::Point & | pt, | ||
| Real | t | ||
| ) |
Scan all distance functions and return the closest distance vector.
Definition at line 240 of file SBMUtils.C.
Referenced by ShortestDistanceToSurface::distanceVector(), and TEST_F().
| RealVectorValue SBMUtils::closestTrueNormalVector | ( | const std::vector< const Function * > & | funcs, |
| const libMesh::Point & | pt, | ||
| Real | t | ||
| ) |
Scan all distance functions and return the corresponding normal vector.
Definition at line 262 of file SBMUtils.C.
Referenced by TEST_F(), and ShortestDistanceToSurface::trueNormal().
| libMesh::Point SBMUtils::distanceFrom | ( | const SurfaceElement & | surface_elem, |
| const libMesh::Point & | pt | ||
| ) |
Returns the vector from pt to the nearest point on the surface element: the normal projection if it falls inside the element, otherwise the nearest edge or vertex.
Precondition (mooseAssert in debug builds): the element's sides are EDGE2 or NODEELEM (the only side types this routine handles).
Referenced by UnsignedDistanceToSurfaceMesh::distanceVectorToSurface(), SBMInterfaceManager::queryInterface(), TEST(), TEST(), TEST(), TEST(), and TEST().
| Point SBMUtils::distanceFrom | ( | const SurfaceElement & | surface_elem, |
| const Point & | pt | ||
| ) |
Definition at line 23 of file SBMSurfaceDistance.C.
| RealVectorValue SBMUtils::distanceVectorFromFunction | ( | const Function * | func, |
| const libMesh::Point & | pt, | ||
| Real | t | ||
| ) |
Compute the distance vector induced by a distance function.
The provided function must represent a distance to the true boundary: either a signed distance function (ParsedFunction) or an unsigned distance function provided by UnsignedDistanceToSurfaceMesh.
Definition at line 197 of file SBMUtils.C.
Referenced by closestDistanceVector(), closestTrueNormalVector(), ShortestDistanceToSurface::distanceVectorByFunc(), ShortestDistanceToSurface::distanceVectorByIndex(), BoundaryShortestDistanceToSurface::execute(), TEST_F(), TEST_F(), and trueNormalFromFunction().
| ElementDomainOccupancy SBMUtils::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.
The result says whether all nodes are in or out of the domain and estimates the fraction of the element inside it using quadrature points. is_in_domain decides if a point belongs to the domain.
Definition at line 51 of file SBMUtils.C.
Referenced by InterceptedElementModifier::computeSubdomainID(), SubdomainElementModifier::computeSubdomainID(), elementDomainOccupancy(), SubdomainGrainIDGenerator::generate(), SubdomainInterceptedGenerator::generate(), TEST(), and TEST().
| ElementDomainOccupancy SBMUtils::elementDomainOccupancy | ( | const Elem & | elem, |
| Order | qrule_order, | ||
| const std::function< bool(const libMesh::Point &)> & | is_in_domain, | ||
| const std::function< bool(const libMesh::Point &)> & | is_outside_domain | ||
| ) |
As above, but use is_outside_domain to test nodes separately.
This allows boundary nodes to be neither inside nor outside the domain.
Definition at line 61 of file SBMUtils.C.
| bool SBMUtils::isInactive | ( | Real | active_fraction, |
| Real | lambda | ||
| ) |
Return whether a partial element is inactive, i.e.
its inactive fraction exceeds lambda.
The endpoint handling preserves the convention that lambda zero rejects and lambda one accepts a partially active element.
Definition at line 81 of file SBMUtils.C.
Referenced by classifySubdomainFromOccupancy(), selectSubdomainFromOccupancies(), and TEST().
| std::optional< SubdomainID > SBMUtils::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.
A fully occupied candidate takes precedence. Otherwise, the candidate with the largest domain fraction is selected, with fuzzy ties resolved by the lowest subdomain ID. A partial candidate is accepted according to the intercepted-subdomain policy and lambda.
| candidate_occupancies | Candidate subdomain IDs and their measured element occupancies |
| intercepted_policy | Whether partial elements receive a dedicated subdomain ID, and that ID |
| lambda | Maximum fraction outside the selected domain for accepting a partial element |
Definition at line 92 of file SBMUtils.C.
Referenced by SubdomainElementModifier::computeSubdomainID(), SubdomainGrainIDGenerator::generate(), TEST(), TEST(), and TEST().
| RealVectorValue SBMUtils::trueNormalFromFunction | ( | const Function * | func, |
| const libMesh::Point & | pt, | ||
| Real | t | ||
| ) |
Compute the true boundary surface normal at the point on the boundary closest to pt.
Definition at line 217 of file SBMUtils.C.
Referenced by closestTrueNormalVector(), BoundaryShortestDistanceToSurface::execute(), TEST_F(), ShortestDistanceToSurface::trueNormalByFunc(), and ShortestDistanceToSurface::trueNormalByIndex().
| Real SBMUtils::unionSignedDistance | ( | const std::vector< const Function * > & | funcs, |
| Real | t, | ||
| const Point & | p | ||
| ) |
Computes the union signed distance by taking the minimum of all signed distance functions.
This definition is valid for overlapping geometries and preserves the correct union boundary.
Definition at line 284 of file SBMUtils.C.
Referenced by TEST_F(), TEST_F(), and ShortestDistanceToSurface::value().