gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
meshGRegion.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 MESH_GREGION_H
7 #define MESH_GREGION_H
8 
9 #include <list>
10 #include <vector>
11 #include <map>
12 #include "MFace.h"
13 
14 class GModel;
15 class GRegion;
16 class GFace;
17 class GEdge;
18 class MVertex;
19 class MLine;
20 class MTriangle;
21 
22 // Create the mesh of the region
23 class meshGRegion {
24 public:
25  std::vector<GRegion *> &delaunay;
26  meshGRegion(std::vector<GRegion *> &d) : delaunay(d) {}
27  void operator()(GRegion *);
28 };
29 
31 public:
32  void operator()(GRegion *);
33 };
34 
35 // Optimize the mesh of the region using gmsh's algo
37 public:
38  void operator()(GRegion *, bool always = false);
39 };
40 
41 // Optimize the mesh of the region using netgen's algo
43 public:
44  void operator()(GRegion *, bool always = false);
45 };
46 
47 // destroy the mesh of the region
49 public:
50  void operator()(GRegion *);
51 };
52 
53 void MeshDelaunayVolume(std::vector<GRegion *> &delaunay);
57 void carveHole(GRegion *gr, int num, double distance,
58  std::vector<int> &surfaces);
59 
60 typedef std::map<MFace, GFace *, MFaceLessThan> fs_cont;
61 typedef std::multimap<MVertex *, std::pair<MLine *, GEdge *> > es_cont;
63  const fs_cont &search);
64 GFace *findInFaceSearchStructure(const MFace &f, const fs_cont &search);
66  const es_cont &search);
67 bool buildFaceSearchStructure(GModel *model, fs_cont &search,
68  bool onlyTriangles = false);
69 bool buildEdgeSearchStructure(GModel *model, es_cont &search);
70 
71 // hybrid mesh recovery structure
73 private:
74  std::map<MFace, MVertex *, MFaceLessThan> _quad;
75  std::map<MFace, GFace *, MFaceLessThan> _tri;
76 
77 public:
79  void add(const MFace &f, MVertex *v, GFace *gf);
80  std::map<MFace, GFace *, MFaceLessThan> &getTri() { return _tri; }
81  std::map<MFace, MVertex *, MFaceLessThan> &getQuad() { return _quad; }
82  int buildPyramids(GModel *gm);
83 };
84 
85 // adapt the mesh of a region
87 public:
88  void operator()(GRegion *);
89 };
90 
91 #endif
buildFaceSearchStructure
bool buildFaceSearchStructure(GModel *model, fs_cont &search, bool onlyTriangles=false)
Definition: meshGRegion.cpp:286
es_cont
std::multimap< MVertex *, std::pair< MLine *, GEdge * > > es_cont
Definition: meshGRegion.h:61
buildEdgeSearchStructure
bool buildEdgeSearchStructure(GModel *model, es_cont &search)
Definition: meshGRegion.cpp:313
distance
double distance(MVertex *v1, MVertex *v2)
Definition: MVertex.h:245
meshGRegionExtruded::operator()
void operator()(GRegion *)
Definition: meshGRegionExtruded.cpp:258
GFace
Definition: GFace.h:33
MVertex
Definition: MVertex.h:24
splitQuadRecovery::buildPyramids
int buildPyramids(GModel *gm)
Definition: meshGRegion.cpp:46
optimizeMeshGRegion
Definition: meshGRegion.h:36
LegendrePolynomials::f
void f(int n, double u, double *val)
Definition: orthogonalBasis.cpp:77
MLine
Definition: MLine.h:21
deMeshGRegion
Definition: meshGRegion.h:48
findInEdgeSearchStructure
GEdge * findInEdgeSearchStructure(MVertex *p1, MVertex *p2, const es_cont &search)
Definition: meshGRegion.cpp:350
MFace
Definition: MFace.h:20
SubdivideExtrudedMesh
int SubdivideExtrudedMesh(GModel *m)
Definition: meshGRegionExtruded.cpp:481
MFace.h
optimizeMeshGRegion::operator()
void operator()(GRegion *, bool always=false)
Definition: meshGRegion.cpp:268
optimizeMeshGRegionNetgen::operator()
void operator()(GRegion *, bool always=false)
Definition: meshGRegionNetgen.cpp:342
MeshTransfiniteVolume
int MeshTransfiniteVolume(GRegion *gr)
Definition: meshGRegionTransfinite.cpp:342
meshGRegion::delaunay
std::vector< GRegion * > & delaunay
Definition: meshGRegion.h:25
GModel
Definition: GModel.h:44
splitQuadRecovery::add
void add(const MFace &f, MVertex *v, GFace *gf)
Definition: meshGRegion.cpp:33
splitQuadRecovery::_quad
std::map< MFace, MVertex *, MFaceLessThan > _quad
Definition: meshGRegion.h:74
adaptMeshGRegion::operator()
void operator()(GRegion *)
Definition: meshGRegionDelaunayInsertion.cpp:686
splitQuadRecovery::getQuad
std::map< MFace, MVertex *, MFaceLessThan > & getQuad()
Definition: meshGRegion.h:81
splitQuadRecovery::splitQuadRecovery
splitQuadRecovery()
Definition: meshGRegion.h:78
deMeshGRegion::operator()
void operator()(GRegion *)
Definition: meshGRegion.cpp:227
meshGRegion::operator()
void operator()(GRegion *)
Definition: meshGRegion.cpp:234
splitQuadRecovery
Definition: meshGRegion.h:72
GRegion
Definition: GRegion.h:28
meshGRegionExtruded
Definition: meshGRegion.h:30
splitQuadRecovery::getTri
std::map< MFace, GFace *, MFaceLessThan > & getTri()
Definition: meshGRegion.h:80
MTriangle
Definition: MTriangle.h:26
adaptMeshGRegion
Definition: meshGRegion.h:86
meshGRegion
Definition: meshGRegion.h:23
GEdge
Definition: GEdge.h:26
optimizeMeshGRegionNetgen
Definition: meshGRegion.h:42
findInFaceSearchStructure
GFace * findInFaceSearchStructure(MVertex *p1, MVertex *p2, MVertex *p3, const fs_cont &search)
Definition: meshGRegion.cpp:333
CreateAnEmptyVolumeMesh
bool CreateAnEmptyVolumeMesh(GRegion *gr)
fs_cont
std::map< MFace, GFace *, MFaceLessThan > fs_cont
Definition: meshGRegion.h:60
MeshDelaunayVolume
void MeshDelaunayVolume(std::vector< GRegion * > &delaunay)
Definition: meshGRegion.cpp:95
splitQuadRecovery::_tri
std::map< MFace, GFace *, MFaceLessThan > _tri
Definition: meshGRegion.h:75
carveHole
void carveHole(GRegion *gr, int num, double distance, std::vector< int > &surfaces)
Definition: meshGRegionCarveHole.cpp:19
meshGRegion::meshGRegion
meshGRegion(std::vector< GRegion * > &d)
Definition: meshGRegion.h:26