OGS
MeshNodesAlongSurface.cpp
Go to the documentation of this file.
1
14
15#include <algorithm>
16
17#include "BaseLib/quicksort.h"
18#include "GeoLib/Surface.h"
19#include "MathLib/MathTools.h"
20#include "MeshLib/Mesh.h"
21#include "MeshLib/Node.h"
22
23namespace MeshGeoToolsLib
24{
26 GeoLib::Surface const& sfc,
28 SearchAllNodes search_all_nodes)
29 : _mesh(mesh), _sfc(sfc)
30{
31 auto const& mesh_nodes = _mesh.getNodes();
32 const std::size_t n_nodes(search_all_nodes == SearchAllNodes::Yes
35 // loop over all nodes
36 for (std::size_t i = 0; i < n_nodes; i++)
37 {
38 auto const* const node = mesh_nodes[i];
40 {
41 continue;
42 }
44 {
45 _msh_node_ids.push_back(node->getID());
46 }
47 }
48}
49
51{
52 return _mesh;
53}
54
55std::vector<std::size_t> const& MeshNodesAlongSurface::getNodeIDs() const
56{
57 return _msh_node_ids;
58}
59
61{
62 return _sfc;
63}
64
65} // end namespace MeshGeoToolsLib
Definition of the Mesh class.
Definition of the Node class.
A Surface is represented by Triangles. It consists of a reference to a vector of (pointers to) points...
Definition Surface.h:33
bool isPntInBoundingVolume(MathLib::Point3d const &pnt, double eps) const
Definition Surface.cpp:93
bool isPntInSfc(MathLib::Point3d const &pnt, double eps) const
Definition Surface.cpp:99
std::vector< std::size_t > const & getNodeIDs() const
MeshLib::Mesh const & getMesh() const
return the mesh object
GeoLib::Surface const & getSurface() const
MeshNodesAlongSurface(MeshLib::Mesh const &mesh, GeoLib::Surface const &sfc, double epsilon_radius, SearchAllNodes search_all_nodes)
std::vector< Node * > const & getNodes() const
Get the nodes-vector for the mesh.
Definition Mesh.h:106
std::size_t computeNumberOfBaseNodes() const
Get the number of base nodes.
Definition Mesh.cpp:238
std::size_t getNumberOfNodes() const
Get the number of nodes.
Definition Mesh.h:100
Definition of the quicksort function.