https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Functions
MeshTraversingUtils Namespace Reference

Functions

bool elementSubdomainIdInList (const Elem *const elem, const std::vector< subdomain_id_type > &subdomain_id_list)
 Determines whether the given element's subdomain id is in the given subdomain_id_list.
 
bool normalsWithinTol (const Point &normal_1, const Point &normal_2, const Real tol)
 Determines whether two normal vectors are within normal_tol of each other.
 

Function Documentation

◆ elementSubdomainIdInList()

bool MeshTraversingUtils::elementSubdomainIdInList ( const Elem *const  elem,
const std::vector< subdomain_id_type > &  subdomain_id_list 
)
inline

Determines whether the given element's subdomain id is in the given subdomain_id_list.

Parameters
elempointer to the element to consider
subdomain_id_listvector of subdomains to consider

Definition at line 23 of file MeshTraversingUtils.h.

25{
26 return std::find(subdomain_id_list.begin(), subdomain_id_list.end(), elem->subdomain_id()) !=
27 subdomain_id_list.end();
28}

Referenced by SurfaceMeshGeneratorBase::elementSatisfiesRequirements(), SideSetsGeneratorBase::elemSideSatisfiesRequirements(), SideSetsGeneratorBase::flood(), SurfaceMeshGeneratorBase::flood(), ParsedGenerateSideset::generate(), SideSetsAroundSubdomainGenerator::generate(), and SideSetsBetweenSubdomainsGenerator::generate().

◆ normalsWithinTol()

bool MeshTraversingUtils::normalsWithinTol ( const Point &  normal_1,
const Point &  normal_2,
const Real  tol 
)
inline

Determines whether two normal vectors are within normal_tol of each other.

Parameters
normal_1The first normal vector to compare to normal_2.
normal_2The second normal vector to compare to normal_1.
tolThe comparison tolerance.
Returns
A bool indicating whether 1 - dot(normal_1, normal_2) <= tol.

Definition at line 38 of file MeshTraversingUtils.h.

39{
40 return (1.0 - normal_1 * normal_2) <= tol;
41}

Referenced by SurfaceMeshGeneratorBase::elementSatisfiesRequirements(), SideSetsGeneratorBase::elemSideSatisfiesRequirements(), SideSetsFromAllNormalsGenerator::generate(), SideSetsFromNormalsGenerator::generate(), and SideSetsFromPointsGenerator::generate().