Skip to content

Commit

Permalink
Merge pull request #53 from LIHPC-Computational-Geometry/gmsh_reader_…
Browse files Browse the repository at this point in the history
…ignore_1-node_points

gmsh reader ignore 1-node points
  • Loading branch information
ArzhelaR authored Sep 3, 2024
2 parents f904e1f + f3c8fa5 commit b546f6e
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 81 deletions.
172 changes: 91 additions & 81 deletions mesh_files/t1_tri.msh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ $MeshFormat
4.1 0 8
$EndMeshFormat
$PhysicalNames
1
3
0 1 "my_points_bot"
0 2 "my_points_top"
2 6 "My surface"
$EndPhysicalNames
$Entities
4 4 1 0
1 0 0 0 0
2 0.1 0 0 0
3 0.1 0.3 0 0
4 0 0.3 0 0
1 0 0 0 1 1
2 0.1 0 0 1 1
3 0.1 0.3 0 1 2
4 0 0.3 0 1 2
1 0 0 0 0.1 0 0 1 5 2 1 -2
2 0.1 0 0 0.1 0.3 0 1 5 2 3 -2
3 0 0.3 0 0.1 0.3 0 0 2 3 -4
Expand Down Expand Up @@ -110,84 +112,92 @@ $Nodes
0.02356698262373725 0.02488361418411697 0
$EndNodes
$Elements
4 75 1 75
8 79 1 79
0 1 15 1
1 1
0 2 15 1
2 2
0 3 15 1
3 3
0 4 15 1
4 4
1 1 1 3
1 1 5
2 5 6
3 6 2
5 1 5
6 5 6
7 6 2
1 2 1 8
4 3 7
5 7 8
6 8 9
7 9 10
8 10 11
9 11 12
10 12 13
11 13 2
8 3 7
9 7 8
10 8 9
11 9 10
12 10 11
13 11 12
14 12 13
15 13 2
1 4 1 8
12 4 16
13 16 17
14 17 18
15 18 19
16 19 20
17 20 21
18 21 22
19 22 1
16 4 16
17 16 17
18 17 18
19 18 19
20 19 20
21 20 21
22 21 22
23 22 1
2 1 2 56
20 27 25 29
21 25 27 30
22 27 26 30
23 26 27 31
24 28 26 31
25 26 28 32
26 25 33 35
27 28 34 36
28 29 25 35
29 32 28 36
30 11 10 26
31 20 21 28
32 9 8 25
33 18 19 27
34 26 10 30
35 18 27 29
36 9 25 30
37 27 19 31
38 20 28 31
39 11 26 32
40 8 7 33
41 21 22 34
42 16 17 35
43 13 12 36
44 17 18 29
45 10 9 30
46 19 20 31
47 12 11 32
48 33 23 35
49 34 24 36
50 14 15 23
51 5 6 24
52 25 8 33
53 28 21 34
54 17 29 35
55 12 32 36
56 7 3 38
57 4 16 37
58 22 1 40
59 2 13 39
60 15 4 37
61 3 14 38
62 6 2 39
63 1 5 40
64 34 22 40
65 33 7 38
66 13 36 39
67 16 35 37
68 24 34 40
69 23 33 38
70 36 24 39
71 35 23 37
72 14 23 38
73 23 15 37
74 5 24 40
75 24 6 39
24 27 25 29
25 25 27 30
26 27 26 30
27 26 27 31
28 28 26 31
29 26 28 32
30 25 33 35
31 28 34 36
32 29 25 35
33 32 28 36
34 11 10 26
35 20 21 28
36 9 8 25
37 18 19 27
38 26 10 30
39 18 27 29
40 9 25 30
41 27 19 31
42 20 28 31
43 11 26 32
44 8 7 33
45 21 22 34
46 16 17 35
47 13 12 36
48 17 18 29
49 10 9 30
50 19 20 31
51 12 11 32
52 33 23 35
53 34 24 36
54 14 15 23
55 5 6 24
56 25 8 33
57 28 21 34
58 17 29 35
59 12 32 36
60 7 3 38
61 4 16 37
62 22 1 40
63 2 13 39
64 15 4 37
65 3 14 38
66 6 2 39
67 1 5 40
68 34 22 40
69 33 7 38
70 13 36 39
71 16 35 37
72 24 34 40
73 23 33 38
74 36 24 39
75 35 23 37
76 14 23 38
77 23 15 37
78 5 24 40
79 24 6 39
$EndElements
2 changes: 2 additions & 0 deletions model/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ def read_gmsh(filename: string) -> Mesh:
faces.append([n0 - 1, n1 - 1, n2 - 1, n3 - 1])
elif elem_type == 1: # skip 2-node line elements
continue
elif elem_type == 15: # skip 1-node point elements
continue
else:
print("element_type " + str(elem_type) + " not handled")
exit(1)
Expand Down

0 comments on commit b546f6e

Please sign in to comment.