[Gmsh] python and gmsh

Magnus Hagdorn Magnus.Hagdorn at OHMsurveys.com
Fri Mar 23 15:35:32 CET 2007


On Fri, 2007-03-23 at 14:18 +0000, Daniel Wheeler wrote:
> 
> On Mar 23, 2007, at 12:08 PM, Magnus Hagdorn wrote:
> 
> > > 
> > > 
> > Hi list,
> > I just got the ok from my boss to post my gmsh wrapper. Please find
> > attached two python files, one just contains a class for a simple
> > ASCII
> > progress bar which I found somewhere on the web, the other contains
> > my
> > wrapper. It's quite simple and probably doesn't work for other
> > setups
> > however it is a starting point. At the end it has a simple test
> > demonstrating how you can use the function. It would be nice to
> > write a
> > python class which queries the gmsh mesh files properly.
> > Let me know if you have any questions.
> > Cheers
> > magnus
> > <gmsh_wrapper.py>
> > <progressbar.py>
> 
> 
> Very nice. I can't figure out how you are actually getting the gmsh
> data on its progress.
> Where does that happen?
> 
Hi Daniel,
The WatchGms class reads the stdout of the gmsh pipe. The output is
parsed using a very crude (and probably very fragile) finite state
machine. You need to tell the number of curves and surfaces you are
expecting. I guess this could be read from the geometry file. 
Cheers
magnus