[Dune] Problems with GMSH reader and ALUGrid

Dedner, Andreas A.S.Dedner at warwick.ac.uk
Sat Feb 4 10:12:42 CET 2012


I had a short look trying the read the attached gmsh file 
through grid/io/file/dgfparser/utility/gmsh2dgf.
I get the same error:
Dune::IOError [read:../../../../../../dune/grid/io/file/gmshreader.hh:310]: expected $Nodes
Looking into the code gives:
            readfile(file,1,"%s\n",buf);
            if (strcmp(buf,"$EndMeshFormat")!=0)
                DUNE_THROW(Dune::IOError, "expected $EndMeshFormat");
            // node section
            int number_of_nodes;
            readfile(file,1,"%s\n",buf);
            if (strcmp(buf,"$Nodes")!=0)
                DUNE_THROW(Dune::IOError, "expected $Nodes");
So the reader expects the nodes block directly following the EndMeshFormat token.
In your file you have a block $PhysicalNames
and that apparently the problem.

Could you open a flyspray task including the gmsh file please - and of course if
you can a patch for the reader - I do not know the gmsh format.

Best
Andreas


-----Original Message-----
From: dune-bounces+a.s.dedner=warwick.ac.uk at dune-project.org on behalf of Sacconi, Andrea
Sent: Fri 2/3/2012 3:32 PM
To: dune at dune-project.org
Subject: [Dune] Problems with GMSH reader and ALUGrid
 
Hi everybody,

I'm trying to build a grid of type ALUGrid starting from a .msh file.
My computational mesh is made only of tetrahedra, and has Physical entities, since when I wrote that file I needed them.

Anyway, I can't manage to understand why it doesn't work. This (criptic) error appears on my screen:

Reading 3d Gmsh grid...
version 2.2 Gmsh file detected
terminate called after throwing an instance of 'Dune::IOError'
Abort trap

Here there are some short questions:

1) could somebody try to compile my .cc file (the .msh file is also attached), to see if it's only a problem on my computer?
2) do Physical entities cause troubles in DUNE?
3) what does the parameter "insert_boundary_segments = true" mean? Is there any relationship with the coding of the .msh file? Does selecting true or false make any difference in reading from a GMSH file?

Many thanks in advance!
Cheers,

Andrea

____________________________________________________

Andrea Sacconi
PhD student, Applied Mathematics
AMMP Section, Department of Mathematics, Imperial College London,
London SW7 2AZ, UK
a.sacconi11 at imperial.ac.uk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20120204/02341dad/attachment.htm>


More information about the Dune mailing list