gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
GFace.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 
6 #ifndef GFACE_H
7 #define GFACE_H
8 
9 #include "GEdgeLoop.h"
10 #include "GEntity.h"
11 #include "GPoint.h"
12 #include "GmshDefines.h"
13 #include "Numeric.h"
14 #include "Pair.h"
15 #include "SPoint2.h"
16 #include "SVector3.h"
17 #include "boundaryLayersData.h"
18 #include <list>
19 #include <map>
20 #include <string>
21 #include <vector>
22 
23 class MElement;
24 class MTriangle;
25 class MQuadrangle;
26 class MPolygon;
27 class ExtrudeParams;
28 
29 class GRegion;
30 
31 // A model face.
32 class GFace : public GEntity
33 {
34  protected:
35  // edge loops might replace what follows (list of all the edges of
36  // the face + directions)
37  std::vector<GEdge *> l_edges;
38  std::vector<int> l_dirs;
41  std::vector<GEdge *> embedded_edges;
42  std::set<GVertex *, GEntityPtrLessThan> embedded_vertices;
43 
45 
46  public: // this will become protected or private
47  std::vector<GEdgeLoop> edgeLoops;
48 
49  // periodic counterparts of edges
50  std::map<GEdge *, std::pair<GEdge *, int>> edgeCounterparts;
51 
52  // specify mesh master with transformation, deduce edgeCounterparts
53  void setMeshMaster(GFace *master, const std::vector<double> &);
54 
55  // specify mesh master and edgeCounterparts, deduce transformation
56  void setMeshMaster(GFace *master, const std::map<int, int> &);
57 
58  // align elements with mesh master
60 
61  public:
62  GFace(GModel *model, int tag);
63  virtual ~GFace();
64 
65  // delete mesh data
66  virtual void deleteMesh();
67 
68  // add/delete regions that are bounded by the face
69  void addRegion(GRegion *r)
70  {
71  if (r == r1 || r == r2)
72  return;
73  r1 ? r2 = r : r1 = r;
74  }
75  void delRegion(GRegion *r)
76  {
77  if (r1 == r)
78  r1 = r2;
79  r2 = nullptr;
80  }
81  GRegion *getRegion(int const num) const
82  {
83  return num == 0 ? r1 : r2;
84  }
85 
86  // get number of regions
87  std::size_t numRegions() const
88  {
89  return (r1 != nullptr) + (r2 != nullptr);
90  }
91 
92  std::list<GRegion *> regions() const
93  {
94  std::list<GRegion *> r;
95  for (std::size_t i = 0; i < numRegions(); i++)
96  r.push_back(getRegion(i));
97  return r;
98  }
99 
100  // is this entity an orphan?
101  virtual bool isOrphan();
102 
103  // add embedded vertices/edges
105  {
106  embedded_vertices.insert(v);
107  }
109  {
110  embedded_edges.push_back(e);
111  }
112 
113  // edge orientations
114  virtual std::vector<int> const &orientations() const
115  {
116  return l_dirs;
117  }
118 
119  // edges that bound the face
120  int delEdge(GEdge *edge);
121  virtual std::vector<GEdge *> const &edges() const
122  {
123  return l_edges;
124  }
125  void set(const std::vector<GEdge *> &f)
126  {
127  l_edges = f;
128  }
129  void setOrientations(const std::vector<int> &f)
130  {
131  l_dirs = f;
132  }
133  void setEdge(GEdge *const f, int const orientation)
134  {
135  l_edges.push_back(f);
136  l_dirs.push_back(orientation);
137  }
138 
139  virtual std::vector<int> const &edgeOrientations() const
140  {
141  return l_dirs;
142  }
143 
144  bool containsEdge(int const iEdge) const
145  {
146  for (auto it = l_edges.begin(); it != l_edges.end(); ++it)
147  if ((*it)->tag() == iEdge)
148  return true;
149  return false;
150  }
151 
152  void setBoundEdges(const std::vector<int> &tagEdges);
153  void setBoundEdges(const std::vector<int> &tagEdges, const std::vector<int> &signEdges);
154 
155  // direct access to embedded entities
156  std::vector<GEdge *> &embeddedEdges()
157  {
158  return embedded_edges;
159  }
160  std::set<GVertex *, GEntityPtrLessThan> &embeddedVertices()
161  {
162  return embedded_vertices;
163  }
164 
165  // get embedded entities; if force is not set, don't return them if the face
166  // is part of a compound
167  std::vector<GVertex *> getEmbeddedVertices(bool force = false) const;
168  std::vector<GEdge *> getEmbeddedEdges(bool force = false) const;
169  std::vector<MVertex *> getEmbeddedMeshVertices(bool force = false) const;
170 
171  // vertices that bound the face
172  virtual std::vector<GVertex *> vertices() const;
173 
174  // dimension of the face (2)
175  virtual int dim() const
176  {
177  return 2;
178  }
179 
180  // returns the parent entity for partitioned entities
182  {
183  return nullptr;
184  }
185 
186  // set visibility flag
187  virtual void setVisibility(char val, bool recursive = false);
188 
189  // set color
190  virtual void setColor(unsigned int val, bool recursive = false);
191 
192  // compute the parameters UV from a point XYZ
193  void XYZtoUV(double X, double Y, double Z, double &U, double &V, double relax, bool onSurface = true,
194  bool convTestXYZ = false) const;
195 
196  // get the bounding box
197  virtual SBoundingBox3d bounds(bool fast = false);
198 
199  // get the oriented bounding box
200  virtual SOrientedBoundingBox getOBB();
201 
202  // compute the genus G of the surface
203  virtual int genusGeom() const;
204  virtual bool checkTopology() const
205  {
206  return true;
207  }
208 
209  // return the point on the face corresponding to the given parameter
210  virtual GPoint point(double par1, double par2) const = 0;
211  virtual GPoint point(const SPoint2 &pt) const
212  {
213  return point(pt.x(), pt.y());
214  }
215 
216  // if the mapping is a conforming mapping, i.e. a mapping that
217  // conserves angles, this function returns the eigenvalue of the
218  // metric at a given point this is a special feature for
219  // stereographic mappings of the sphere that is used in 2D mesh
220  // generation !
221  virtual double getMetricEigenvalue(const SPoint2 &);
222 
223  // eigen values are absolute values and sorted from min to max of absolute
224  // values eigen vectors are the COLUMNS of eigVec
225  virtual void getMetricEigenVectors(const SPoint2 &param, double eigVal[2], double eigVec[4]) const;
226 
227  // return the parameter location on the face given a point in space
228  // that is on the face
229  virtual SPoint2 parFromPoint(const SPoint3 &, bool onSurface = true, bool convTestXYZ = false) const;
230 
231  // true if the parameter value is interior to the face
232  virtual bool containsParam(const SPoint2 &pt);
233 
234  // return the point on the face closest to the given point
235  virtual GPoint closestPoint(const SPoint3 &queryPoint, const double initialGuess[2]) const;
236 
237  // return the normal to the face at the given parameter location
238  virtual SVector3 normal(const SPoint2 &param) const;
239 
240  // return the first derivate of the face at the parameter location
241  virtual Pair<SVector3, SVector3> firstDer(const SPoint2 &param) const = 0;
242 
243  // compute the second derivates of the face at the parameter location
244  virtual void secondDer(const SPoint2 &param, SVector3 &dudu, SVector3 &dvdv, SVector3 &dudv) const = 0;
245 
246  // return the curvature computed as the divergence of the normal
247  inline double curvature(const SPoint2 &param) const
248  {
249  return curvatureMax(param);
250  }
251  virtual double curvatureDiv(const SPoint2 &param) const;
252 
253  // return the maximum curvature at a point
254  virtual double curvatureMax(const SPoint2 &param) const;
255 
256  // compute the min and max curvatures and the corresponding directions
257  // return the max curvature
258  virtual double curvatures(const SPoint2 &param, SVector3 &dirMax, SVector3 &dirMin, double &curvMax,
259  double &curvMin) const;
260 
261  // return a type-specific additional information string
262  virtual std::string getAdditionalInfoString(bool multline = false);
263 
264  // export in GEO format
265  virtual void writeGEO(FILE *fp);
266 
267  // export in Python
268  virtual void writePY(FILE *fp);
269 
270  // fill the crude representation cross
271  virtual bool buildRepresentationCross(bool force = false);
272 
273  // build an STL triangulation (or do nothing if it already exists,
274  // unless force=true)
275  virtual bool buildSTLTriangulation(bool force = false);
276 
277  // fill the vertex array using an STL triangulation
278  bool fillVertexArray(bool force = false);
279 
280  // store the STL triangulation as the mesh of the surface
281  bool storeSTLAsMesh();
282 
283  // recompute the mean plane of the surface from a list of points
284  void computeMeanPlane(const std::vector<MVertex *> &points);
285  void computeMeanPlane(const std::vector<SPoint3> &points);
286 
287  // recompute the mean plane of the surface from its bounding vertices
288  void computeMeanPlane();
289 
290  // get the mean plane info
291  void getMeanPlaneData(double VX[3], double VY[3], double &x, double &y, double &z) const;
292  void getMeanPlaneData(double plan[3][3]) const;
293 
294  // types of elements
295  virtual void getElementTypes(std::vector<int> &types) const
296  {
297  types.clear();
298  types.push_back(TYPE_TRI);
299  types.push_back(TYPE_QUA);
300  types.push_back(TYPE_POLYG);
301  };
302 
303  // get total/by-type number of elements in the mesh
304  std::size_t getNumMeshElements() const;
305  std::size_t getNumMeshElementsByType(const int familyType) const;
306  std::size_t getNumMeshParentElements();
307  void getNumMeshElements(unsigned *const c) const;
308 
309  // get the start of the array of a type of element
310  MElement *const *getStartElementType(int type) const;
311 
312  // get the element at the given index
313  MElement *getMeshElement(std::size_t index) const;
314  // get the element at the given index for a given familyType
315  MElement *getMeshElementByType(const int familyType, const std::size_t index) const;
316 
317  // reset the mesh attributes to default values
318  virtual void resetMeshAttributes();
319 
320  // for periodic faces, move parameters into the range chosen
321  // for that face
322  void moveToValidRange(SPoint2 &pt) const;
323 
324  // compute mesh statistics
325  void computeMeshSizeFieldAccuracy(double &avg, double &max_e, double &min_e, int &nE, int &GS);
326 
327  // add points (and optionally normals) in vectors so that two
328  // points are at most maxDist apart
329  bool fillPointCloud(double maxDist, std::vector<SPoint3> *points, std::vector<SPoint2> *uvpoints = nullptr,
330  std::vector<SVector3> *normals = nullptr);
331 
332  // tells if it's a sphere, and if it is, returns parameters
333  virtual bool isSphere(double &radius, SPoint3 &center) const
334  {
335  return false;
336  }
337 
338  // new interface for meshing
339  virtual void mesh(bool verbose);
340 
341  struct
342  {
343  // do we recombine the triangles of the mesh?
345  // what is the treshold angle for recombination
347  // is this surface meshed using a transfinite interpolation
348  char method;
349  // corners of the transfinite interpolation
350  std::vector<GVertex *> corners;
351  // all diagonals of the triangulation are left (-1), right (1) or
352  // alternated starting at right (2) or left (-2)
354  // do we smooth (transfinite) mesh? (<0 to use default smoothing)
356  // the extrusion parameters (if any)
358  // reverse mesh orientation
360  // global mesh size constraint for the surface
362  // do we force the meshing algorithm (if != 0)
364  // do we force calculation of mesh size from boundary (if >= 0)
366  // do we use a specific transfinite algorithm for 3-sided surfaces
369 
370  int getMeshingAlgo() const;
371  void setMeshingAlgo(int val)
372  {
373  meshAttributes.algorithm = val;
374  }
376  {
377  meshAttributes.algorithm = 0;
378  }
379  int getMeshSizeFromBoundary() const;
381  {
382  meshAttributes.meshSizeFromBoundary = val;
383  }
384  virtual double getMeshSize() const
385  {
386  return meshAttributes.meshSize;
387  }
388  virtual double getMeshSizeFactor() const
389  {
390  return meshAttributes.meshSizeFactor;
391  }
392 
393  struct
394  {
402 
403  // a crude graphical representation using a "cross" represented by points
404  // along u and v parameter lines
405  std::vector<std::vector<SPoint3>> cross[2];
406 
407  // the STL mesh
408  std::vector<SPoint2> stl_vertices_uv;
409  std::vector<SPoint3> stl_vertices_xyz;
410  std::vector<SVector3> stl_normals;
411  std::vector<SVector3> stl_curvatures;
412  std::vector<int> stl_triangles;
413 
414  // a vertex array containing a geometrical representation of the
415  // surface
417 
418  // a array for accessing the transfinite vertices using a pair of
419  // indices
420  std::vector<std::vector<MVertex *>> transfinite_vertices;
421 
422  // FIXME: testing for constrained packing of parallelogram algo
423  std::set<MVertex *> constr_vertices;
424 
425  // relocate mesh vertices using parametric coordinates
426  void relocateMeshVertices();
427 
428  std::vector<MTriangle *> triangles;
429  std::vector<MQuadrangle *> quadrangles;
430  std::vector<MPolygon *> polygons;
431 
432  // when a compound of surfaces is created, we keep track of the compound
433  // surface
435 
437  {
438  triangles.push_back(t);
439  }
441  {
442  quadrangles.push_back(q);
443  }
445  {
446  polygons.push_back(p);
447  }
448  void addElement(int type, MElement *e);
449  void removeElement(int type, MElement *e);
450  void removeElements(int type);
451 
452  // get the boundary layer columns
454  {
455  return &_columns;
456  }
457 
458  std::vector<SPoint3> storage1; // sizes and directions storage
459  std::vector<SVector3> storage2; // sizes and directions storage
460  std::vector<SVector3> storage3; // sizes and directions storage
461  std::vector<double> storage4; // sizes and directions storage
462 
463  virtual bool reorder(const int elementType, const std::vector<std::size_t> &ordering);
464 
465  virtual bool isFullyDiscrete();
466 };
467 
468 #endif
GFace::getMeshElementByType
MElement * getMeshElementByType(const int familyType, const std::size_t index) const
Definition: GFace.cpp:245
GFace::worst_element_shape
double worst_element_shape
Definition: GFace.h:397
GFace::transfinite3
bool transfinite3
Definition: GFace.h:367
GFace::nbGoodLength
int nbGoodLength
Definition: GFace.h:400
GFace::containsParam
virtual bool containsParam(const SPoint2 &pt)
Definition: GFace.cpp:1403
GFace::getOBB
virtual SOrientedBoundingBox getOBB()
Definition: GFace.cpp:292
GFace::edges
virtual std::vector< GEdge * > const & edges() const
Definition: GFace.h:121
GFace::getMeshSizeFromBoundary
int getMeshSizeFromBoundary() const
Definition: GFace.cpp:71
GFace::status
GEntity::MeshGenerationStatus status
Definition: GFace.h:395
GFace::firstDer
virtual Pair< SVector3, SVector3 > firstDer(const SPoint2 &param) const =0
GFace::embedded_edges
std::vector< GEdge * > embedded_edges
Definition: GFace.h:41
GFace::nbTriangle
int nbTriangle
Definition: GFace.h:399
GFace::getMeshingAlgo
int getMeshingAlgo() const
Definition: GFace.cpp:63
GFace::addQuadrangle
void addQuadrangle(MQuadrangle *q)
Definition: GFace.h:440
GFace::genusGeom
virtual int genusGeom() const
Definition: GFace.cpp:1763
GFace::getNumMeshParentElements
std::size_t getNumMeshParentElements()
Definition: GFace.cpp:198
GFace::setBoundEdges
void setBoundEdges(const std::vector< int > &tagEdges)
Definition: GFace.cpp:113
GFace::recombine
int recombine
Definition: GFace.h:344
GFace::edgeOrientations
virtual std::vector< int > const & edgeOrientations() const
Definition: GFace.h:139
GFace::getStartElementType
MElement *const * getStartElementType(int type) const
Definition: GFace.cpp:214
GFace::getEmbeddedVertices
std::vector< GVertex * > getEmbeddedVertices(bool force=false) const
Definition: GFace.cpp:355
GFace
Definition: GFace.h:33
GFace::triangles
std::vector< MTriangle * > triangles
Definition: GFace.h:428
GEntity::model
GModel * model() const
Definition: GEntity.h:277
SPoint2
Definition: SPoint2.h:12
GFace::delEdge
int delEdge(GEdge *edge)
Definition: GFace.cpp:86
GFace::getRegion
GRegion * getRegion(int const num) const
Definition: GFace.h:81
GEntity.h
GFace::getMetricEigenVectors
virtual void getMetricEigenVectors(const SPoint2 &param, double eigVal[2], double eigVec[4]) const
Definition: GFace.cpp:1074
c
static double c(int i, int j, fullMatrix< double > &CA, const std::vector< SPoint3 > &P, const std::vector< SPoint3 > &Q)
Definition: discreteFrechetDistance.cpp:15
GFace::algorithm
int algorithm
Definition: GFace.h:363
GFace::~GFace
virtual ~GFace()
Definition: GFace.cpp:52
GFace::relocateMeshVertices
void relocateMeshVertices()
Definition: GFace.cpp:2206
GFace::transfiniteArrangement
int transfiniteArrangement
Definition: GFace.h:353
GFace::method
char method
Definition: GFace.h:348
GFace::cross
std::vector< std::vector< SPoint3 > > cross[2]
Definition: GFace.h:405
GFace::setVisibility
virtual void setVisibility(char val, bool recursive=false)
Definition: GFace.cpp:406
GFace::addPolygon
void addPolygon(MPolygon *p)
Definition: GFace.h:444
GFace::extrude
ExtrudeParams * extrude
Definition: GFace.h:357
SPoint3
Definition: SPoint3.h:14
LegendrePolynomials::f
void f(int n, double u, double *val)
Definition: orthogonalBasis.cpp:77
GFace::isSphere
virtual bool isSphere(double &radius, SPoint3 &center) const
Definition: GFace.h:333
GFace::meshAttributes
struct GFace::@18 meshAttributes
GFace::orientations
virtual std::vector< int > const & orientations() const
Definition: GFace.h:114
GFace::point
virtual GPoint point(double par1, double par2) const =0
SVector3
Definition: SVector3.h:16
SOrientedBoundingBox
Definition: SOrientedBoundingBox.h:33
TYPE_TRI
#define TYPE_TRI
Definition: GmshDefines.h:66
GFace::addEmbeddedEdge
void addEmbeddedEdge(GEdge *e)
Definition: GFace.h:108
GEdgeLoop.h
VertexArray
Definition: VertexArray.h:151
GFace::curvature
double curvature(const SPoint2 &param) const
Definition: GFace.h:247
SVector3.h
GFace::getElementTypes
virtual void getElementTypes(std::vector< int > &types) const
Definition: GFace.h:295
GFace::getNumMeshElementsByType
std::size_t getNumMeshElementsByType(const int familyType) const
Definition: GFace.cpp:186
GFace::delRegion
void delRegion(GRegion *r)
Definition: GFace.h:75
BoundaryLayerColumns
Definition: boundaryLayersData.h:51
GFace::addRegion
void addRegion(GRegion *r)
Definition: GFace.h:69
GFace::meshSizeFactor
double meshSizeFactor
Definition: GFace.h:361
GFace::setEdge
void setEdge(GEdge *const f, int const orientation)
Definition: GFace.h:133
mean_plane
Definition: Numeric.h:33
GFace::unsetMeshingAlgo
void unsetMeshingAlgo()
Definition: GFace.h:375
GFace::dim
virtual int dim() const
Definition: GFace.h:175
GFace::setMeshSizeFromBoundary
void setMeshSizeFromBoundary(int val)
Definition: GFace.h:380
GEntity
Definition: GEntity.h:31
GPoint
Definition: GPoint.h:13
GFace::closestPoint
virtual GPoint closestPoint(const SPoint3 &queryPoint, const double initialGuess[2]) const
Definition: GFace.cpp:1323
GFace::regions
std::list< GRegion * > regions() const
Definition: GFace.h:92
Pair.h
GFace::l_dirs
std::vector< int > l_dirs
Definition: GFace.h:38
GFace::quadrangles
std::vector< MQuadrangle * > quadrangles
Definition: GFace.h:429
GFace::storage1
std::vector< SPoint3 > storage1
Definition: GFace.h:458
GFace::stl_curvatures
std::vector< SVector3 > stl_curvatures
Definition: GFace.h:411
GFace::vertices
virtual std::vector< GVertex * > vertices() const
Definition: GFace.cpp:390
GFace::meshSizeFromBoundary
int meshSizeFromBoundary
Definition: GFace.h:365
GFace::getMetricEigenvalue
virtual double getMetricEigenvalue(const SPoint2 &)
Definition: GFace.cpp:1066
GFace::stl_vertices_xyz
std::vector< SPoint3 > stl_vertices_xyz
Definition: GFace.h:409
GFace::r1
GRegion * r1
Definition: GFace.h:39
GFace::best_element_shape
double best_element_shape
Definition: GFace.h:397
GFace::embedded_vertices
std::set< GVertex *, GEntityPtrLessThan > embedded_vertices
Definition: GFace.h:42
GFace::constr_vertices
std::set< MVertex * > constr_vertices
Definition: GFace.h:423
GFace::longest_edge_length
double longest_edge_length
Definition: GFace.h:398
GFace::removeElements
void removeElements(int type)
Definition: GFace.cpp:2787
GFace::edgeLoops
std::vector< GEdgeLoop > edgeLoops
Definition: GFace.h:47
GFace::meshStatistics
struct GFace::@19 meshStatistics
GFace::secondDer
virtual void secondDer(const SPoint2 &param, SVector3 &dudu, SVector3 &dvdv, SVector3 &dudv) const =0
boundaryLayersData.h
GFace::recombineAngle
double recombineAngle
Definition: GFace.h:346
GVertex
Definition: GVertex.h:23
GFace::embeddedVertices
std::set< GVertex *, GEntityPtrLessThan > & embeddedVertices()
Definition: GFace.h:160
GFace::smallest_edge_length
double smallest_edge_length
Definition: GFace.h:398
GFace::containsEdge
bool containsEdge(int const iEdge) const
Definition: GFace.h:144
GFace::polygons
std::vector< MPolygon * > polygons
Definition: GFace.h:430
Numeric.h
GFace::curvatureDiv
virtual double curvatureDiv(const SPoint2 &param) const
Definition: GFace.cpp:962
GModel
Definition: GModel.h:44
GFace::addElement
void addElement(int type, MElement *e)
Definition: GFace.cpp:2739
GFace::fillVertexArray
bool fillVertexArray(bool force=false)
Definition: GFace.cpp:1656
GFace::meshSize
double meshSize
Definition: GFace.h:361
GFace::isFullyDiscrete
virtual bool isFullyDiscrete()
Definition: GFace.cpp:2945
GFace::getMeanPlaneData
void getMeanPlaneData(double VX[3], double VY[3], double &x, double &y, double &z) const
Definition: GFace.cpp:902
GFace::parFromPoint
virtual SPoint2 parFromPoint(const SPoint3 &, bool onSurface=true, bool convTestXYZ=false) const
Definition: GFace.cpp:1254
GFace::stl_normals
std::vector< SVector3 > stl_normals
Definition: GFace.h:410
GFace::point
virtual GPoint point(const SPoint2 &pt) const
Definition: GFace.h:211
GmshDefines.h
GFace::va_geom_triangles
VertexArray * va_geom_triangles
Definition: GFace.h:416
GFace::removeElement
void removeElement(int type, MElement *e)
Definition: GFace.cpp:2757
GFace::storage2
std::vector< SVector3 > storage2
Definition: GFace.h:459
GFace::resetMeshAttributes
virtual void resetMeshAttributes()
Definition: GFace.cpp:257
MElement
Definition: MElement.h:30
GFace::mesh
virtual void mesh(bool verbose)
Definition: GFace.cpp:2142
GFace::stl_triangles
std::vector< int > stl_triangles
Definition: GFace.h:412
GFace::bounds
virtual SBoundingBox3d bounds(bool fast=false)
Definition: GFace.cpp:273
GEntity::tag
int tag() const
Definition: GEntity.h:280
GFace::compoundSurface
GFace * compoundSurface
Definition: GFace.h:434
GFace::fillPointCloud
bool fillPointCloud(double maxDist, std::vector< SPoint3 > *points, std::vector< SPoint2 > *uvpoints=nullptr, std::vector< SVector3 > *normals=nullptr)
Definition: GFace.cpp:1782
GFace::checkTopology
virtual bool checkTopology() const
Definition: GFace.h:204
GRegion
Definition: GRegion.h:28
GFace::deleteMesh
virtual void deleteMesh()
Definition: GFace.cpp:160
GFace::numRegions
std::size_t numRegions() const
Definition: GFace.h:87
GFace::average_element_shape
double average_element_shape
Definition: GFace.h:397
GFace::getMeshElement
MElement * getMeshElement(std::size_t index) const
Definition: GFace.cpp:234
MTriangle
Definition: MTriangle.h:26
GFace::isOrphan
virtual bool isOrphan()
Definition: GFace.cpp:79
GFace::getColumns
BoundaryLayerColumns * getColumns()
Definition: GFace.h:453
GFace::getEmbeddedEdges
std::vector< GEdge * > getEmbeddedEdges(bool force=false) const
Definition: GFace.cpp:362
GFace::setMeshingAlgo
void setMeshingAlgo(int val)
Definition: GFace.h:371
TYPE_QUA
#define TYPE_QUA
Definition: GmshDefines.h:67
TYPE_POLYG
#define TYPE_POLYG
Definition: GmshDefines.h:72
GFace::getMeshSize
virtual double getMeshSize() const
Definition: GFace.h:384
SPoint2::x
double x(void) const
Definition: SPoint2.h:86
GFace::getAdditionalInfoString
virtual std::string getAdditionalInfoString(bool multline=false)
Definition: GFace.cpp:434
GFace::transfiniteSmoothing
int transfiniteSmoothing
Definition: GFace.h:355
GFace::storage3
std::vector< SVector3 > storage3
Definition: GFace.h:460
GFace::efficiency_index
double efficiency_index
Definition: GFace.h:398
GFace::setColor
virtual void setColor(unsigned int val, bool recursive=false)
Definition: GFace.cpp:420
GFace::edgeCounterparts
std::map< GEdge *, std::pair< GEdge *, int > > edgeCounterparts
Definition: GFace.h:50
GFace::embeddedEdges
std::vector< GEdge * > & embeddedEdges()
Definition: GFace.h:156
z
const double z
Definition: GaussQuadratureQuad.cpp:56
GFace::curvatureMax
virtual double curvatureMax(const SPoint2 &param) const
Definition: GFace.cpp:1020
GFace::computeMeshSizeFieldAccuracy
void computeMeshSizeFieldAccuracy(double &avg, double &max_e, double &min_e, int &nE, int &GS)
Definition: GFace.cpp:922
Pair
Definition: Pair.h:10
GEdge
Definition: GEdge.h:26
GFace::nbGoodQuality
int nbGoodQuality
Definition: GFace.h:400
GFace::meanPlane
mean_plane meanPlane
Definition: GFace.h:40
GFace::storeSTLAsMesh
bool storeSTLAsMesh()
Definition: GFace.cpp:1729
GFace::stl_vertices_uv
std::vector< SPoint2 > stl_vertices_uv
Definition: GFace.h:408
GFace::writePY
virtual void writePY(FILE *fp)
Definition: GFace.cpp:597
GFace::reorder
virtual bool reorder(const int elementType, const std::vector< std::size_t > &ordering)
Definition: GFace.cpp:2805
GFace::refineAllEdges
bool refineAllEdges
Definition: GFace.h:396
GFace::buildSTLTriangulation
virtual bool buildSTLTriangulation(bool force=false)
Definition: GFace.cpp:1585
GFace::transfinite_vertices
std::vector< std::vector< MVertex * > > transfinite_vertices
Definition: GFace.h:420
GFace::alignElementsWithMaster
void alignElementsWithMaster()
Definition: GFace.cpp:2879
GFace::setMeshMaster
void setMeshMaster(GFace *master, const std::vector< double > &)
Definition: GFace.cpp:2222
GPoint.h
MPolygon
Definition: MElementCut.h:198
GFace::GFace
GFace(GModel *model, int tag)
Definition: GFace.cpp:44
GFace::normal
virtual SVector3 normal(const SPoint2 &param) const
Definition: GFace.cpp:1416
GFace::addEmbeddedVertex
void addEmbeddedVertex(GVertex *v)
Definition: GFace.h:104
GFace::getEmbeddedMeshVertices
std::vector< MVertex * > getEmbeddedMeshVertices(bool force=false) const
Definition: GFace.cpp:369
GEntity::MeshGenerationStatus
MeshGenerationStatus
Definition: GEntity.h:130
GFace::getNumMeshElements
std::size_t getNumMeshElements() const
Definition: GFace.cpp:181
GFace::nbEdge
int nbEdge
Definition: GFace.h:399
GFace::l_edges
std::vector< GEdge * > l_edges
Definition: GFace.h:37
GFace::moveToValidRange
void moveToValidRange(SPoint2 &pt) const
Definition: GFace.cpp:2186
GFace::_columns
BoundaryLayerColumns _columns
Definition: GFace.h:44
ExtrudeParams
Definition: ExtrudeParams.h:26
GFace::XYZtoUV
void XYZtoUV(double X, double Y, double Z, double &U, double &V, double relax, bool onSurface=true, bool convTestXYZ=false) const
Definition: GFace.cpp:1144
GFace::r2
GRegion * r2
Definition: GFace.h:39
GFace::setOrientations
void setOrientations(const std::vector< int > &f)
Definition: GFace.h:129
GFace::curvatures
virtual double curvatures(const SPoint2 &param, SVector3 &dirMax, SVector3 &dirMin, double &curvMax, double &curvMin) const
Definition: GFace.cpp:1031
GFace::getMeshSizeFactor
virtual double getMeshSizeFactor() const
Definition: GFace.h:388
MQuadrangle
Definition: MQuadrangle.h:26
SBoundingBox3d
Definition: SBoundingBox3d.h:21
GFace::storage4
std::vector< double > storage4
Definition: GFace.h:461
GFace::reverseMesh
bool reverseMesh
Definition: GFace.h:359
GFace::writeGEO
virtual void writeGEO(FILE *fp)
Definition: GFace.cpp:530
GFace::buildRepresentationCross
virtual bool buildRepresentationCross(bool force=false)
Definition: GFace.cpp:1427
GFace::set
void set(const std::vector< GEdge * > &f)
Definition: GFace.h:125
GFace::computeMeanPlane
void computeMeanPlane()
Definition: GFace.cpp:645
GFace::getParentEntity
virtual GEntity * getParentEntity()
Definition: GFace.h:181
GFace::addTriangle
void addTriangle(MTriangle *t)
Definition: GFace.h:436
SPoint2.h
SPoint2::y
double y(void) const
Definition: SPoint2.h:88
GFace::corners
std::vector< GVertex * > corners
Definition: GFace.h:350