[Gmsh] about mesh refinement by scripting

David Colignon David.Colignon at ulg.ac.be
Wed May 12 11:16:28 CEST 2010


On 12/05/10 09:56, Giuseppe Zagari wrote:

> Hi,
>
> I am using gmsh gui for checking
> convergence of my finite elements following this procedure:
> open gmsh, open filename, go to mesh module, clicking 2D and refine
> many times as I want and run the analysis.


Hi Giuseppe,

I suppose you mean that after refining, you save the mesh, perform your FE calculations, go back to the Gmsh GUI, click 
on refine, save, etc. ?

>
> But now I would like to use it in a script like this:
>
> gmsh -2 filename.geo
> analyze filename // it use both .geo and .msh files
> gmsh -refine filename.msh
> analyze filename.msh
> gmsh -refine filename.msh
> analyze filename.msh
> ....
>
> but, used in this way, gmsh change the node numbering.


yes, if you save the mesh, quit Gmsh, relaunch Gmsh,reload the mesh, refine, save, quit,  etc. like in your script 
above, the node numbering will probably change.

One solution could be to launch Gmsh in "server" mode (launch Gmsh on the command line with "gmsh -listen") and interact 
with it through "sockets", like explained here (point 3):

http://www.geuz.org/gmsh/doc/texinfo/gmsh.html#Solver-module-questions

or launch your FE code from within Gmsh :

http://www.geuz.org/gmsh/doc/texinfo/gmsh.html#Solver

http://www.geuz.org/gmsh/doc/texinfo/gmsh.html#Solver-module

Regards,

Dave

-- 
David Colignon, Ph.D.
Collaborateur Logistique du F.R.S.-FNRS
CÉCI - Consortium des Équipements de Calcul Intensif
ACE - Applied & Computational Electromagnetics
Sart-Tilman B28
Université de Liège
4000 Liège - BELGIQUE
Tél: +32 (0)4 366 37 32
Fax: +32 (0)4 366 29 10
WWW:    http://hpc.montefiore.ulg.ac.be/
Agenda: http://www.google.com/calendar/embed?src=david.colignon%40gmail.com



>
> Please suggest me in wich way I can obtaine the same
> behavoiur of the gmsh-gui.
>
>
> Best Regards and Many Thanks for gmsh
>
> Giuseppe
>
>
> --
> Ing. Giuseppe Zagari, Ph. D.
> Dip. Modellistica per l'Ing. - UNICAL
> Via P. Bucci, Cubo 39/b 87036
> Arcavacata di Rende CS ITALY
>
>
>
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh