Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

problem with reading multi-domain mesh from gmsh

More
4 years 4 months ago #2221 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:
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.
More
4 years 4 months ago #2222 by christopher
As far as I remember, if you specify physical groups you need to specify them for all entities. Have you done that?
Best
The following user(s) said Thank You: liubenyuan
More
4 years 4 months ago #2227 by gcdiwan
Hi,
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.149 seconds