[Gmsh] the following geo file produces a segmentation fault

David Bernstein David.Bernstein at meliorinnovations.com
Tue Apr 28 18:32:21 CEST 2015


Hi Moritz, I ran this using 2.9.1 on OS X (yosemite) and it worked fine.  Maybe try updating your gmsh version?

Regards,
Dave

On Apr 28, 2015, at 1:36 AM, moritz braun <moritz.braun at gmail.com<mailto:moritz.braun at gmail.com>> wrote:

Dear All

The following file
===============

Function Mysphere;

  // In the following commands we use the reserved variable name
  // `newp', which automatically selects a new point number. This
  // number is chosen as the highest current point number, plus
  // one. (Note that, analogously to `newp', the variables `newc',
  // `news', `newv' and `newreg' select the highest number amongst
  // currently defined curves, surfaces, volumes and `any entities
  // other than points', respectively.)

  p1 = newp; Point(p1) = {x,  y,  z} ;
  p2 = newp; Point(p2) = {x+r,y,  z} ;
  p3 = newp; Point(p3) = {x,  y+r,z} ;
  p4 = newp; Point(p4) = {x,  y,  z+r} ;
  p5 = newp; Point(p5) = {x-r,y,  z  } ;
  p6 = newp; Point(p6) = {x,  y-r,z  } ;
  p7 = newp; Point(p7) = {x,  y,  z-r} ;

  c1 = newreg; Circle(c1) = {p2,p1,p7};
  c2 = newreg; Circle(c2) = {p7,p1,p5};
  c3 = newreg; Circle(c3) = {p5,p1,p4};
  c4 = newreg; Circle(c4) = {p4,p1,p2};
  c5 = newreg; Circle(c5) = {p2,p1,p3};
  c6 = newreg; Circle(c6) = {p3,p1,p5};
  c7 = newreg; Circle(c7) = {p5,p1,p6};
  c8 = newreg; Circle(c8) = {p6,p1,p2};
  c9 = newreg; Circle(c9) = {p7,p1,p3};
  c10 = newreg; Circle(c10) = {p3,p1,p4};
  c11 = newreg; Circle(c11) = {p4,p1,p6};
  c12 = newreg; Circle(c12) = {p6,p1,p7};

  // We need non-plane surfaces to define the spherical holes. Here we
  // use ruled surfaces, which can have 3 or 4 sides:

  l1 = newreg; Line Loop(l1) = {c5,c10,c4};   Ruled Surface(newreg) = {l1};
  l2 = newreg; Line Loop(l2) = {c9,-c5,c1};   Ruled Surface(newreg) = {l2};
  l3 = newreg; Line Loop(l3) = {c12,-c8,-c1}; Ruled Surface(newreg) = {l3};
  l4 = newreg; Line Loop(l4) = {c8,-c4,c11};  Ruled Surface(newreg) = {l4};
  l5 = newreg; Line Loop(l5) = {-c10,c6,c3};  Ruled Surface(newreg) = {l5};
  l6 = newreg; Line Loop(l6) = {-c11,-c3,c7}; Ruled Surface(newreg) = {l6};
  l7 = newreg; Line Loop(l7) = {-c2,-c7,-c12};Ruled Surface(newreg) = {l7};
  l8 = newreg; Line Loop(l8) = {-c6,-c9,c2};  Ruled Surface(newreg) = {l8};
  theloops[t] = newreg;
  Surface Loop(theloops[t]) = {l8+1,l5+1,l1+1,l2+1,l3+1,l7+1,l6+1,l4+1};

Return

Field[1]=MathEval;
Field[1].F="0.1/(1/Sqrt(x*x+y*y+(z-1)*(z-1))+1/Sqrt(x*x+y*y+(z+1)*(z+1)))";
Background Field = 1;
x = 0.0 ; y = 0.0 ; z = 0 ; r = 10  ;t=0;
Call Mysphere ;
x = 0 ; y = 0.0 ; z = 1 ; r = 0.5;t=1;
Call Mysphere ;
x = 0 ; y = 0.0 ; z = -1 ; r = 0.5 ;t=2;
Call Mysphere ;

Volume (186)={theloops[]};
Physical Volume(999)= 186;
==========

loads successfully into gmsh
but trying to mesh produces a
seg. fault
the version is 2.8.3


any help will be appreciated

regards


Moritz

--
Prof M Braun         Tel.:27-12-4298006/8027
Physics Department  Fax.: 27-12-4293643
University of South Africa (UNISA)
moritz.braun at gmail.com<mailto:moritz.braun at gmail.com>
P.O. Box 392
0003
UNISA
 South Africa
http://moritz-braun.blogspot.com<http://moritz-braun.blogspot.com/>
This e-mail is covered by the Electronic Communication Privacy Act, 18 U.S.C. Section 2510-2521 and may be legally privileged. If you have received this transmission in error, please notify the original sender immediately by return e-mail or by telephone at the telephone number provided above and delete/trash the original message from your system. Thank you for your assistance. The information contained herein is confidential information provided only for the use of the individual or entity for whom it was intended. If the reader of this message received it in error, is not the intended recipient, or if an attachment is made in error, the reader is hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.
_______________________________________________
gmsh mailing list
gmsh at geuz.org<mailto:gmsh at geuz.org>
http://www.geuz.org/mailman/listinfo/gmsh

This e-mail is covered by the Electronic Communication Privacy Act, 18 U.S.C. Section 2510-2521 and may be legally privileged. If you have received this transmission in error, please notify the original sender immediately by return e-mail or by telephone at the telephone number provided above and delete/trash the original message from your system. Thank you for your assistance. The information contained herein is confidential information provided only for the use of the individual or entity for whom it was intended. If the reader of this message received it in error, is not the intended recipient, or if an attachment is made in error, the reader is hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20150428/dc68db32/attachment.html>