OGS
MeshNodeSearcher.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <memory>
14#include <vector>
15
17#include "GeoLib/Grid.h"
21
22// forward declaration
23namespace GeoLib
24{
25struct GeoObject;
26class Point;
27class Polyline;
28class Surface;
29}
30
31namespace MeshLib
32{
33class Mesh;
34class Node;
35}
36
37namespace MeshGeoToolsLib
38{
39class MeshNodesOnPoint;
40class MeshNodesAlongPolyline;
41class MeshNodesAlongSurface;
42}
43
44namespace MeshGeoToolsLib
45{
46
53{
54public:
65 std::unique_ptr<MeshGeoToolsLib::SearchLength>&&
66 search_length_algorithm,
67 SearchAllNodes search_all_nodes);
68
69 virtual ~MeshNodeSearcher();
70
76 std::vector<std::size_t> getMeshNodeIDs(
77 GeoLib::GeoObject const& geoObj) const;
78
84 std::vector<std::size_t> getMeshNodeIDs(
85 std::vector<MathLib::Point3dWithID*> const& points) const;
86
92 static MeshNodeSearcher const&
94 std::unique_ptr<MeshGeoToolsLib::SearchLength>&&
95 search_length_algorithm);
96
97private:
100 std::unique_ptr<MeshGeoToolsLib::SearchLength> _search_length_algorithm;
102 // with newer compiler we can omit to use a pointer here
103 mutable std::vector<MeshNodesOnPoint*> _mesh_nodes_on_points;
104 mutable std::vector<MeshNodesAlongPolyline*> _mesh_nodes_along_polylines;
105 mutable std::vector<MeshNodesAlongSurface*> _mesh_nodes_along_surfaces;
106
108 static std::vector<std::unique_ptr<MeshNodeSearcher>> _mesh_node_searchers;
109};
110
111} // end namespace MeshGeoToolsLib
#define OGS_NO_DANGLING
Definition of the Grid class.
Definition of the Point3d class.
Base class for different search length strategies.
std::vector< MeshNodesOnPoint * > _mesh_nodes_on_points
std::vector< std::size_t > getMeshNodeIDs(GeoLib::GeoObject const &geoObj) const
GeoLib::Grid< MeshLib::Node > _mesh_grid
static std::vector< std::unique_ptr< MeshNodeSearcher > > _mesh_node_searchers
Mesh node searcher for the meshes indexed by the meshs' ids.
std::unique_ptr< MeshGeoToolsLib::SearchLength > _search_length_algorithm
std::vector< MeshNodesAlongSurface * > _mesh_nodes_along_surfaces
static OGS_NO_DANGLING MeshNodeSearcher const & getMeshNodeSearcher(MeshLib::Mesh const &mesh, std::unique_ptr< MeshGeoToolsLib::SearchLength > &&search_length_algorithm)
std::vector< MeshNodesAlongPolyline * > _mesh_nodes_along_polylines
MeshNodeSearcher(MeshLib::Mesh const &mesh, std::unique_ptr< MeshGeoToolsLib::SearchLength > &&search_length_algorithm, SearchAllNodes search_all_nodes)
TemplateElement< PointRule1 > Point
Definition Point.h:20