[Gmsh] gmsh

Christophe Geuzaine geuzaine at acm.caltech.edu
Thu Jul 22 03:03:14 CEST 2004


Fournier Philippe wrote:

> Hello
> 
>  
> 
> I’m writing a c++ code (I’ve just begun with c++ and gmsh) which is the 
> implementation of  a ray tracing algorithm.
> 
>  
> 
> I want to convert the file.geo in a structured way. I’d like to know how 
> gmsh interprets this ASCII file. It could be easier for me to use what 
> already exists…
> 
> So if you could indicate me the file(s) concerned or some indication 
> that can help me…
> 

Hi Philippe - The .geo files are interpreted by a Lex/Yacc parser
(gmsh/Parser/Gmsh.y and gmsh/Parser/Gmsh.l).

A good starting point to convert a .geo file into a structured format is
gmsh/Geo/Print_Geo.cpp: this routine "unrolls" the geometry into simple
lists of points, lines, surfaces and volumes--which can be easily
printed in a structured way. You can give it a try by using the
"File->Save as->Gmsh unrolled geometry" menu or by using "gmsh file.geo
-0" on the commands line. The only thing you will probably have to do is
change the Print_XXX routines in Print_Geo.cpp.

Best,

Christophe

-- 
Christophe Geuzaine
Applied and Computational Mathematics, Caltech
geuzaine at acm.caltech.edu - http://geuz.org