Skip to content

Commit b546f6e

Browse files
authored
Merge pull request #53 from LIHPC-Computational-Geometry/gmsh_reader_ignore_1-node_points
gmsh reader ignore 1-node points
2 parents f904e1f + f3c8fa5 commit b546f6e

File tree

2 files changed

+93
-81
lines changed

2 files changed

+93
-81
lines changed

mesh_files/t1_tri.msh

Lines changed: 91 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ $MeshFormat
22
4.1 0 8
33
$EndMeshFormat
44
$PhysicalNames
5-
1
5+
3
6+
0 1 "my_points_bot"
7+
0 2 "my_points_top"
68
2 6 "My surface"
79
$EndPhysicalNames
810
$Entities
911
4 4 1 0
10-
1 0 0 0 0
11-
2 0.1 0 0 0
12-
3 0.1 0.3 0 0
13-
4 0 0.3 0 0
12+
1 0 0 0 1 1
13+
2 0.1 0 0 1 1
14+
3 0.1 0.3 0 1 2
15+
4 0 0.3 0 1 2
1416
1 0 0 0 0.1 0 0 1 5 2 1 -2
1517
2 0.1 0 0 0.1 0.3 0 1 5 2 3 -2
1618
3 0 0.3 0 0.1 0.3 0 0 2 3 -4
@@ -110,84 +112,92 @@ $Nodes
110112
0.02356698262373725 0.02488361418411697 0
111113
$EndNodes
112114
$Elements
113-
4 75 1 75
115+
8 79 1 79
116+
0 1 15 1
117+
1 1
118+
0 2 15 1
119+
2 2
120+
0 3 15 1
121+
3 3
122+
0 4 15 1
123+
4 4
114124
1 1 1 3
115-
1 1 5
116-
2 5 6
117-
3 6 2
125+
5 1 5
126+
6 5 6
127+
7 6 2
118128
1 2 1 8
119-
4 3 7
120-
5 7 8
121-
6 8 9
122-
7 9 10
123-
8 10 11
124-
9 11 12
125-
10 12 13
126-
11 13 2
129+
8 3 7
130+
9 7 8
131+
10 8 9
132+
11 9 10
133+
12 10 11
134+
13 11 12
135+
14 12 13
136+
15 13 2
127137
1 4 1 8
128-
12 4 16
129-
13 16 17
130-
14 17 18
131-
15 18 19
132-
16 19 20
133-
17 20 21
134-
18 21 22
135-
19 22 1
138+
16 4 16
139+
17 16 17
140+
18 17 18
141+
19 18 19
142+
20 19 20
143+
21 20 21
144+
22 21 22
145+
23 22 1
136146
2 1 2 56
137-
20 27 25 29
138-
21 25 27 30
139-
22 27 26 30
140-
23 26 27 31
141-
24 28 26 31
142-
25 26 28 32
143-
26 25 33 35
144-
27 28 34 36
145-
28 29 25 35
146-
29 32 28 36
147-
30 11 10 26
148-
31 20 21 28
149-
32 9 8 25
150-
33 18 19 27
151-
34 26 10 30
152-
35 18 27 29
153-
36 9 25 30
154-
37 27 19 31
155-
38 20 28 31
156-
39 11 26 32
157-
40 8 7 33
158-
41 21 22 34
159-
42 16 17 35
160-
43 13 12 36
161-
44 17 18 29
162-
45 10 9 30
163-
46 19 20 31
164-
47 12 11 32
165-
48 33 23 35
166-
49 34 24 36
167-
50 14 15 23
168-
51 5 6 24
169-
52 25 8 33
170-
53 28 21 34
171-
54 17 29 35
172-
55 12 32 36
173-
56 7 3 38
174-
57 4 16 37
175-
58 22 1 40
176-
59 2 13 39
177-
60 15 4 37
178-
61 3 14 38
179-
62 6 2 39
180-
63 1 5 40
181-
64 34 22 40
182-
65 33 7 38
183-
66 13 36 39
184-
67 16 35 37
185-
68 24 34 40
186-
69 23 33 38
187-
70 36 24 39
188-
71 35 23 37
189-
72 14 23 38
190-
73 23 15 37
191-
74 5 24 40
192-
75 24 6 39
147+
24 27 25 29
148+
25 25 27 30
149+
26 27 26 30
150+
27 26 27 31
151+
28 28 26 31
152+
29 26 28 32
153+
30 25 33 35
154+
31 28 34 36
155+
32 29 25 35
156+
33 32 28 36
157+
34 11 10 26
158+
35 20 21 28
159+
36 9 8 25
160+
37 18 19 27
161+
38 26 10 30
162+
39 18 27 29
163+
40 9 25 30
164+
41 27 19 31
165+
42 20 28 31
166+
43 11 26 32
167+
44 8 7 33
168+
45 21 22 34
169+
46 16 17 35
170+
47 13 12 36
171+
48 17 18 29
172+
49 10 9 30
173+
50 19 20 31
174+
51 12 11 32
175+
52 33 23 35
176+
53 34 24 36
177+
54 14 15 23
178+
55 5 6 24
179+
56 25 8 33
180+
57 28 21 34
181+
58 17 29 35
182+
59 12 32 36
183+
60 7 3 38
184+
61 4 16 37
185+
62 22 1 40
186+
63 2 13 39
187+
64 15 4 37
188+
65 3 14 38
189+
66 6 2 39
190+
67 1 5 40
191+
68 34 22 40
192+
69 33 7 38
193+
70 13 36 39
194+
71 16 35 37
195+
72 24 34 40
196+
73 23 33 38
197+
74 36 24 39
198+
75 35 23 37
199+
76 14 23 38
200+
77 23 15 37
201+
78 5 24 40
202+
79 24 6 39
193203
$EndElements

model/reader.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ def read_gmsh(filename: string) -> Mesh:
103103
faces.append([n0 - 1, n1 - 1, n2 - 1, n3 - 1])
104104
elif elem_type == 1: # skip 2-node line elements
105105
continue
106+
elif elem_type == 15: # skip 1-node point elements
107+
continue
106108
else:
107109
print("element_type " + str(elem_type) + " not handled")
108110
exit(1)

0 commit comments

Comments
 (0)