https://mooseframework.inl.gov
Loading...
Searching...
No Matches
include
utils
MeshTraversingUtils.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
12
#include "libmesh/elem.h"
13
#include "libmesh/point.h"
14
15
namespace
MeshTraversingUtils
16
{
22
inline
bool
23
elementSubdomainIdInList
(
const
Elem *
const
elem,
24
const
std::vector<subdomain_id_type> & subdomain_id_list)
25
{
26
return
std::find(subdomain_id_list.begin(), subdomain_id_list.end(), elem->subdomain_id()) !=
27
subdomain_id_list.end();
28
}
29
37
inline
bool
38
normalsWithinTol
(
const
Point & normal_1,
const
Point & normal_2,
const
Real tol)
39
{
40
return
(1.0 - normal_1 * normal_2) <= tol;
41
}
42
}
MeshTraversingUtils
Definition
MeshTraversingUtils.h:16
MeshTraversingUtils::elementSubdomainIdInList
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.
Definition
MeshTraversingUtils.h:23
MeshTraversingUtils::normalsWithinTol
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.
Definition
MeshTraversingUtils.h:38
Generated on Fri Aug 21 2026 13:33:52 for https://mooseframework.inl.gov by
1.9.8