OGS
|
Classes | |
class | BoundaryElementsAlongPolyline |
class | BoundaryElementsAtPoint |
This class collects point elements located at a given point elements. More... | |
class | BoundaryElementsOnSurface |
class | BoundaryElementsSearcher |
class | GeoMapper |
A set of tools for mapping the elevation of geometric objects. More... | |
class | HeuristicSearchLength |
class | MeshNodesAlongPolyline |
class | MeshNodesAlongSurface |
class | MeshNodeSearcher |
class | MeshNodesOnPoint |
class | SearchLength |
Enumerations | |
enum class | SearchAllNodes : bool { Yes = true , No = false } |
Functions | |
std::unique_ptr< MeshLib::Mesh > | appendLinesAlongPolylines (const MeshLib::Mesh &mesh, const GeoLib::PolylineVec &ply_vec) |
template<typename CacheType , typename GeometryType > | |
std::vector< MeshLib::Element * > const & | getBoundaryElements (std::vector< CacheType * > &cached_elements, std::function< GeometryType(CacheType const &)> getCachedItem, GeometryType const &item, MeshLib::Mesh const &mesh, MeshNodeSearcher const &mesh_node_searcher, bool const multiple_nodes_allowed) |
std::string | meshNameFromGeometry (std::string const &geometrical_set_name, std::string const &geometry_name) |
template<typename GeometryVec > | |
std::vector< std::unique_ptr< MeshLib::Mesh > > | constructAdditionalMeshesFromGeometries (std::vector< GeometryVec * > const &geometries, MeshGeoToolsLib::BoundaryElementsSearcher &boundary_element_searcher, bool const multiple_nodes_allowed) |
std::vector< std::unique_ptr< MeshLib::Mesh > > | constructAdditionalMeshesFromGeoObjects (GeoLib::GEOObjects const &geo_objects, MeshLib::Mesh const &mesh, std::unique_ptr< SearchLength > search_length_algorithm, bool const multiple_nodes_allowed) |
std::unique_ptr< MeshGeoToolsLib::SearchLength > | createSearchLengthAlgorithm (BaseLib::ConfigTree const &external_config, MeshLib::Mesh const &mesh) |
static MeshLib::Element const * | findElementContainingPointXY (std::vector< MeshLib::Element const * > const &elements, MathLib::Point3d const &p) |
static std::vector< MathLib::Point3d > | computeElementSegmentIntersections (MeshLib::Element const &elem, GeoLib::LineSegment const &segment) |
static std::vector< GeoLib::LineSegment > | createSubSegmentsForElement (std::vector< MathLib::Point3d > const &intersections, MeshLib::Element const *const beg_elem, MeshLib::Element const *const end_elem, MathLib::Point3d const &beg_pnt, MathLib::Point3d const &end_pnt, MeshLib::Element const *const elem) |
static std::vector< GeoLib::LineSegment > | mapLineSegment (GeoLib::LineSegment const &segment, std::vector< MeshLib::Element const * > const &surface_elements, MeshLib::Element const *const beg_elem, MeshLib::Element const *const end_elem) |
static void | mapPointOnSurfaceElement (MeshLib::Element const &elem, MathLib::Point3d &q) |
static std::vector< MeshLib::Element const * > | getCandidateElementsForLineSegmentIntersection (MeshLib::MeshElementGrid const &mesh_element_grid, GeoLib::LineSegment const &segment) |
static bool | snapPointToElementNode (MathLib::Point3d &p, MeshLib::Element const &elem, double rel_eps) |
static void | insertSubSegments (GeoLib::Polyline &ply, GeoLib::PointVec &points, GeoLib::Polyline::SegmentIterator &segment_it, std::vector< GeoLib::LineSegment > const &sub_segments) |
static void | mapPolylineOnSurfaceMesh (GeoLib::Polyline &ply, GeoLib::PointVec &orig_points, MeshLib::MeshElementGrid const &mesh_element_grid) |
void | identifySubdomainMesh (MeshLib::Mesh &subdomain_mesh, MeshLib::Mesh const &bulk_mesh, MeshNodeSearcher const &mesh_node_searcher, bool const force_overwrite=false) |
std::vector< bool > | markNodesOutSideOfPolygon (std::vector< MeshLib::Node * > const &nodes, GeoLib::Polygon const &polygon) |
template<typename PT > | |
void | resetMeshElementProperty (MeshLib::Mesh &mesh, GeoLib::Polygon const &polygon, std::string const &property_name, PT new_property_value, int restrict_to_material_id, bool const any_of) |
template<typename CacheType , typename GeometryType > | |
std::vector< std::size_t > const & | getMeshNodeIDs (std::vector< CacheType * > &cached_elements, std::function< GeometryType(CacheType const &)> getCachedItem, GeometryType const &item, MeshLib::Mesh const &mesh, GeoLib::Grid< MeshLib::Node > const &mesh_grid, double const search_length, SearchAllNodes const search_all_nodes) |
|
strong |
std::unique_ptr< MeshLib::Mesh > MeshGeoToolsLib::appendLinesAlongPolylines | ( | const MeshLib::Mesh & | mesh, |
const GeoLib::PolylineVec & | ply_vec ) |
Add line elements to a copy of a given mesh
The function creates line elements from nodes located along user-provided polylines. New elements will have a distinct material ID for each polyline.
mesh | original mesh |
ply_vec | polyline vector whose nodes are used to create line elements |
Definition at line 25 of file AppendLinesAlongPolyline.cpp.
References MeshLib::Cell, MeshLib::copyElementVector(), MeshLib::copyNodeVector(), MeshLib::Mesh::getElements(), MeshLib::Mesh::getName(), GeoLib::TemplateVec< T >::getNameOfElementByID(), MeshGeoToolsLib::MeshNodesAlongPolyline::getNodeIDs(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getNumberOfElements(), GeoLib::TemplateVec< T >::getVector(), INFO(), OGS_FATAL, GeoLib::TemplateVec< T >::size(), and Yes.
Referenced by main().
|
static |
Definition at line 296 of file GeoMapper.cpp.
References computeElementSegmentIntersections(), MeshLib::Element::getEdge(), MeshLib::Element::getNumberOfEdges(), and GeoLib::lineSegmentIntersect2d().
Referenced by computeElementSegmentIntersections(), and mapLineSegment().
std::vector< std::unique_ptr< MeshLib::Mesh > > MeshGeoToolsLib::constructAdditionalMeshesFromGeometries | ( | std::vector< GeometryVec * > const & | geometries, |
MeshGeoToolsLib::BoundaryElementsSearcher & | boundary_element_searcher, | ||
bool const | multiple_nodes_allowed ) |
Definition at line 38 of file ConstructMeshesFromGeometries.cpp.
References MeshLib::cloneElements(), DBUG(), MeshGeoToolsLib::BoundaryElementsSearcher::getBoundaryElements(), MeshLib::Mesh::getName(), MeshGeoToolsLib::BoundaryElementsSearcher::mesh, meshNameFromGeometry(), and MeshLib::transformMeshToNodePartitionedMesh().
Referenced by constructAdditionalMeshesFromGeoObjects().
std::vector< std::unique_ptr< MeshLib::Mesh > > MeshGeoToolsLib::constructAdditionalMeshesFromGeoObjects | ( | GeoLib::GEOObjects const & | geo_objects, |
MeshLib::Mesh const & | mesh, | ||
std::unique_ptr< SearchLength > | search_length_algorithm, | ||
bool const | multiple_nodes_allowed ) |
For each named geometry in the give geo_objects (defined on the given mesh
) constructs a mesh corresponding to the geometry with mappings to the bulk mesh elements and nodes.
Definition at line 98 of file ConstructMeshesFromGeometries.cpp.
References constructAdditionalMeshesFromGeometries(), MeshGeoToolsLib::MeshNodeSearcher::getMeshNodeSearcher(), GeoLib::GEOObjects::getPoints(), GeoLib::GEOObjects::getPolylines(), GeoLib::GEOObjects::getSurfaces(), and MeshLib::Mesh::isAxiallySymmetric().
Referenced by anonymous_namespace{ProjectData.cpp}::readMeshes().
std::unique_ptr< MeshGeoToolsLib::SearchLength > MeshGeoToolsLib::createSearchLengthAlgorithm | ( | BaseLib::ConfigTree const & | external_config, |
MeshLib::Mesh const & | mesh ) |
Creates a search length algorithm from the given config.
In case, that there is no tag for the search length algorithm found in the config, the default SearchLength algorithm is returned.
Definition at line 19 of file CreateSearchLength.cpp.
References BaseLib::ConfigTree::getConfigSubtreeOptional(), and OGS_FATAL.
Referenced by anonymous_namespace{ProjectData.cpp}::readMeshes().
|
static |
Definition at line 320 of file GeoMapper.cpp.
References createSubSegmentsForElement(), MeshLib::Element::getID(), OGS_FATAL, and MathLib::sqrDist().
Referenced by createSubSegmentsForElement(), and mapLineSegment().
|
static |
Find the 2d-element within the elements
that contains the given point p
.
The algorithm projects every element of the elements vector and the point p
orthogonal to the \(x\)- \(y\) plane. In the \(x\)- \(y\) plane it is checked if the projected point is in the projected element.
Definition at line 261 of file GeoMapper.cpp.
Referenced by mapPolylineOnSurfaceMesh().
std::vector< MeshLib::Element * > const & MeshGeoToolsLib::getBoundaryElements | ( | std::vector< CacheType * > & | cached_elements, |
std::function< GeometryType(CacheType const &)> | getCachedItem, | ||
GeometryType const & | item, | ||
MeshLib::Mesh const & | mesh, | ||
MeshNodeSearcher const & | mesh_node_searcher, | ||
bool const | multiple_nodes_allowed ) |
Definition at line 49 of file BoundaryElementsSearcher.cpp.
Referenced by MeshGeoToolsLib::BoundaryElementsSearcher::getBoundaryElements().
|
static |
Definition at line 466 of file GeoMapper.cpp.
References GeoLib::LineSegment::getBeginPoint(), getCandidateElementsForLineSegmentIntersection(), MeshLib::MeshElementGrid::getElementsInVolume(), GeoLib::LineSegment::getEndPoint(), GeoLib::AABB::getMaxPoint(), MeshLib::MeshElementGrid::getMaxPoint(), GeoLib::AABB::getMinPoint(), MeshLib::MeshElementGrid::getMinPoint(), and BaseLib::makeVectorUnique().
Referenced by getCandidateElementsForLineSegmentIntersection(), and mapPolylineOnSurfaceMesh().
std::vector< std::size_t > const & MeshGeoToolsLib::getMeshNodeIDs | ( | std::vector< CacheType * > & | cached_elements, |
std::function< GeometryType(CacheType const &)> | getCachedItem, | ||
GeometryType const & | item, | ||
MeshLib::Mesh const & | mesh, | ||
GeoLib::Grid< MeshLib::Node > const & | mesh_grid, | ||
double const | search_length, | ||
SearchAllNodes const | search_all_nodes ) |
Definition at line 64 of file MeshNodeSearcher.cpp.
Referenced by MeshGeoToolsLib::MeshNodeSearcher::getMeshNodeIDs().
void MeshGeoToolsLib::identifySubdomainMesh | ( | MeshLib::Mesh & | subdomain_mesh, |
MeshLib::Mesh const & | bulk_mesh, | ||
MeshNodeSearcher const & | mesh_node_searcher, | ||
bool const | force_overwrite = false ) |
Geometrically finds nodes and elements of the subdomain mesh in the bulk mesh, and updates or verifies the corresponding bulk_node_ids and bulk_element_ids properties.
In case of unexpected results OGS_FATAL is called.
Definition at line 192 of file IdentifySubdomainMesh.cpp.
References MeshLib::Cell, BaseLib::RunTime::elapsed(), MeshLib::getBulkIDString(), INFO(), MeshLib::IntegrationPoint, MeshLib::Node, and BaseLib::RunTime::start().
|
static |
Definition at line 525 of file GeoMapper.cpp.
References GeoLib::Polyline::SegmentIterator::getSegmentNumber(), GeoLib::Polyline::insertPoint(), insertSubSegments(), GeoLib::PointVec::push_back(), and GeoLib::TemplateVec< T >::size().
Referenced by insertSubSegments(), and mapPolylineOnSurfaceMesh().
|
static |
Definition at line 383 of file GeoMapper.cpp.
References computeElementSegmentIntersections(), createSubSegmentsForElement(), GeoLib::LineSegment::getBeginPoint(), GeoLib::LineSegment::getEndPoint(), BaseLib::makeVectorUnique(), mapLineSegment(), GeoLib::sortSegments(), and MathLib::sqrDist().
Referenced by mapLineSegment(), and mapPolylineOnSurfaceMesh().
|
static |
Definition at line 448 of file GeoMapper.cpp.
References MathLib::Point3d::asEigenVector3d(), MeshLib::Element::getNode(), MeshLib::FaceRule::getSurfaceNormal(), and mapPointOnSurfaceElement().
Referenced by mapPointOnSurfaceElement(), and mapPolylineOnSurfaceMesh().
|
static |
Definition at line 550 of file GeoMapper.cpp.
References GeoLib::Polyline::begin(), GeoLib::Polyline::end(), findElementContainingPointXY(), getCandidateElementsForLineSegmentIntersection(), insertSubSegments(), mapLineSegment(), mapPointOnSurfaceElement(), mapPolylineOnSurfaceMesh(), GeoLib::PointVec::resetInternalDataStructures(), and snapPointToElementNode().
Referenced by MeshGeoToolsLib::GeoMapper::advancedMapOnMesh(), and mapPolylineOnSurfaceMesh().
std::vector< bool > MeshGeoToolsLib::markNodesOutSideOfPolygon | ( | std::vector< MeshLib::Node * > const & | nodes, |
GeoLib::Polygon const & | polygon ) |
Definition at line 23 of file MarkNodesOutsideOfPolygon.h.
References GeoLib::Polyline::addPoint(), GeoLib::computeRotationMatrixToXY(), GeoLib::Polyline::getNumberOfPoints(), GeoLib::Polygon::isPntInPolygon(), GeoLib::rotatePoints(), and GeoLib::rotatePolygonPointsToXY().
Referenced by resetMeshElementProperty().
std::string MeshGeoToolsLib::meshNameFromGeometry | ( | std::string const & | geometrical_set_name, |
std::string const & | geometry_name ) |
Definition at line 30 of file ConstructMeshesFromGeometries.cpp.
Referenced by constructAdditionalMeshesFromGeometries(), and anonymous_namespace{ProcessVariable.cpp}::findMeshInConfig().
void MeshGeoToolsLib::resetMeshElementProperty | ( | MeshLib::Mesh & | mesh, |
GeoLib::Polygon const & | polygon, | ||
std::string const & | property_name, | ||
PT | new_property_value, | ||
int | restrict_to_material_id, | ||
bool const | any_of ) |
Definition at line 30 of file ResetMeshElementProperty.h.
References MeshLib::Cell, ERR(), MeshLib::Mesh::getElements(), MeshLib::Element::getID(), MeshLib::Element::getNodes(), MeshLib::Mesh::getNodes(), MeshLib::Element::getNumberOfNodes(), MeshLib::getOrCreateMeshProperty(), MeshLib::Mesh::getProperties(), MeshLib::Properties::getPropertyVector(), markNodesOutSideOfPolygon(), and OGS_FATAL.
Referenced by main().
|
static |
Definition at line 496 of file GeoMapper.cpp.
References MeshLib::computeSqrNodeDistanceRange(), DBUG(), MeshLib::Element::getNode(), MeshLib::Element::getNumberOfNodes(), snapPointToElementNode(), and MathLib::sqrDist2d().
Referenced by mapPolylineOnSurfaceMesh(), and snapPointToElementNode().