OGS
GMSHInterface.h
Go to the documentation of this file.
1
12#pragma once
13
14#include <iosfwd>
15#include <list>
16#include <memory>
17#include <string>
18#include <vector>
19
21#include "BaseLib/IO/Writer.h"
22
23namespace GeoLib
24{
25class GEOObjects;
26class Polygon;
27}
28
29namespace FileIO
30{
31
32namespace GMSH
33{
34
35class GMSHPolygonTree;
36class GMSHMeshDensityStrategy;
37
42
47{
48public:
70 bool include_stations_as_constraints,
71 GMSH::MeshDensityAlgorithm mesh_density_algorithm,
72 double pnt_density, double station_density,
73 std::size_t max_pnts_per_leaf,
74 std::vector<std::string> const& selected_geometries,
75 bool rotate, bool keep_preprocessed_geometry);
76
77 GMSHInterface(GMSHInterface const&) = delete;
81
82 ~GMSHInterface() override;
83
84 void writePhysicalGroups(bool flag) { _write_physical_groups = flag; }
85
86protected:
87 bool write() override;
88
89private:
98 int writeGMSHInputFile(std::ostream & out);
99
100 std::size_t _n_lines;
101 std::size_t _n_plane_sfc;
102
104 std::vector<std::string> const& _selected_geometries;
105 std::string _gmsh_geo_name;
106 std::list<GMSH::GMSHPolygonTree*> _polygon_tree_list;
107
108 std::vector<GMSH::GMSHPoint*> _gmsh_pnts;
109
110 std::unique_ptr<GMSH::GMSHMeshDensityStrategy> _mesh_density_strategy;
113 Eigen::Matrix3d _inverse_rot_mat = Eigen::Matrix3d::Zero();
116 bool const _rotate = false;
119};
120} // end namespace GMSH
121} // end namespace FileIO
Definition of the Writer class.
Base class which enables writing an object to string, stringstream or file.
Definition Writer.h:32
std::ostringstream out
The stream to write to.
Definition Writer.h:47
Reads and writes GMSH-files to and from OGS data structures.
GMSHInterface & operator=(GMSHInterface &&)=delete
GMSHInterface(GeoLib::GEOObjects &geo_objs, bool include_stations_as_constraints, GMSH::MeshDensityAlgorithm mesh_density_algorithm, double pnt_density, double station_density, std::size_t max_pnts_per_leaf, std::vector< std::string > const &selected_geometries, bool rotate, bool keep_preprocessed_geometry)
GMSHInterface(GMSHInterface &&)=delete
std::unique_ptr< GMSH::GMSHMeshDensityStrategy > _mesh_density_strategy
Eigen::Matrix3d _inverse_rot_mat
GMSHInterface & operator=(GMSHInterface const &)=delete
GMSHInterface(GMSHInterface const &)=delete
std::vector< GMSH::GMSHPoint * > _gmsh_pnts
void writePhysicalGroups(bool flag)
int writeGMSHInputFile(std::ostream &out)
std::vector< std::string > const & _selected_geometries
GeoLib::GEOObjects & _geo_objs
bool write() override
Writes the object to the internal stream. This method must be implemented by a subclass....
std::list< GMSH::GMSHPolygonTree * > _polygon_tree_list
Container class for geometric objects.
Definition GEOObjects.h:57
@ AdaptiveMeshDensity
computing the mesh density employing a QuadTree
@ FixedMeshDensity
set the parameter with a fixed value