![]() |
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, [[maybe_unused]] 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, MathLib::LinAlg::copy(), MeshLib::copyElementVector(), MeshLib::copyNodeVector(), MeshLib::Mesh::getElements(), MeshLib::Mesh::getMinEdgeLength(), MeshLib::Mesh::getName(), GeoLib::TemplateVec< T >::getNameOfElementByID(), MeshGeoToolsLib::MeshNodesAlongPolyline::getNodeIDs(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getNumberOfElements(), GeoLib::TemplateVec< T >::getVector(), INFO(), MeshLib::materialIDs(), MaterialPropertyLib::name, OGS_FATAL, GeoLib::TemplateVec< T >::size(), and Yes.
Referenced by main().
|
static |
Definition at line 297 of file GeoMapper.cpp.
References MeshLib::Element::getEdge(), MeshLib::Element::getNumberOfEdges(), and GeoLib::lineSegmentIntersect2d().
Referenced by 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 30 of file ConstructMeshesFromGeometries.cpp.
References MeshLib::cloneElements(), MeshLib::createMeshFromElementSelection(), DBUG(), MeshGeoToolsLib::BoundaryElementsSearcher::getBoundaryElements(), and meshNameFromGeometry().
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 74 of file ConstructMeshesFromGeometries.cpp.
References constructAdditionalMeshesFromGeometries(), MeshGeoToolsLib::MeshNodeSearcher::getMeshNodeSearcher(), GeoLib::GEOObjects::getPoints(), GeoLib::GEOObjects::getPolylines(), GeoLib::GEOObjects::getSurfaces(), and MeshLib::Mesh::isAxiallySymmetric().
Referenced by main(), and 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 321 of file GeoMapper.cpp.
References MeshLib::Element::getID(), OGS_FATAL, and MathLib::sqrDist().
Referenced by 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 262 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, | ||
[[maybe_unused] ] bool const | multiple_nodes_allowed | ||
) |
Definition at line 49 of file BoundaryElementsSearcher.cpp.
Referenced by MeshGeoToolsLib::BoundaryElementsSearcher::getBoundaryElements().
|
static |
Definition at line 468 of file GeoMapper.cpp.
References GeoLib::LineSegment::getBeginPoint(), MeshLib::MeshElementGrid::getElementsInVolume(), GeoLib::LineSegment::getEndPoint(), GeoLib::AABB::getMaxPoint(), MeshLib::MeshElementGrid::getMaxPoint(), GeoLib::AABB::getMinPoint(), MeshLib::MeshElementGrid::getMinPoint(), and BaseLib::makeVectorUnique().
Referenced by 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 194 of file IdentifySubdomainMesh.cpp.
References MeshLib::Cell, anonymous_namespace{IdentifySubdomainMesh.cpp}::identifySubdomainMeshElements(), anonymous_namespace{IdentifySubdomainMesh.cpp}::identifySubdomainMeshNodes(), MeshLib::IntegrationPoint, MeshLib::Node, and anonymous_namespace{IdentifySubdomainMesh.cpp}::updateOrCheckExistingSubdomainProperty().
Referenced by identifyAndWriteBoundaryMeshes(), and main().
|
static |
Definition at line 527 of file GeoMapper.cpp.
References GeoLib::Polyline::SegmentIterator::getSegmentNumber(), GeoLib::Polyline::insertPoint(), GeoLib::PointVec::push_back(), and GeoLib::TemplateVec< T >::size().
Referenced by mapPolylineOnSurfaceMesh().
|
static |
Definition at line 384 of file GeoMapper.cpp.
References computeElementSegmentIntersections(), createSubSegmentsForElement(), GeoLib::LineSegment::getBeginPoint(), GeoLib::LineSegment::getEndPoint(), BaseLib::makeVectorUnique(), GeoLib::sortSegments(), and MathLib::sqrDist().
Referenced by mapPolylineOnSurfaceMesh().
|
static |
Definition at line 449 of file GeoMapper.cpp.
References MathLib::TemplatePoint< T, DIM >::getCoords(), MeshLib::Element::getNode(), MeshLib::FaceRule::getSurfaceNormal(), MathLib::p, and MathLib::q.
Referenced by mapPolylineOnSurfaceMesh().
|
static |
Definition at line 552 of file GeoMapper.cpp.
References GeoLib::Polyline::begin(), GeoLib::Polyline::end(), findElementContainingPointXY(), getCandidateElementsForLineSegmentIntersection(), insertSubSegments(), mapLineSegment(), mapPointOnSurfaceElement(), MathLib::p, GeoLib::PointVec::resetInternalDataStructures(), and snapPointToElementNode().
Referenced by MeshGeoToolsLib::GeoMapper::advancedMapOnMesh().
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::computeRotationMatrixToXY(), GeoLib::Polyline::getPointsVec(), GeoLib::Polygon::isPntInPolygon(), GeoLib::rotatePoints(), and GeoLib::rotatePolygonToXY().
Referenced by resetMeshElementProperty().
std::string MeshGeoToolsLib::meshNameFromGeometry | ( | std::string const & | geometrical_set_name, |
std::string const & | geometry_name | ||
) |
Definition at line 22 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 29 of file ResetMeshElementProperty.h.
References MeshLib::Cell, ERR(), MeshLib::Mesh::getElements(), MeshLib::Element::getID(), MeshLib::Mesh::getNodes(), MeshLib::Element::getNodes(), MeshLib::Element::getNumberOfNodes(), MeshLib::Mesh::getProperties(), MeshLib::Properties::getPropertyVector(), markNodesOutSideOfPolygon(), and OGS_FATAL.
Referenced by main().
|
static |
Definition at line 498 of file GeoMapper.cpp.
References MeshLib::computeSqrNodeDistanceRange(), DBUG(), MeshLib::Element::getNode(), MeshLib::Element::getNumberOfNodes(), MathLib::p, and MathLib::sqrDist2d().
Referenced by mapPolylineOnSurfaceMesh().