![]() |
OGS
|
|
Definition at line 28 of file GMSHPolygonTree.h.
#include <GMSHPolygonTree.h>
Public Member Functions | |
| GMSHPolygonTree (GeoLib::PolygonWithSegmentMarker *polygon, GMSHPolygonTree *parent, GeoLib::GEOObjects &geo_objs, std::string const &geo_name, GMSHMeshDensityStrategy &mesh_density_strategy) | |
| ~GMSHPolygonTree () override | |
| void | markSharedSegments () |
| bool | insertStation (GeoLib::Point const *station) |
| void | insertPolyline (GeoLib::PolylineWithSegmentMarker *ply) |
| void | initMeshDensityStrategy () |
| void | createGMSHPoints (std::vector< GMSHPoint * > &gmsh_pnts) const |
| virtual void | writeLineLoop (std::size_t &line_offset, std::size_t &sfc_offset, std::ostream &out, bool const write_physical) const |
| void | writeSubPolygonsAsLineConstraints (std::size_t &line_offset, std::size_t sfc_number, std::ostream &out) const |
| virtual void | writeLineConstraints (std::size_t &line_offset, std::size_t sfc_number, std::ostream &out) const |
| void | writeStations (std::size_t &pnt_id_offset, std::size_t sfc_number, std::ostream &out) const |
| void | writeAdditionalPointData (std::size_t &pnt_id_offset, std::size_t sfc_number, std::ostream &out) const |
| Public Member Functions inherited from GeoLib::SimplePolygonTree | |
| SimplePolygonTree (Polygon *polygon, SimplePolygonTree *parent) | |
| virtual | ~SimplePolygonTree () |
| bool | isRoot () const |
| bool | isPolygonInside (const SimplePolygonTree *polygon_hierarchy) const |
| void | insertSimplePolygonTree (SimplePolygonTree *polygon_hierarchy) |
| Polygon const & | polygon () const |
| Polygon & | polygon () |
| const SimplePolygonTree * | parent () const |
| std::size_t | getNumberOfChildren () const |
| decltype(_children) ::const_iterator | begin () const |
| decltype(_children) ::const_iterator | end () const |
Private Member Functions | |
| void | getPointsFromSubPolygons (std::vector< GeoLib::Point const * > &pnts) const |
| void | getStationsInsideSubPolygons (std::vector< GeoLib::Point const * > &stations) const |
| void | checkIntersectionsSegmentExistingPolylines (GeoLib::PolylineWithSegmentMarker *ply, GeoLib::Polyline::SegmentIterator const &seg_it) |
Private Attributes | |
| GeoLib::GEOObjects & | _geo_objs |
| std::string const & | _geo_name |
| std::vector< GeoLib::Point const * > | _stations |
| std::vector< GeoLib::PolylineWithSegmentMarker * > | _plys |
| std::vector< GMSHLine * > | _gmsh_lines_for_constraints |
| GMSHMeshDensityStrategy & | _mesh_density_strategy |
| FileIO::GMSH::GMSHPolygonTree::GMSHPolygonTree | ( | GeoLib::PolygonWithSegmentMarker * | polygon, |
| GMSHPolygonTree * | parent, | ||
| GeoLib::GEOObjects & | geo_objs, | ||
| std::string const & | geo_name, | ||
| GMSHMeshDensityStrategy & | mesh_density_strategy ) |
Definition at line 23 of file GMSHPolygonTree.cpp.
References GMSHPolygonTree(), GeoLib::SimplePolygonTree::SimplePolygonTree(), _geo_name, _geo_objs, _mesh_density_strategy, GeoLib::SimplePolygonTree::parent(), and GeoLib::SimplePolygonTree::polygon().
Referenced by GMSHPolygonTree(), createGMSHPoints(), getPointsFromSubPolygons(), getStationsInsideSubPolygons(), insertPolyline(), insertStation(), and writeSubPolygonsAsLineConstraints().
|
override |
Definition at line 35 of file GMSHPolygonTree.cpp.
References _plys, BaseLib::cleanupVectorElements(), and GeoLib::SimplePolygonTree::isRoot().
|
private |
Definition at line 205 of file GMSHPolygonTree.cpp.
References _geo_name, _geo_objs, _plys, GeoLib::Polyline::getPointID(), GeoLib::Polyline::SegmentIterator::getSegmentNumber(), GeoLib::PolylineWithSegmentMarker::insertPoint(), GeoLib::lineSegmentIntersect(), GeoLib::PointVec::push_back(), and GeoLib::TemplateVec< T >::size().
Referenced by insertPolyline().
| void FileIO::GMSH::GMSHPolygonTree::createGMSHPoints | ( | std::vector< GMSHPoint * > & | gmsh_pnts | ) | const |
Method creates the gmsh point data structures - including the mesh density.
| gmsh_pnts | a vector of pointers to instances of class GMSHPoint |
Definition at line 284 of file GMSHPolygonTree.cpp.
References GMSHPolygonTree(), _mesh_density_strategy, _plys, createGMSHPoints(), OGS_FATAL, GeoLib::SimplePolygonTree::parent(), and GeoLib::SimplePolygonTree::polygon().
Referenced by createGMSHPoints().
|
private |
Definition at line 497 of file GMSHPolygonTree.cpp.
References GMSHPolygonTree(), and getPointsFromSubPolygons().
Referenced by getPointsFromSubPolygons(), and initMeshDensityStrategy().
|
private |
Definition at line 507 of file GMSHPolygonTree.cpp.
References GMSHPolygonTree(), _stations, and getStationsInsideSubPolygons().
Referenced by getStationsInsideSubPolygons(), and initMeshDensityStrategy().
| void FileIO::GMSH::GMSHPolygonTree::initMeshDensityStrategy | ( | ) |
Initialize the mesh density strategy with data. In case of GMSHAdaptiveMeshDensity an instance of class QuadTree will be set up with the points within the top level bounding polygon.
Definition at line 250 of file GMSHPolygonTree.cpp.
References _mesh_density_strategy, _plys, _stations, getPointsFromSubPolygons(), getStationsInsideSubPolygons(), and GeoLib::SimplePolygonTree::polygon().
| void FileIO::GMSH::GMSHPolygonTree::insertPolyline | ( | GeoLib::PolylineWithSegmentMarker * | ply | ) |
If at least one (end) point (of a line segment) of the polyline is inside the polygon the polyline is inserted to the internal vector of polylines.
Intersection points are inserted into the points vector the polygon and the polyline are based on. The id of the intersection point is inserted in both the polygon and the polyline, i.e. the two intersecting line segments are splitt into four line segment.
Line segments of the polyline that are completely within the polygon are inserted into the internal vector _gmsh_lines_for_constraints. The children of this GMSHPolygonTree node are checked recursively.
| ply | the polyline that should be inserted |
Definition at line 95 of file GMSHPolygonTree.cpp.
References GMSHPolygonTree(), _geo_name, _geo_objs, _gmsh_lines_for_constraints, _plys, GeoLib::Polyline::begin(), checkIntersectionsSegmentExistingPolylines(), GeoLib::Polyline::end(), GeoLib::Polyline::insertPoint(), GeoLib::PolylineWithSegmentMarker::insertPoint(), insertPolyline(), GeoLib::Polyline::isPointIDInPolyline(), GeoLib::PolylineWithSegmentMarker::isSegmentMarked(), GeoLib::PolylineWithSegmentMarker::markSegment(), GeoLib::SimplePolygonTree::polygon(), GeoLib::PointVec::push_back(), and GeoLib::TemplateVec< T >::size().
Referenced by insertPolyline().
| bool FileIO::GMSH::GMSHPolygonTree::insertStation | ( | GeoLib::Point const * | station | ) |
If the station point is inside the polygon, the method inserts the station into the internal vector of stations. This method works recursive!
| station | the station point |
Definition at line 68 of file GMSHPolygonTree.cpp.
References GMSHPolygonTree(), _stations, insertStation(), and GeoLib::SimplePolygonTree::polygon().
Referenced by insertStation().
| void FileIO::GMSH::GMSHPolygonTree::markSharedSegments | ( | ) |
Mark the segments shared by several polygons.
Definition at line 45 of file GMSHPolygonTree.cpp.
References GeoLib::containsEdge(), GeoLib::SimplePolygonTree::isRoot(), GeoLib::SimplePolygonTree::parent(), and GeoLib::SimplePolygonTree::polygon().
| void FileIO::GMSH::GMSHPolygonTree::writeAdditionalPointData | ( | std::size_t & | pnt_id_offset, |
| std::size_t | sfc_number, | ||
| std::ostream & | out ) const |
Definition at line 452 of file GMSHPolygonTree.cpp.
References _geo_objs, _mesh_density_strategy, GeoLib::SimplePolygonTree::polygon(), and GeoLib::resetPointIDs().
|
virtual |
Definition at line 383 of file GMSHPolygonTree.cpp.
References _plys, GeoLib::containsEdge(), and GeoLib::SimplePolygonTree::polygon().
|
virtual |
Definition at line 347 of file GMSHPolygonTree.cpp.
References GeoLib::Polyline::getPointID(), and GeoLib::SimplePolygonTree::polygon().
| void FileIO::GMSH::GMSHPolygonTree::writeStations | ( | std::size_t & | pnt_id_offset, |
| std::size_t | sfc_number, | ||
| std::ostream & | out ) const |
Definition at line 435 of file GMSHPolygonTree.cpp.
References _mesh_density_strategy, _stations, and getName().
| void FileIO::GMSH::GMSHPolygonTree::writeSubPolygonsAsLineConstraints | ( | std::size_t & | line_offset, |
| std::size_t | sfc_number, | ||
| std::ostream & | out ) const |
Definition at line 409 of file GMSHPolygonTree.cpp.
References GMSHPolygonTree(), GeoLib::Polyline::getPointID(), GeoLib::SimplePolygonTree::isRoot(), GeoLib::SimplePolygonTree::polygon(), and writeSubPolygonsAsLineConstraints().
Referenced by writeSubPolygonsAsLineConstraints().
|
private |
Definition at line 93 of file GMSHPolygonTree.h.
Referenced by GMSHPolygonTree(), checkIntersectionsSegmentExistingPolylines(), and insertPolyline().
|
private |
Definition at line 92 of file GMSHPolygonTree.h.
Referenced by GMSHPolygonTree(), checkIntersectionsSegmentExistingPolylines(), insertPolyline(), and writeAdditionalPointData().
|
private |
Definition at line 96 of file GMSHPolygonTree.h.
Referenced by insertPolyline().
|
private |
Definition at line 98 of file GMSHPolygonTree.h.
Referenced by GMSHPolygonTree(), createGMSHPoints(), initMeshDensityStrategy(), writeAdditionalPointData(), and writeStations().
|
private |
Definition at line 95 of file GMSHPolygonTree.h.
Referenced by ~GMSHPolygonTree(), checkIntersectionsSegmentExistingPolylines(), createGMSHPoints(), initMeshDensityStrategy(), insertPolyline(), and writeLineConstraints().
|
private |
Definition at line 94 of file GMSHPolygonTree.h.
Referenced by getStationsInsideSubPolygons(), initMeshDensityStrategy(), insertStation(), and writeStations().