![]() |
OGS
|
Reads and writes GMSH-files to and from OGS data structures.
Definition at line 46 of file GMSHInterface.h.
#include <GMSHInterface.h>
Public Member Functions | |
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 const &)=delete | |
GMSHInterface (GMSHInterface &&)=delete | |
GMSHInterface & | operator= (GMSHInterface const &)=delete |
GMSHInterface & | operator= (GMSHInterface &&)=delete |
~GMSHInterface () override | |
void | writePhysicalGroups (bool flag) |
Public Member Functions inherited from BaseLib::IO::Writer | |
Writer () | |
virtual | ~Writer ()=default |
std::string | writeToString () |
Writes the object to a string. |
Protected Member Functions | |
bool | write () override |
Writes the object to the internal stream. This method must be implemented by a subclass. The implementation should return true on success, else false. |
Private Member Functions | |
int | writeGMSHInputFile (std::ostream &out) |
Private Attributes | |
std::size_t | _n_lines |
std::size_t | _n_plane_sfc |
GeoLib::GEOObjects & | _geo_objs |
std::vector< std::string > const & | _selected_geometries |
std::string | _gmsh_geo_name |
std::list< GMSH::GMSHPolygonTree * > | _polygon_tree_list |
std::vector< GMSH::GMSHPoint * > | _gmsh_pnts |
std::unique_ptr< GMSH::GMSHMeshDensityStrategy > | _mesh_density_strategy |
Eigen::Matrix3d | _inverse_rot_mat = Eigen::Matrix3d::Zero() |
bool const | _rotate = false |
bool | _keep_preprocessed_geometry = true |
bool | _write_physical_groups = false |
Additional Inherited Members | |
Protected Attributes inherited from BaseLib::IO::Writer | |
std::ostringstream | out |
The stream to write to. |
FileIO::GMSH::GMSHInterface::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 ) |
geo_objs | reference to instance of class GEOObject that maintains the geometries. The instance is used for preparation geometries for writing them to the gmsh file format. |
include_stations_as_constraints | switch to enable writing stations as constraints |
mesh_density_algorithm | one of the mesh density algorithms (@see enum MeshDensityAlgorithm) |
pnt_density | parameter of the mesh density algorithm |
station_density | parameter of the mesh density algorithm |
max_pnts_per_leaf | parameter of the mesh density algorithm |
selected_geometries | vector of names of geometries, that should be employed for mesh generation. |
rotate | if the value of the parameter is true then the input points will be rotated on the \(x\)- \(y\)-plane, else the input points will be (orthogonal) projected to the \(x\)- \(y\)-plane. |
keep_preprocessed_geometry | keep the pre-processed geometry, useful for debugging the mesh creation |
Definition at line 50 of file GMSHInterface.cpp.
References _geo_objs, _keep_preprocessed_geometry, _mesh_density_strategy, _n_lines, _n_plane_sfc, _rotate, _selected_geometries, FileIO::GMSH::AdaptiveMeshDensity, and FileIO::GMSH::FixedMeshDensity.
Referenced by GMSHInterface(), GMSHInterface(), operator=(), and operator=().
|
delete |
References GMSHInterface().
|
delete |
References GMSHInterface().
|
override |
Definition at line 78 of file GMSHInterface.cpp.
References _gmsh_pnts, _polygon_tree_list, and BaseLib::cleanupVectorElements().
|
delete |
References GMSHInterface().
|
delete |
References GMSHInterface().
|
overrideprotectedvirtual |
Writes the object to the internal stream. This method must be implemented by a subclass. The implementation should return true on success, else false.
Implements BaseLib::IO::Writer.
Definition at line 87 of file GMSHInterface.cpp.
References GitInfoLib::GitInfo::ogs_version, BaseLib::IO::Writer::out, and writeGMSHInputFile().
|
private |
out |
Definition at line 96 of file GMSHInterface.cpp.
References _geo_objs, _gmsh_geo_name, _gmsh_pnts, _inverse_rot_mat, _keep_preprocessed_geometry, _n_lines, _n_plane_sfc, _polygon_tree_list, _rotate, _selected_geometries, _write_physical_groups, GeoLib::computeAndInsertAllIntersectionPoints(), GeoLib::createPolygonTrees(), DBUG(), ERR(), OGS_FATAL, BaseLib::IO::Writer::out, GeoLib::rotatePoints(), and GeoLib::rotatePointsToXY().
Referenced by write().
|
inline |
Definition at line 84 of file GMSHInterface.h.
References _write_physical_groups.
Referenced by generateMesh().
|
private |
Definition at line 103 of file GMSHInterface.h.
Referenced by GMSHInterface(), and writeGMSHInputFile().
|
private |
Definition at line 105 of file GMSHInterface.h.
Referenced by writeGMSHInputFile().
|
private |
Definition at line 108 of file GMSHInterface.h.
Referenced by ~GMSHInterface(), and writeGMSHInputFile().
|
private |
Holds the inverse rotation matrix. The matrix is used to revert the rotation done in writeGMSHInputFile().
Definition at line 113 of file GMSHInterface.h.
Referenced by writeGMSHInputFile().
|
private |
Definition at line 117 of file GMSHInterface.h.
Referenced by GMSHInterface(), and writeGMSHInputFile().
|
private |
Definition at line 110 of file GMSHInterface.h.
Referenced by GMSHInterface().
|
private |
Definition at line 100 of file GMSHInterface.h.
Referenced by GMSHInterface(), and writeGMSHInputFile().
|
private |
Definition at line 101 of file GMSHInterface.h.
Referenced by GMSHInterface(), and writeGMSHInputFile().
|
private |
Definition at line 106 of file GMSHInterface.h.
Referenced by ~GMSHInterface(), and writeGMSHInputFile().
|
private |
Signals if the input points should be rotated or projected to the \(x\)- \(y\)-plane
Definition at line 116 of file GMSHInterface.h.
Referenced by GMSHInterface(), and writeGMSHInputFile().
|
private |
Definition at line 104 of file GMSHInterface.h.
Referenced by GMSHInterface(), and writeGMSHInputFile().
|
private |
Definition at line 118 of file GMSHInterface.h.
Referenced by writeGMSHInputFile(), and writePhysicalGroups().