OGS
MeshNodesOnPoint.cpp
Go to the documentation of this file.
1 
10 #include "MeshNodesOnPoint.h"
11 
12 #include "MeshLib/Mesh.h"
13 
14 namespace MeshGeoToolsLib
15 {
17  GeoLib::Grid<MeshLib::Node> const& mesh_grid,
18  GeoLib::Point const& pnt,
19  double epsilon_radius,
20  SearchAllNodes search_all_nodes)
21  : _mesh(mesh), _pnt(pnt)
22 {
23  std::vector<std::size_t> vec_ids(
24  mesh_grid.getPointsInEpsilonEnvironment(pnt, epsilon_radius));
25  if (search_all_nodes == SearchAllNodes::Yes)
26  {
27  _msh_node_ids = vec_ids;
28  }
29  else
30  {
31  for (auto id : vec_ids)
32  {
35  {
36  _msh_node_ids.push_back(id);
37  }
38  }
39  }
40 }
41 
42 } // end namespace MeshGeoToolsLib
Definition of the Mesh class.
std::vector< std::size_t > getPointsInEpsilonEnvironment(P const &pnt, double eps) const
Definition: Grid.h:678
MeshNodesOnPoint(MeshLib::Mesh const &mesh, GeoLib::Grid< MeshLib::Node > const &mesh_grid, GeoLib::Point const &pnt, double epsilon_radius, SearchAllNodes search_all_nodes)
std::vector< std::size_t > _msh_node_ids
std::vector< Element const * > const & getElementsConnectedToNode(std::size_t node_id) const
Definition: Mesh.cpp:232
const Node * getNode(std::size_t idx) const
Get the node with the given index.
Definition: Mesh.h:74
bool isBaseNode(Node const &node, std::vector< Element const * > const &elements_connected_to_node)
Definition: Mesh.cpp:370