<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Times New Roman \, serif";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Dear Paul,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">See the attached .msh file.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I&#8217;m using gmsh 2.6.1 (windows version, had problems compiling on linux) and Python 2.4.3 (linux)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Regards, Wouter<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext"> cig-seismo-bounces@geodynamics.org [mailto:cig-seismo-bounces@geodynamics.org]
<b>On Behalf Of </b>Paul Cristini<br>
<b>Sent:</b> Wednesday, February 20, 2013 6:04 PM<br>
<b>To:</b> cig-seismo@geodynamics.org<br>
<b>Subject:</b> Re: [CIG-SEISMO] python LibGmsh2Specfem_convert_Gmsh_to_Specfem2D_official.py<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">Dear Wouter,<br>
<br>
It is working with the provided .msh file. So can you send your .msh file ? It seems that it is not correctly generated. Which version of gmsh are you using and also which version of python ?<br>
<br>
Thanks<br>
<br>
Best regards<br>
<br>
Paul Cristini<br>
<br>
<br>
Le 20/02/2013 17:35, Wouter Kimman a écrit&nbsp;:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:12.0pt">Dear Specfem2D users and developers,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt">My question is regarding the use of Gmsh for SPECfem2d. I was unable to reproduce the mesh given in the example (SqrCirc.msh). If I load the .geo file in Gmsh, compute the mesh and run the python file I get
 the error listed below. </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt">I expect I&#8217;m doing something wrong in the generation of the mesh since I don&#8217;t have this error if I use the existing .msh file (also the mesh looks different).</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Any pointers as to what parameters in the Gmsh generation I should change to obtain a working mesh? Or does this suggest there is error in the python script?</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Thanks and best regards,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Wouter Kimman</span><o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Times New Roman , serif&quot;,&quot;serif&quot;">python LibGmsh2Specfem_convert_Gmsh_to_Specfem2D_official.py SqrCirc.msh -t F -l A -b A -r A</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Times New Roman , serif&quot;,&quot;serif&quot;">#################### STARTING PROCESSING ####################</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Times New Roman , serif&quot;,&quot;serif&quot;">File :&nbsp; SqrCirc.msh</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Times New Roman , serif&quot;,&quot;serif&quot;">------------------------------------------------------------</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Times New Roman , serif&quot;,&quot;serif&quot;">Traceback (most recent call last):</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Times New Roman , serif&quot;,&quot;serif&quot;">&nbsp; File &quot;LibGmsh2Specfem_convert_Gmsh_to_Specfem2D_official.py&quot;, line 433, in &lt;module&gt;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Times New Roman , serif&quot;,&quot;serif&quot;">&nbsp;&nbsp;&nbsp; OuvreGmsh('',Fic, Bords)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Times New Roman , serif&quot;,&quot;serif&quot;">&nbsp; File &quot;LibGmsh2Specfem_convert_Gmsh_to_Specfem2D_official.py&quot;, line 63, in OuvreGmsh</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Times New Roman , serif&quot;,&quot;serif&quot;">&nbsp;&nbsp;&nbsp; TypElem1D = int(string.split(lignes[PosElem&#43;2])[1])</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Times New Roman , serif&quot;,&quot;serif&quot;">UnboundLocalError: local variable 'PosElem' referenced before assignment</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Times New Roman , serif&quot;,&quot;serif&quot;">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">Wouter&nbsp; Kimman</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">Schlumberger House, Buckingham Gate<br>
Gatwick, RH6 0NZ, United Kingdom</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D"><a href="tel:&#43;44%201293%20556709"><b><span style="color:#1F497D;text-decoration:none">&#43;44 1293 556709</span></b></a></span><o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>CIG-SEISMO mailing list<o:p></o:p></pre>
<pre><a href="mailto:CIG-SEISMO@geodynamics.org">CIG-SEISMO@geodynamics.org</a><o:p></o:p></pre>
<pre><a href="http://geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo">http://geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>-- <o:p></o:p></pre>
<pre>*--------------------------------------------------------------------------*<o:p></o:p></pre>
<pre> Paul CRISTINI&nbsp; Charge de Recherche CNRS / CNRS Research Scientist<o:p></o:p></pre>
<pre> --------<o:p></o:p></pre>
<pre> CNRS - Laboratoire de Mecanique et d'Acoustique (UPR 7051)<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre> 31 chemin Joseph Aiguier, F-13402 Marseille Cedex 20 - France<o:p></o:p></pre>
<pre> mailto: <a href="mailto:cristini@lma.cnrs-mrs.fr">cristini@lma.cnrs-mrs.fr</a><o:p></o:p></pre>
<pre> phone number: &#43;33 (0)4 91 16 42 89<o:p></o:p></pre>
<pre> fax number: &#43;33 (0)4 91 16 44 81<o:p></o:p></pre>
<pre> <a href="http://www.lma.cnrs-mrs.fr/">http://www.lma.cnrs-mrs.fr/</a><o:p></o:p></pre>
<pre>*--------------------------------------------------------------------------*<o:p></o:p></pre>
</div>
</body>
</html>