OGS
|
Class for searching mesh node ids along polylines or points. This ids can be used to set boundary conditions, source terms, initial conditions or for outputting simulation results.
Definition at line 52 of file MeshNodeSearcher.h.
#include <MeshNodeSearcher.h>
Public Member Functions | |
MeshNodeSearcher (MeshLib::Mesh const &mesh, std::unique_ptr< MeshGeoToolsLib::SearchLength > &&search_length_algorithm, SearchAllNodes search_all_nodes) | |
virtual | ~MeshNodeSearcher () |
std::vector< std::size_t > | getMeshNodeIDs (GeoLib::GeoObject const &geoObj) const |
std::vector< std::size_t > | getMeshNodeIDs (std::vector< MathLib::Point3dWithID * > const &points) const |
Static Public Member Functions | |
static OGS_NO_DANGLING MeshNodeSearcher const & | getMeshNodeSearcher (MeshLib::Mesh const &mesh, std::unique_ptr< MeshGeoToolsLib::SearchLength > &&search_length_algorithm) |
Private Attributes | |
MeshLib::Mesh const & | _mesh |
GeoLib::Grid< MeshLib::Node > | _mesh_grid |
std::unique_ptr< MeshGeoToolsLib::SearchLength > | _search_length_algorithm |
SearchAllNodes | _search_all_nodes |
std::vector< MeshNodesOnPoint * > | _mesh_nodes_on_points |
std::vector< MeshNodesAlongPolyline * > | _mesh_nodes_along_polylines |
std::vector< MeshNodesAlongSurface * > | _mesh_nodes_along_surfaces |
Static Private Attributes | |
static std::vector< std::unique_ptr< MeshNodeSearcher > > | _mesh_node_searchers |
Mesh node searcher for the meshes indexed by the meshs' ids. | |
MeshGeoToolsLib::MeshNodeSearcher::MeshNodeSearcher | ( | MeshLib::Mesh const & | mesh, |
std::unique_ptr< MeshGeoToolsLib::SearchLength > && | search_length_algorithm, | ||
SearchAllNodes | search_all_nodes ) |
Constructor for objects of class MeshNodeSearcher. It calculates internally used search length from the given MeshLib::Mesh.
mesh | Run search algorithm on this mesh. It is assumed that the mesh does not change its geometry. |
search_length_algorithm | Algorithm to determine the search length. |
search_all_nodes | switch between searching all mesh nodes and searching the base nodes. |
Definition at line 34 of file MeshNodeSearcher.cpp.
References _mesh, _search_length_algorithm, DBUG(), and MeshLib::Mesh::getName().
|
virtual |
Definition at line 47 of file MeshNodeSearcher.cpp.
References _mesh_nodes_along_polylines, _mesh_nodes_along_surfaces, and _mesh_nodes_on_points.
std::vector< std::size_t > MeshGeoToolsLib::MeshNodeSearcher::getMeshNodeIDs | ( | GeoLib::GeoObject const & | geoObj | ) | const |
Searches for the nearest mesh nodes on the given geometric object (point, polyline, surface).
geoObj | a GeoLib::GeoObject where the nearest mesh node is searched for |
Definition at line 92 of file MeshNodeSearcher.cpp.
References _mesh, _mesh_grid, _mesh_nodes_along_polylines, _mesh_nodes_along_surfaces, _mesh_nodes_on_points, _search_all_nodes, _search_length_algorithm, GeoLib::GeoObject::getGeoType(), MeshGeoToolsLib::getMeshNodeIDs(), MeshGeoToolsLib::MeshNodesOnPoint::getPoint(), MeshGeoToolsLib::MeshNodesAlongPolyline::getPolyline(), MeshGeoToolsLib::MeshNodesAlongSurface::getSurface(), GeoLib::POINT, GeoLib::POLYLINE, and GeoLib::SURFACE.
Referenced by MeshGeoToolsLib::BoundaryElementsAlongPolyline::BoundaryElementsAlongPolyline(), MeshGeoToolsLib::BoundaryElementsAtPoint::BoundaryElementsAtPoint(), MeshGeoToolsLib::BoundaryElementsOnSurface::BoundaryElementsOnSurface(), anonymous_namespace{IdentifySubdomainMesh.cpp}::identifySubdomainMeshNodes(), and main().
std::vector< std::size_t > MeshGeoToolsLib::MeshNodeSearcher::getMeshNodeIDs | ( | std::vector< MathLib::Point3dWithID * > const & | points | ) | const |
Finds unique mesh nodes of each of the input points.
Definition at line 133 of file MeshNodeSearcher.cpp.
References _mesh, _mesh_grid, _search_length_algorithm, MeshLib::Mesh::getName(), MeshLib::Mesh::getNodes(), GeoLib::Grid< POINT >::getPointsInEpsilonEnvironment(), OGS_FATAL, and MathLib::sqrDist().
|
static |
Returns a (possibly new) mesh node searcher for the mesh. A new one will be created, if it does not already exists.
Definition at line 176 of file MeshNodeSearcher.cpp.
References _mesh_node_searchers, MeshLib::Mesh::getID(), and MeshGeoToolsLib::Yes.
Referenced by MeshGeoToolsLib::constructAdditionalMeshesFromGeoObjects(), identifyAndWriteBoundaryMeshes(), and main().
|
private |
Definition at line 98 of file MeshNodeSearcher.h.
Referenced by MeshNodeSearcher(), getMeshNodeIDs(), and getMeshNodeIDs().
|
private |
Definition at line 99 of file MeshNodeSearcher.h.
Referenced by getMeshNodeIDs(), and getMeshNodeIDs().
|
staticprivate |
Mesh node searcher for the meshes indexed by the meshs' ids.
Definition at line 108 of file MeshNodeSearcher.h.
Referenced by getMeshNodeSearcher().
|
mutableprivate |
Definition at line 104 of file MeshNodeSearcher.h.
Referenced by ~MeshNodeSearcher(), and getMeshNodeIDs().
|
mutableprivate |
Definition at line 105 of file MeshNodeSearcher.h.
Referenced by ~MeshNodeSearcher(), and getMeshNodeIDs().
|
mutableprivate |
Definition at line 103 of file MeshNodeSearcher.h.
Referenced by ~MeshNodeSearcher(), and getMeshNodeIDs().
|
private |
Definition at line 101 of file MeshNodeSearcher.h.
Referenced by getMeshNodeIDs().
|
private |
Definition at line 100 of file MeshNodeSearcher.h.
Referenced by MeshNodeSearcher(), getMeshNodeIDs(), and getMeshNodeIDs().