- Thank you received: 0
problem with reading multi-domain mesh from gmsh
4 years 11 months ago #2221
by gcdiwan
problem with reading multi-domain mesh from gmsh was created by gcdiwan
Hi NGSolve;
I am experiencing difficulties when reading a mesh created in GMSh that has more than 1 domains in it. Here is my python script:
I receive a segmentation fault:
importing NGSolve-6.2.1909
has no facedecoding: fd.size = 0, ind = 1
Caught SIGSEGV: segmentation fault
Collecting backtrace...
nm: 'python3': No such file
addr2line: 'python3': No such file
sh: 1: Syntax error: ")" unexpected
addr2line: 'python3': No such file
nm: 'python3': No such file
addr2line: 'python3': No such file
sh: 1: Syntax error: ")" unexpected
addr2line: 'python3': No such file
sh: 1: Syntax error: ")" unexpected
addr2line: 'python3': No such file
sh: 1: Syntax error: ")" unexpected
addr2line: 'python3': No such file
nm: 'python3': No such file
addr2line: 'python3': No such file
and where the mesh file unitsq.msh from gmsh looks like the following:
When i have a single subdomain, the code works fine. Any ideas what i could be doing wrong? Thanks.
I am experiencing difficulties when reading a mesh created in GMSh that has more than 1 domains in it. Here is my python script:
Code:
from ngsolve import *
from netgen.read_gmsh import ReadGmsh
# import the Gmsh file to a Netgen mesh object
mesh = ReadGmsh('./unitsq.msh')
I receive a segmentation fault:
importing NGSolve-6.2.1909
has no facedecoding: fd.size = 0, ind = 1
Caught SIGSEGV: segmentation fault
Collecting backtrace...
nm: 'python3': No such file
addr2line: 'python3': No such file
sh: 1: Syntax error: ")" unexpected
addr2line: 'python3': No such file
nm: 'python3': No such file
addr2line: 'python3': No such file
sh: 1: Syntax error: ")" unexpected
addr2line: 'python3': No such file
sh: 1: Syntax error: ")" unexpected
addr2line: 'python3': No such file
sh: 1: Syntax error: ")" unexpected
addr2line: 'python3': No such file
nm: 'python3': No such file
addr2line: 'python3': No such file
and where the mesh file unitsq.msh from gmsh looks like the following:
Code:
$MeshFormat
2.2 0 8
$EndMeshFormat
$PhysicalNames
2
2 1 "1"
2 2 "2"
$EndPhysicalNames
$Nodes
15
1 0 0 0
2 1 0 0
3 1 1 0
4 0 1 0
5 2 0 0
6 2 1 0
7 0.499999999998694 0 0
8 1 0.499999999998694 0
9 0.5000000000020591 1 0
10 0 0.5000000000020591 0
11 1.5 0 0
12 2 0.499999999998694 0
13 1.5 1 0
14 0.5000000000003766 0.5000000000003765 0
15 1.5 0.499999999998694 0
$EndNodes
$Elements
8
1 3 2 1 1 4 10 14 9
2 3 2 1 1 9 14 8 3
3 3 2 1 1 10 1 7 14
4 3 2 1 1 14 7 2 8
5 3 2 2 2 2 8 15 11
6 3 2 2 2 11 15 12 5
7 3 2 2 2 8 3 13 15
8 3 2 2 2 15 13 6 12
$EndElements
When i have a single subdomain, the code works fine. Any ideas what i could be doing wrong? Thanks.
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
4 years 11 months ago #2222
by christopher
Replied by christopher on topic problem with reading multi-domain mesh from gmsh
As far as I remember, if you specify physical groups you need to specify them for all entities. Have you done that?
Best
Best
The following user(s) said Thank You: liubenyuan
4 years 11 months ago #2227
by gcdiwan
Replied by gcdiwan on topic problem with reading multi-domain mesh from gmsh
Hi,
Yes, assigning the physical groups to all entities- starting with points and upto the highest dimensional entity - resolves the problem. Thank you.
Yes, assigning the physical groups to all entities- starting with points and upto the highest dimensional entity - resolves the problem. Thank you.
Time to create page: 0.121 seconds