![]() |
OGS
|
Definition at line 35 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 |
![]() | |
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 30 of file GMSHPolygonTree.cpp.
|
override |
Definition at line 42 of file GMSHPolygonTree.cpp.
References _plys, BaseLib::cleanupVectorElements(), and GeoLib::SimplePolygonTree::isRoot().
|
private |
Definition at line 212 of file GMSHPolygonTree.cpp.
References _geo_name, _geo_objs, _plys, GeoLib::Polyline::getPointID(), GeoLib::GEOObjects::getPointVecObj(), 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 291 of file GMSHPolygonTree.cpp.
References _mesh_density_strategy, _plys, createGMSHPoints(), FileIO::GMSH::GMSHMeshDensityStrategy::getMeshDensityAtPoint(), OGS_FATAL, GeoLib::SimplePolygonTree::parent(), and GeoLib::SimplePolygonTree::polygon().
Referenced by createGMSHPoints().
|
private |
Definition at line 512 of file GMSHPolygonTree.cpp.
References getPointsFromSubPolygons().
Referenced by getPointsFromSubPolygons(), and initMeshDensityStrategy().
|
private |
Definition at line 522 of file GMSHPolygonTree.cpp.
References _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 257 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 102 of file GMSHPolygonTree.cpp.
References _geo_name, _geo_objs, _gmsh_lines_for_constraints, _plys, GeoLib::Polyline::begin(), checkIntersectionsSegmentExistingPolylines(), GeoLib::Polyline::end(), GeoLib::GEOObjects::getPointVecObj(), GeoLib::Polyline::insertPoint(), GeoLib::PolylineWithSegmentMarker::insertPoint(), insertPolyline(), GeoLib::Polygon::isPntInPolygon(), 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 75 of file GMSHPolygonTree.cpp.
References _stations, insertStation(), and GeoLib::SimplePolygonTree::polygon().
Referenced by insertStation().
void FileIO::GMSH::GMSHPolygonTree::markSharedSegments | ( | ) |
Mark the segments shared by several polygons.
Definition at line 52 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 459 of file GMSHPolygonTree.cpp.
References _geo_objs, _mesh_density_strategy, GeoLib::GEOObjects::addPointVec(), GeoLib::GEOObjects::addPolylineVec(), FileIO::GMSH::GMSHMeshDensityStrategy::getMeshDensityAtPoint(), GeoLib::GEOObjects::getPointVecObj(), and GeoLib::SimplePolygonTree::polygon().
|
virtual |
Definition at line 390 of file GMSHPolygonTree.cpp.
References _plys, GeoLib::containsEdge(), and GeoLib::SimplePolygonTree::polygon().
|
virtual |
Definition at line 354 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 442 of file GMSHPolygonTree.cpp.
References _mesh_density_strategy, _stations, FileIO::GMSH::GMSHMeshDensityStrategy::getMeshDensityAtStation(), and getName().
void FileIO::GMSH::GMSHPolygonTree::writeSubPolygonsAsLineConstraints | ( | std::size_t & | line_offset, |
std::size_t | sfc_number, | ||
std::ostream & | out | ||
) | const |
Definition at line 416 of file GMSHPolygonTree.cpp.
References GeoLib::Polyline::getPointID(), GeoLib::SimplePolygonTree::isRoot(), GeoLib::SimplePolygonTree::polygon(), and writeSubPolygonsAsLineConstraints().
Referenced by writeSubPolygonsAsLineConstraints().
|
private |
Definition at line 100 of file GMSHPolygonTree.h.
Referenced by checkIntersectionsSegmentExistingPolylines(), and insertPolyline().
|
private |
Definition at line 99 of file GMSHPolygonTree.h.
Referenced by checkIntersectionsSegmentExistingPolylines(), insertPolyline(), and writeAdditionalPointData().
|
private |
Definition at line 103 of file GMSHPolygonTree.h.
Referenced by insertPolyline().
|
private |
Definition at line 105 of file GMSHPolygonTree.h.
Referenced by createGMSHPoints(), initMeshDensityStrategy(), writeAdditionalPointData(), and writeStations().
|
private |
Definition at line 102 of file GMSHPolygonTree.h.
Referenced by ~GMSHPolygonTree(), checkIntersectionsSegmentExistingPolylines(), createGMSHPoints(), initMeshDensityStrategy(), insertPolyline(), and writeLineConstraints().
|
private |
Definition at line 101 of file GMSHPolygonTree.h.
Referenced by getStationsInsideSubPolygons(), initMeshDensityStrategy(), insertStation(), and writeStations().