1 // Gmsh - Copyright (C) 1997-2021 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 GMSH_DEFINES_H
7 #define GMSH_DEFINES_H
8 
9 // IO file formats (numbers should not be changed)
10 #define FORMAT_MSH          1
11 #define FORMAT_UNV          2
12 #define FORMAT_XPM          4
13 #define FORMAT_PS           5
14 #define FORMAT_BMP          6
15 #define FORMAT_GIF          7
16 #define FORMAT_GEO          8
17 #define FORMAT_JPEG         9
18 #define FORMAT_AUTO         10
19 #define FORMAT_PPM          11
20 #define FORMAT_YUV          12
21 #define FORMAT_OPT          15
22 #define FORMAT_VTK          16
23 #define FORMAT_MPEG         17
24 #define FORMAT_TEX          18
25 #define FORMAT_VRML         19
26 #define FORMAT_EPS          20
27 #define FORMAT_MAIL         21
28 #define FORMAT_PNG          22
29 #define FORMAT_TXT          23
30 #define FORMAT_PDF          24
31 #define FORMAT_RMED         25
32 #define FORMAT_POS          26
33 #define FORMAT_STL          27
34 #define FORMAT_P3D          28
35 #define FORMAT_SVG          29
36 #define FORMAT_MESH         30
37 #define FORMAT_BDF          31
38 #define FORMAT_CGNS         32
39 #define FORMAT_MED          33
40 #define FORMAT_DIFF         34
41 #define FORMAT_BREP         35
42 #define FORMAT_STEP         36
43 #define FORMAT_IGES         37
44 #define FORMAT_IR3          38
45 #define FORMAT_INP          39
46 #define FORMAT_PLY2         40
47 #define FORMAT_CELUM        41
48 #define FORMAT_SU2          42
49 #define FORMAT_MPEG_PREVIEW 43
50 #define FORMAT_PGF          44
51 #define FORMAT_PVTU         45
52 #define FORMAT_X3D          46
53 #define FORMAT_TOCHNOG      47
54 #define FORMAT_TIKZ         48
55 #define FORMAT_NEU          49
56 #define FORMAT_MATLAB       50
57 #define FORMAT_KEY          51
58 #define FORMAT_XMT          52
59 #define FORMAT_OFF          53
60 
61 // Element types
62 #define TYPE_PNT     1
63 #define TYPE_LIN     2
64 #define TYPE_TRI     3
65 #define TYPE_QUA     4
66 #define TYPE_TET     5
67 #define TYPE_PYR     6
68 #define TYPE_PRI     7
69 #define TYPE_HEX     8
70 #define TYPE_POLYG   9
71 #define TYPE_POLYH   10
72 #define TYPE_XFEM    11
73 #define TYPE_MINI    12
74 #define TYPE_TRIH    13
75 #define TYPE_MAX_NUM 13 // keep this up-to-date when adding new type
76 
77 // Element types in .msh file format (numbers should not be changed)
78 #define MSH_LIN_2    1
79 #define MSH_TRI_3    2
80 #define MSH_QUA_4    3
81 #define MSH_TET_4    4
82 #define MSH_HEX_8    5
83 #define MSH_PRI_6    6
84 #define MSH_PYR_5    7
85 #define MSH_LIN_3    8
86 #define MSH_TRI_6    9
87 #define MSH_QUA_9    10
88 #define MSH_TET_10   11
89 #define MSH_HEX_27   12
90 #define MSH_PRI_18   13
91 #define MSH_PYR_14   14
92 #define MSH_PNT      15
93 #define MSH_QUA_8    16
94 #define MSH_HEX_20   17
95 #define MSH_PRI_15   18
96 #define MSH_PYR_13   19
97 #define MSH_TRI_9    20
98 #define MSH_TRI_10   21
99 #define MSH_TRI_12   22
100 #define MSH_TRI_15   23
101 #define MSH_TRI_15I  24
102 #define MSH_TRI_21   25
103 #define MSH_LIN_4    26
104 #define MSH_LIN_5    27
105 #define MSH_LIN_6    28
106 #define MSH_TET_20   29
107 #define MSH_TET_35   30
108 #define MSH_TET_56   31
109 #define MSH_TET_22   32
110 #define MSH_TET_28   33
111 #define MSH_POLYG_   34
112 #define MSH_POLYH_   35
113 #define MSH_QUA_16   36
114 #define MSH_QUA_25   37
115 #define MSH_QUA_36   38
116 #define MSH_QUA_12   39
117 #define MSH_QUA_16I  40
118 #define MSH_QUA_20   41
119 #define MSH_TRI_28   42
120 #define MSH_TRI_36   43
121 #define MSH_TRI_45   44
122 #define MSH_TRI_55   45
123 #define MSH_TRI_66   46
124 #define MSH_QUA_49   47
125 #define MSH_QUA_64   48
126 #define MSH_QUA_81   49
127 #define MSH_QUA_100  50
128 #define MSH_QUA_121  51
129 #define MSH_TRI_18   52
130 #define MSH_TRI_21I  53
131 #define MSH_TRI_24   54
132 #define MSH_TRI_27   55
133 #define MSH_TRI_30   56
134 #define MSH_QUA_24   57
135 #define MSH_QUA_28   58
136 #define MSH_QUA_32   59
137 #define MSH_QUA_36I  60
138 #define MSH_QUA_40   61
139 #define MSH_LIN_7    62
140 #define MSH_LIN_8    63
141 #define MSH_LIN_9    64
142 #define MSH_LIN_10   65
143 #define MSH_LIN_11   66
144 #define MSH_LIN_B    67
145 #define MSH_TRI_B    68
146 #define MSH_POLYG_B  69
147 #define MSH_LIN_C    70
148 // TETS COMPLETE (6->10)
149 #define MSH_TET_84   71
150 #define MSH_TET_120  72
151 #define MSH_TET_165  73
152 #define MSH_TET_220  74
153 #define MSH_TET_286  75
154 // TETS INCOMPLETE (6->10)
155 #define MSH_TET_34   79
156 #define MSH_TET_40   80
157 #define MSH_TET_46   81
158 #define MSH_TET_52   82
159 #define MSH_TET_58   83
160 //
161 #define MSH_LIN_1    84
162 #define MSH_TRI_1    85
163 #define MSH_QUA_1    86
164 #define MSH_TET_1    87
165 #define MSH_HEX_1    88
166 #define MSH_PRI_1    89
167 #define MSH_PRI_40   90
168 #define MSH_PRI_75   91
169 // HEXES COMPLETE (3->9)
170 #define MSH_HEX_64   92
171 #define MSH_HEX_125  93
172 #define MSH_HEX_216  94
173 #define MSH_HEX_343  95
174 #define MSH_HEX_512  96
175 #define MSH_HEX_729  97
176 #define MSH_HEX_1000 98
177 // HEXES INCOMPLETE (3->9)
178 #define MSH_HEX_32   99
179 #define MSH_HEX_44   100
180 #define MSH_HEX_56   101
181 #define MSH_HEX_68   102
182 #define MSH_HEX_80   103
183 #define MSH_HEX_92   104
184 #define MSH_HEX_104  105
185 // PRISMS COMPLETE (5->9)
186 #define MSH_PRI_126  106
187 #define MSH_PRI_196  107
188 #define MSH_PRI_288  108
189 #define MSH_PRI_405  109
190 #define MSH_PRI_550  110
191 // PRISMS INCOMPLETE (3->9)
192 #define MSH_PRI_24   111
193 #define MSH_PRI_33   112
194 #define MSH_PRI_42   113
195 #define MSH_PRI_51   114
196 #define MSH_PRI_60   115
197 #define MSH_PRI_69   116
198 #define MSH_PRI_78   117
199 // PYRAMIDS COMPLETE (3->9)
200 #define MSH_PYR_30   118
201 #define MSH_PYR_55   119
202 #define MSH_PYR_91   120
203 #define MSH_PYR_140  121
204 #define MSH_PYR_204  122
205 #define MSH_PYR_285  123
206 #define MSH_PYR_385  124
207 // PYRAMIDS INCOMPLETE (3->9)
208 #define MSH_PYR_21   125
209 #define MSH_PYR_29   126
210 #define MSH_PYR_37   127
211 #define MSH_PYR_45   128
212 #define MSH_PYR_53   129
213 #define MSH_PYR_61   130
214 #define MSH_PYR_69   131
215 // Additional types
216 #define MSH_PYR_1    132
217 #define MSH_PNT_SUB  133
218 #define MSH_LIN_SUB  134
219 #define MSH_TRI_SUB  135
220 #define MSH_TET_SUB  136
221 #define MSH_TET_16   137
222 #define MSH_TRI_MINI 138
223 #define MSH_TET_MINI 139
224 #define MSH_TRIH_4   140
225 #define MSH_MAX_NUM  140 // keep this up-to-date when adding new type
226 
227 // Geometric entities
228 #define ENT_NONE    0
229 #define ENT_POINT   (1<<0)
230 #define ENT_CURVE   (1<<1)
231 #define ENT_SURFACE (1<<2)
232 #define ENT_VOLUME  (1<<3)
233 #define ENT_ALL     (ENT_POINT | ENT_CURVE | ENT_SURFACE | ENT_VOLUME)
234 
235 // 2D meshing algorithms (numbers should not be changed)
236 #define ALGO_2D_MESHADAPT         1
237 #define ALGO_2D_AUTO              2
238 #define ALGO_2D_INITIAL_ONLY      3
239 #define ALGO_2D_DELAUNAY          5
240 #define ALGO_2D_FRONTAL           6
241 #define ALGO_2D_BAMG              7
242 #define ALGO_2D_FRONTAL_QUAD      8
243 #define ALGO_2D_PACK_PRLGRMS      9
244 #define ALGO_2D_PACK_PRLGRMS_CSTR 10
245 #define ALGO_2D_QUAD_QUASI_STRUCT 11
246 
247 // 3D meshing algorithms (numbers should not be changed)
248 #define ALGO_3D_DELAUNAY     1
249 #define ALGO_3D_INITIAL_ONLY 3
250 #define ALGO_3D_FRONTAL      4
251 #define ALGO_3D_MMG3D        7
252 #define ALGO_3D_RTREE        9
253 #define ALGO_3D_HXT          10
254 
255 // Meshing methods
256 #define MESH_NONE         0
257 #define MESH_TRANSFINITE  1
258 #define MESH_UNSTRUCTURED 2
259 
260 // QuadTri options (structured/unstructured coupling with pyramids)
261 #define NO_QUADTRI                0
262 #define QUADTRI_ADDVERTS_1        1
263 #define QUADTRI_ADDVERTS_1_RECOMB 2
264 #define QUADTRI_NOVERTS_1         3
265 #define QUADTRI_NOVERTS_1_RECOMB  4
266 #define TRANSFINITE_QUADTRI_1     5
267 
268 #endif
269