<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7655.11">
<TITLE>RE: [Dune] Problems with GMSH reader and ALUGrid</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>I had a short look trying the read the attached gmsh file<BR>
through grid/io/file/dgfparser/utility/gmsh2dgf.<BR>
I get the same error:<BR>
Dune::IOError [read:../../../../../../dune/grid/io/file/gmshreader.hh:310]: expected $Nodes<BR>
Looking into the code gives:<BR>
readfile(file,1,"%s\n",buf);<BR>
if (strcmp(buf,"$EndMeshFormat")!=0)<BR>
DUNE_THROW(Dune::IOError, "expected $EndMeshFormat");<BR>
// node section<BR>
int number_of_nodes;<BR>
readfile(file,1,"%s\n",buf);<BR>
if (strcmp(buf,"$Nodes")!=0)<BR>
DUNE_THROW(Dune::IOError, "expected $Nodes");<BR>
So the reader expects the nodes block directly following the EndMeshFormat token.<BR>
In your file you have a block $PhysicalNames<BR>
and that apparently the problem.<BR>
<BR>
Could you open a flyspray task including the gmsh file please - and of course if<BR>
you can a patch for the reader - I do not know the gmsh format.<BR>
<BR>
Best<BR>
Andreas<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: dune-bounces+a.s.dedner=warwick.ac.uk@dune-project.org on behalf of Sacconi, Andrea<BR>
Sent: Fri 2/3/2012 3:32 PM<BR>
To: dune@dune-project.org<BR>
Subject: [Dune] Problems with GMSH reader and ALUGrid<BR>
<BR>
Hi everybody,<BR>
<BR>
I'm trying to build a grid of type ALUGrid starting from a .msh file.<BR>
My computational mesh is made only of tetrahedra, and has Physical entities, since when I wrote that file I needed them.<BR>
<BR>
Anyway, I can't manage to understand why it doesn't work. This (criptic) error appears on my screen:<BR>
<BR>
Reading 3d Gmsh grid...<BR>
version 2.2 Gmsh file detected<BR>
terminate called after throwing an instance of 'Dune::IOError'<BR>
Abort trap<BR>
<BR>
Here there are some short questions:<BR>
<BR>
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?<BR>
2) do Physical entities cause troubles in DUNE?<BR>
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?<BR>
<BR>
Many thanks in advance!<BR>
Cheers,<BR>
<BR>
Andrea<BR>
<BR>
____________________________________________________<BR>
<BR>
Andrea Sacconi<BR>
PhD student, Applied Mathematics<BR>
AMMP Section, Department of Mathematics, Imperial College London,<BR>
London SW7 2AZ, UK<BR>
a.sacconi11@imperial.ac.uk<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>