[Gmsh] Question

David Colignon David.Colignon at ulg.ac.be
Thu Aug 9 08:37:06 CEST 2007


Hi Cynthia,

your script should first generate a simple text file ( test.par for example ) with the geometrical parameters, like

h1 = 1. ;
w1 = 5. ;
...

then you include this parameters file at the beginning of your main test.geo file:

Include "test.par";
Point(1) = {0, 0, 0, lc};
Point(2) = {0, h1, 0, lc};
Point(3) = {w1, 0, 0, lc};

and finally your script issue the meshing command:

gmsh test.geo -2

Cheers,

Dave

-- 
David Colignon, Ph.D.
ELAP - Unité d'Electricité Appliquée
Institut Montefiore B28
Université de Liège
4000 LIEGE - BELGIQUE
Tél: +32 (0)4 366 37 32
Fax: +32 (0)4 366 29 10
http://elap.montefiore.ulg.ac.be


Cynthia Maxwell wrote:
> Hello there,
> 
> I am thinking of using your product with my solver. 
> I would like to define a geometry and iteratively change some parameters 
> such as width, height, ellipse center and radii as seen below:
> 
> 
> ------------------------------------------------------------------------
> 
> 
> You say GMesh can:
> "parameterize these geometries. Gmsh's scripting language enables all 
> commands and command arguments to depend on previous calculations (see 
> 2.1 Expressions 
> <http://www.geuz.org/gmsh/doc/texinfo/gmsh_3.html#SEC12>, and 3.1 
> Geometry commands 
> <http://www.geuz.org/gmsh/doc/texinfo/gmsh_4.html#SEC23>);" 
> 
> How would I do this? Do you have any examples of parametrically 
> modifying a geometry say from a script? 
> 
> I hope you do, because this would solve my mesh generation problem and 
> allow me to focus on the solver.
> 
> The sooner the better I know : )
> 
> Thank you,
> Cynthia
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh