[CIG-SEISMO] python LibGmsh2Specfem_convert_Gmsh_to_Specfem2D_official.py

Wouter Kimman WKimman at slb.com
Wed Feb 20 08:35:26 PST 2013


Dear Specfem2D users and developers,

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.

I expect I'm doing something wrong in the generation of the mesh since I don't have this error if I use the existing .msh file (also the mesh looks different).

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?

Thanks and best regards,
Wouter Kimman


python LibGmsh2Specfem_convert_Gmsh_to_Specfem2D_official.py SqrCirc.msh -t F -l A -b A -r A
#################### STARTING PROCESSING ####################
File :  SqrCirc.msh
------------------------------------------------------------
Traceback (most recent call last):
  File "LibGmsh2Specfem_convert_Gmsh_to_Specfem2D_official.py", line 433, in <module>
    OuvreGmsh('',Fic, Bords)
  File "LibGmsh2Specfem_convert_Gmsh_to_Specfem2D_official.py", line 63, in OuvreGmsh
    TypElem1D = int(string.split(lignes[PosElem+2])[1])
UnboundLocalError: local variable 'PosElem' referenced before assignment



Wouter  Kimman
Schlumberger House, Buckingham Gate
Gatwick, RH6 0NZ, United Kingdom
+44 1293 556709<tel:+44%201293%20556709>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://geodynamics.org/pipermail/cig-seismo/attachments/20130220/8adc1462/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scr_gmsh2.png
Type: image/png
Size: 147967 bytes
Desc: scr_gmsh2.png
Url : http://geodynamics.org/pipermail/cig-seismo/attachments/20130220/8adc1462/attachment-0001.png 


More information about the CIG-SEISMO mailing list