<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">I had a look at your .geo and I found a
      small error. Your three line loops are not defined in the same
      way. The first is counterclokwise, the second is clockwise and the
      third one is counterclockwise. All should be defined
      counterclockwise.<br>
      So you need to change Line Loop(13) = {3, 5, 6, 7}; to Line
      Loop(13) = {-3, -5, -6, -7};<br>
      and it will work. I checked<br>
      <br>
      Best regards<br>
      <br>
      Paul Cristini<br>
      <br>
      Le 06/09/2012 16:41, <a class="moz-txt-link-abbreviated" href="mailto:giuseppe.digiulio@ingv.it">giuseppe.digiulio@ingv.it</a> a &eacute;crit&nbsp;:<br>
    </div>
    <blockquote
      cite="mid:20120906164109.17880dcqnwkrm0aw@webmail.rm.ingv.it"
      type="cite">I am a new user of specfem2D&nbsp; and I am trying to
      generate an external simple 2D mesh using gmsh; this seems&nbsp; one
      nice external fe grid generator as indicated by specfem2d user&nbsp;
      manual (version 7, page 10).
      <br>
      <br>
      My question is about Jacobian as returned by the&nbsp; script
      xcheck_quality_external_mesh.
      <br>
      <br>
      I built using gmsh a simple geometry file composed of three
      uniform layers (see the attached&nbsp; *geo file).
      <br>
      <br>
      I performed a 2D mesh using allquads following the example shown
      in specfem2D manual&nbsp; (fixing a minimum element size of 20 because
      dimension of my model is&nbsp; relatively big).
      <br>
      <br>
      gmsh 3UFscale_allquad.geo -2 -clmin 20 -order 2
      <br>
      <br>
      I set the absorbing conditions with the python script
      <br>
      python ../LibGmsh2Specfem.py 3UFscale_allquad -t A -b A -r A -l A
      <br>
      <br>
      obtaining the Mesh* Material* Nodes* Surf_abs_* and Surf_free*
      files.
      <br>
      <br>
      Now my problem is in the quality of my mesh as returned by&nbsp;&nbsp;
      xcheck_quality_external_mesh because it returns negative jacobian.
      <br>
      <br>
      xcheck_quality_external_mesh
      <br>
      :::::::
      <br>
      start reading the external node file: Nodes_3UFscale_allquad
      <br>
      start reading the external mesh file: Mesh_3UFscale_allquad
      <br>
      NPOIN =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12663
      <br>
      NSPEC =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12462
      <br>
      done reading the external files
      <br>
      <br>
      start checking if any element with a negative Jacobian is found
      <br>
      element&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6251&nbsp; has a negative Jacobian
      <br>
      STOP negative Jacobian found
      <br>
      ::::::
      <br>
      <br>
      I do not know how can I improve my mesh to pass this check; I try
      to delete the element 6251&nbsp; with negative Jacobian but this is not
      the only one. I tried different&nbsp; options in the 2D meshing, but
      still obtaining negative jacobian.
      <br>
      <br>
      And it is also strange that the&nbsp; Jmin seems 0.497 when I use
      Tool/plugins og gmsh to analyseCurveMesh (see picture in attach).
      If I understood well from gmsh manual (pa. 66) Jmin should be the
      minimum Jacobian and this seems not negative.
      <br>
      <br>
      I also attached the output files output_mesher.txt and
      output_solver.txt obtained by xmeshfem2D and xspecfem2D,
      respectively.
      <br>
      Of course xspecfem2D crashs, and all elements with negative
      Jacobian are reported into output_solver.txt.
      <br>
      <br>
      So my question is: how can I improve my external 2D mesh built by
      gmsh for having positive jacobian everywhere&nbsp; ?
      <br>
      <br>
      If someone of developpers has any suggestions to improve my mesh
      deleting elements with negative jacobian in my&nbsp; mesh, these are
      welcome!!!
      <br>
      <br>
      The file *tar.gz contains my trial of mesh
      <br>
      <br>
      Best regards and thank you in advance!
      <br>
      <br>
      Giuseppe Di Giulio
      <br>
      ----------------------------------------------------------------
      <br>
      <br>
      Il contenuto di questa e-mail e' rivolto unicamente alle persone
      cui e' indirizzato, e puo'
      <br>
      contenere informazioni la cui riservatezza e' tutelata.
      <br>
      E' proibita la copia, la divulgazione o l'uso di questo messaggio
      o dell'informazione ivi
      <br>
      contenuta da chiunque altro che non sia il destinatario indicato.
      <br>
      Se avete ricevuto questa e-mail per errore, vogliate cortesemente
      <br>
      comunicarlo immediatamente per telefono, fax o e-mail. Grazie.
      <br>
      <br>
      This e-mail is intended only for person or entity to which is
      addressed and may contain
      <br>
      information that is privileged, confidential or otherwise
      protected from disclosure.
      <br>
      Copying, dissemination or use of this e-mail or the information
      herein
      <br>
      by anyone other than the intended recipient is prohibited.
      <br>
      If you have received this
      <br>
      e-mail by mistake, please notify us immediately by telephone, fax
      or e-mail.
      <br>
      Thank you.
      <br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
CIG-SEISMO mailing list
<a class="moz-txt-link-abbreviated" href="mailto:CIG-SEISMO@geodynamics.org">CIG-SEISMO@geodynamics.org</a>
<a class="moz-txt-link-freetext" href="http://geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo">http://geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
*--------------------------------------------------------------------------*
 Paul CRISTINI  Charge de Recherche CNRS / CNRS Research Scientist
 --------
 CNRS - Laboratoire de Mecanique et d'Acoustique (UPR 7051)

 31 chemin Joseph Aiguier, F-13402 Marseille Cedex 20 - France
 mailto: <a class="moz-txt-link-abbreviated" href="mailto:cristini@lma.cnrs-mrs.fr">cristini@lma.cnrs-mrs.fr</a>
 phone number: +33 (0)4 91 16 42 89
 fax number: +33 (0)4 91 16 44 81
 <a class="moz-txt-link-freetext" href="http://www.lma.cnrs-mrs.fr/">http://www.lma.cnrs-mrs.fr/</a>
*--------------------------------------------------------------------------*
</pre>
  </body>
</html>