OGS
GMSHPolygonTree.h
Go to the documentation of this file.
1
12#pragma once
13
14#include <vector>
15#include <string>
16
18#include "GMSHPoint.h"
19#include "GMSHLine.h"
20
22
23namespace GeoLib
24{
25class GEOObjects;
26class Polygon;
27class PolylineWithSegmentMarker;
28class PolygonWithSegmentMarker;
29}
30
31namespace FileIO
32{
33namespace GMSH
34{
35
37public:
40 std::string const& geo_name,
41 GMSHMeshDensityStrategy& mesh_density_strategy);
42 ~GMSHPolygonTree() override;
43
45 void markSharedSegments();
46
54 bool insertStation(GeoLib::Point const* station);
69
76
81 void createGMSHPoints(std::vector<GMSHPoint*> & gmsh_pnts) const;
82
83 virtual void writeLineLoop(std::size_t& line_offset,
84 std::size_t& sfc_offset, std::ostream& out,
85 bool const write_physical) const;
86 void writeSubPolygonsAsLineConstraints(std::size_t &line_offset, std::size_t sfc_number, std::ostream& out) const;
87 virtual void writeLineConstraints(std::size_t &line_offset, std::size_t sfc_number, std::ostream& out) const;
88 void writeStations(std::size_t & pnt_id_offset, std::size_t sfc_number, std::ostream& out) const;
89 void writeAdditionalPointData(std::size_t & pnt_id_offset, std::size_t sfc_number, std::ostream& out) const;
90
91private:
93 std::vector<GeoLib::Point const*>& pnts) const;
95 std::vector<GeoLib::Point const*>& stations) const;
99
101 std::string const& _geo_name;
102 std::vector<GeoLib::Point const*> _stations;
103 std::vector<GeoLib::PolylineWithSegmentMarker*> _plys;
104 std::vector<GMSHLine*> _gmsh_lines_for_constraints;
105
107};
108
109} // end namespace GMSH
110} // end namespace FileIO
Definition of the SimplePolygonTree class.
void writeSubPolygonsAsLineConstraints(std::size_t &line_offset, std::size_t sfc_number, std::ostream &out) const
std::vector< GeoLib::PolylineWithSegmentMarker * > _plys
GMSHMeshDensityStrategy & _mesh_density_strategy
void insertPolyline(GeoLib::PolylineWithSegmentMarker *ply)
virtual void writeLineConstraints(std::size_t &line_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
std::vector< GeoLib::Point const * > _stations
GMSHPolygonTree(GeoLib::PolygonWithSegmentMarker *polygon, GMSHPolygonTree *parent, GeoLib::GEOObjects &geo_objs, std::string const &geo_name, GMSHMeshDensityStrategy &mesh_density_strategy)
void getStationsInsideSubPolygons(std::vector< GeoLib::Point const * > &stations) const
void writeStations(std::size_t &pnt_id_offset, std::size_t sfc_number, std::ostream &out) const
void createGMSHPoints(std::vector< GMSHPoint * > &gmsh_pnts) const
void getPointsFromSubPolygons(std::vector< GeoLib::Point const * > &pnts) const
void checkIntersectionsSegmentExistingPolylines(GeoLib::PolylineWithSegmentMarker *ply, GeoLib::Polyline::SegmentIterator const &seg_it)
GeoLib::GEOObjects & _geo_objs
bool insertStation(GeoLib::Point const *station)
std::vector< GMSHLine * > _gmsh_lines_for_constraints
virtual void writeLineLoop(std::size_t &line_offset, std::size_t &sfc_offset, std::ostream &out, bool const write_physical) const
Container class for geometric objects.
Definition GEOObjects.h:57
This class computes and stores the topological relations between polygons. Every node of the SimplePo...
const SimplePolygonTree * parent() const
Polygon const & polygon() const