I would suggest to communicate with Gmsh using network. Take a look at the source code. It has a couple of nice examples in utils/solvers subfolder. It will definitely save some time since you can reuse existing instance instead of launching new process every time.
IMHO it would be the last resort to link gmsh code in. Mikhail > -----Original Message----- > From: [email protected] [mailto:gmsh- > [email protected]] On Behalf Of Mikhail Artemiev > Sent: Tuesday, September 28, 2010 9:34 PM > To: [email protected] > Subject: [Gmsh] Build the mesh in my own program > > Hi everybody! > I have a question of building mesh using Gmsh in my own > program. > In my task I need to rebuild mesh many times for different > geometry. This geometry changes under program execution. > For this purpose I use C-function "system", where I send > command "gmsh.exe myfile.geo -2". Than I read the mesh > from file. > It works, but I think that it is incorrect way. > How can I build the mesh not using the resources of OS (in > my case - Windows XP), i.e. build the mesh in my program? > > Thanks > Mikhail Artemiev, PhD student, NSTU > > _______________________________________________ > gmsh mailing list > [email protected] > http://www.geuz.org/mailman/listinfo/gmsh _______________________________________________ gmsh mailing list [email protected] http://www.geuz.org/mailman/listinfo/gmsh
