Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/ElmerGUI/netgen/libsrc/meshing/meshing3.hpp
3206 views
1
#ifndef FILE_MESHING3
2
#define FILE_MESHING3
3
4
5
6
7
enum MESHING3_RESULT
8
{
9
MESHING3_OK = 0,
10
MESHING3_GIVEUP = 1,
11
MESHING3_NEGVOL = 2,
12
MESHING3_OUTERSTEPSEXCEEDED = 3,
13
MESHING3_TERMINATE = 4,
14
MESHING3_BADSURFACEMESH = 5
15
};
16
17
18
/// 3d volume mesh generation
19
class Meshing3
20
{
21
/// current state of front
22
AdFront3 * adfront;
23
/// 3d generation rules
24
ARRAY<vnetrule*> rules;
25
/// counts how often a rule is used
26
ARRAY<int> ruleused, canuse, foundmap;
27
/// describes, why a rule is not applied
28
ARRAY<char*> problems;
29
/// tolerance criterion
30
double tolfak;
31
public:
32
///
33
Meshing3 (const string & rulefilename);
34
///
35
Meshing3 (const char ** rulep);
36
///
37
virtual ~Meshing3 ();
38
39
///
40
void LoadRules (const char * filename, const char ** prules);
41
///
42
MESHING3_RESULT GenerateMesh (Mesh & mesh, const MeshingParameters & mp);
43
44
///
45
int ApplyRules (ARRAY<Point3d> & lpoints, ARRAY<int> & allowpoint,
46
ARRAY<MiniElement2d> & lfaces, INDEX lfacesplit,
47
INDEX_2_HASHTABLE<int> & connectedpairs,
48
ARRAY<Element> & elements,
49
ARRAY<INDEX> & delfaces, int tolerance,
50
double sloppy, int rotind1,
51
float & retminerr);
52
53
///
54
PointIndex AddPoint (const Point3d & p, PointIndex globind);
55
///
56
void AddBoundaryElement (const Element2d & elem);
57
///
58
void AddBoundaryElement (const MiniElement2d & elem);
59
///
60
int AddConnectedPair (const INDEX_2 & pair);
61
62
///
63
void BlockFill (Mesh & mesh, double gh);
64
///
65
void BlockFillLocalH (Mesh & mesh, const MeshingParameters & mp);
66
67
/// uses points of adfront, and puts new elements into mesh
68
void Delaunay (Mesh & mesh, int domainnr, const MeshingParameters & mp);
69
///
70
friend class PlotVolMesh;
71
///
72
friend void TestRules ();
73
};
74
75
76
77
78
/// status of mesh generation
79
class MeshingStat3d
80
{
81
public:
82
///
83
MeshingStat3d ();
84
///
85
int cntsucc;
86
///
87
int cnttrials;
88
///
89
int cntelem;
90
///
91
int nff;
92
///
93
int qualclass;
94
///
95
double vol0;
96
///
97
double vol;
98
///
99
double h;
100
///
101
int problemindex;
102
};
103
104
105
106
107
108
/*
109
template <typename POINTARRAY, typename FACEARRAY>
110
extern int FindInnerPoint (POINTARRAY & grouppoints,
111
FACEARRAY & groupfaces,
112
Point3d & p);
113
114
*/
115
116
117
118
119
120
#endif
121
122
123
124
125
126
127
128
129
130
131
132