OGS
ProcessLib::LIE::anonymous_namespace{MeshUtils.cpp}::IsCrackTip Class Reference

Detailed Description

Definition at line 28 of file MeshUtils.cpp.

Collaboration diagram for ProcessLib::LIE::anonymous_namespace{MeshUtils.cpp}::IsCrackTip:
[legend]

Public Member Functions

 IsCrackTip (MeshLib::Mesh const &mesh)
 
bool operator() (MeshLib::Node const &node) const
 

Private Attributes

MeshLib::Mesh const & _mesh
 
unsigned const _fracture_element_dim
 
std::vector< bool > _is_internal_node
 

Constructor & Destructor Documentation

◆ IsCrackTip()

ProcessLib::LIE::anonymous_namespace{MeshUtils.cpp}::IsCrackTip::IsCrackTip ( MeshLib::Mesh const & mesh)
inlineexplicit

Definition at line 31 of file MeshUtils.cpp.

33 {
35
36 MeshLib::NodeSearch nodeSearch(mesh);
37 nodeSearch.searchBoundaryNodes();
38 for (auto i : nodeSearch.getSearchedNodeIDs())
39 {
40 _is_internal_node[i] = false;
41 }
42 }
unsigned getDimension() const
Returns the dimension of the mesh (determined by the maximum dimension over all elements).
Definition Mesh.h:88
std::size_t getNumberOfNodes() const
Get the number of nodes.
Definition Mesh.h:100
Node search class.
Definition NodeSearch.h:25

References MeshLib::NodeSearch::searchBoundaryNodes().

Member Function Documentation

◆ operator()()

bool ProcessLib::LIE::anonymous_namespace{MeshUtils.cpp}::IsCrackTip::operator() ( MeshLib::Node const & node) const
inline

Definition at line 44 of file MeshUtils.cpp.

45 {
46 if (!_is_internal_node[node.getID()] ||
48 {
49 return false;
50 }
51
52 auto const elements_connected_to_node =
54 auto const n_connected_fracture_elements =
55 count_if(cbegin(elements_connected_to_node),
56 cend(elements_connected_to_node),
57 [&](auto* const e)
58 { return e->getDimension() == _fracture_element_dim; });
59 assert(n_connected_fracture_elements > 0);
60
61 return (n_connected_fracture_elements == 1);
62 }
std::vector< Element const * > const & getElementsConnectedToNode(std::size_t node_id) const
Definition Mesh.cpp:256
bool isBaseNode(Node const &node, std::vector< Element const * > const &elements_connected_to_node)
Definition Mesh.cpp:346

References MathLib::Point3dWithID::getID().

Member Data Documentation

◆ _fracture_element_dim

unsigned const ProcessLib::LIE::anonymous_namespace{MeshUtils.cpp}::IsCrackTip::_fracture_element_dim
private

Definition at line 66 of file MeshUtils.cpp.

◆ _is_internal_node

std::vector<bool> ProcessLib::LIE::anonymous_namespace{MeshUtils.cpp}::IsCrackTip::_is_internal_node
private

Definition at line 67 of file MeshUtils.cpp.

◆ _mesh

MeshLib::Mesh const& ProcessLib::LIE::anonymous_namespace{MeshUtils.cpp}::IsCrackTip::_mesh
private

Definition at line 65 of file MeshUtils.cpp.


The documentation for this class was generated from the following file: