[Gmsh] maybe a bug

Giuseppe Borzi gborzi1 at alice.it
Mon Sep 26 13:45:22 CEST 2005


Dear Dr. Geuzaine,
I think I may have found a bug in gmsh. The gmsh binary compiled with 
gcc 3.4.3 under Mandrake Linux 10.2, with optimization level 2 (-O2), is 
unable to build the 3D mesh for the rect.geo file in attach. It starts 
the meshing, allocate more and more memory until it crashes with the 
following error message:

[gborzi at localhost gmsh-1.60.1]$ terminate called after throwing an instance of 'std::bad_alloc'

  what():  St9bad_alloc

When compiled with optimization turned off (-O0), gmsh is able to do the 
meshing, but again allocates a lot of memory (1GB RAM + ~2GB swap). When 
the lc parameter is set to 0.15 or 0.5 both the optimized and 
non-optimazed versions work OK.
I understand that I may annoy you, but I have some other questions:

   1. When I tried to compile gmsh without optimization I tried
      /OPTIM=-O0 ./configure/ and also /./configure OPTIM=-O0/, but in
      each case it uses -O2. I had to change the value in the variables
      file. How should I give the command to get the right optimization ?
   2. I'm developing a finite element code (it's still at version 2.0e-4
      !) with gmsh as the pre and postpocessor. In order to check if a
      2nd order simplex (triangle or tetrahedra) is curved or not my
      program checks that the points /pm/ in the middle of the edges are
      close to the midpoint of the extremes of the edges /p1, p2/, i.e.
      /norm(pm-0.5*(p1+p2))/norm(p1-p2) < epsnl/, where norm is the
      1-norm. Is this an overshoot, i.e. there is some better way to do
      the check ? For example by checking that the average of the points
      at the vertices is close to the average of the midpoints ? Also I
      guessed /epsnl = 1.0e-3/, but I'm not sure that this a correct
      value. May you suggest me a criterion to check the curved elements ?
   3. When I make a 3D view of the results I do not see a solid figure,
      but isosurfaces of the solution. Is this the standard behaviour of
      gmsh or I did something wrong ?

Thank you in advance for your answers, and thanks also for developing gmsh.

Regards.

-- 
Giuseppe Borzi'

e-mail: gborzi at ieee.org
http://www.webalice.it/gborzi1/
Assistant Professor at the Univ. of Messina - Italia
----------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20050926/46ed7ddf/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rect.geo
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20050926/46ed7ddf/attachment.geo>