OGS
NodeSearch.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <vector>
14
15namespace MeshLib
16{
17
18// forward declarations
19class Mesh;
20class Element;
21class Node;
22
24class NodeSearch final
25{
26public:
27 explicit NodeSearch(const MeshLib::Mesh &mesh);
28
30 const std::vector<std::size_t>& getSearchedNodeIDs() const {return _marked_nodes; }
31
35 const std::vector<std::size_t>& elements);
36
38 std::size_t searchUnused();
39
41 std::size_t searchBoundaryNodes();
42
43private:
45 void updateUnion(const std::vector<std::size_t> &vec);
46
50 std::vector<std::size_t> _marked_nodes;
51};
52
54std::vector<Node*> getUniqueNodes(std::vector<Element*> const& elements);
55
56} // end namespace MeshLib
Node search class.
Definition NodeSearch.h:25
std::size_t searchNodesConnectedToOnlyGivenElements(const std::vector< std::size_t > &elements)
std::vector< std::size_t > _marked_nodes
The vector of element indices that should be removed.
Definition NodeSearch.h:50
const std::vector< std::size_t > & getSearchedNodeIDs() const
return marked node IDs
Definition NodeSearch.h:30
std::size_t searchBoundaryNodes()
Marks all boundary nodes.
const MeshLib::Mesh & _mesh
The mesh from which elements should be removed.
Definition NodeSearch.h:48
NodeSearch(const MeshLib::Mesh &mesh)
void updateUnion(const std::vector< std::size_t > &vec)
Updates the vector of marked items with values from vec.
std::size_t searchUnused()
Marks all unused nodes.
std::vector< Node * > getUniqueNodes(std::vector< Element * > const &elements)
Create a vector of unique nodes used by given elements.