[Gmsh] gmsh Merge and Include

Christophe Geuzaine cgeuzaine at ulg.ac.be
Sun Feb 24 18:51:22 CET 2008


laurence griffiths wrote:
> hi christophe,
> 
> thanks for the reply,
> 
> currently i'm using the mesh and include commands on .geo files.
> i have a 'main' .geo file which adds (with merge or include) the other 
> .geo files which contain the surface mesh comands for those subsections. 
> The volume mesh is created once all the surfaces meshes have been read. 
> The file is then only saved as .msh once the complete volume is created.
> 
> one thing i wasnt sure about is if i should split the meshes into 
> smaller volumes, mesh and save those, then merge ,msh volumes together. 
> would this work? Or would i end up with a 'bad' volume mesh?

Hi Laurence - No, gmsh does not support merging several meshes.

We've been think about authorizing this for quite a while, but we 
couldn't quite agree on which behaviour should be followed: should we 
ignore duplicate vertices based on their tags? Or should we compare 
coordinates? Or should we load the different meshes and keep them 
separate? Or...



> 
> at the moment my .geo file is rather large, 16 files , just over 3000 
> lines - i'll try and simplify this otherwise it will probably be a 
> nitemare for you to debug.
> 
> 
> laurence
> 
> 
> 
> 
> On Feb 15, 2008 10:44 AM, Christophe Geuzaine <cgeuzaine at ulg.ac.be 
> <mailto:cgeuzaine at ulg.ac.be>> wrote:
> 
>     laurence griffiths wrote:
>      > hi,
>      >
>      > I am using gmsh for my masters research project (University of
>     Bristol, UK)
>      >
>      >  I was wondering if anybody could explain the difference between the
>      > Merge and Include commands? when i use Include i get invalid memory
>      > references if i have a fine mesh (> 1 million tets)... when i use
>     Merge
>      > i dont.
> 
>     1) "Include" behaves pretty much like "#include" in the C preprocessor:
>     the contents of the included file is just fed to the language parser at
>     the location of the "Include" command.
> 
>     (You should thus never "Include" a mesh file, as a mesh file cannot be
>     understood by the parser: a mesh file is not written in the ".geo"
>     language. Still, if you do it, Gmsh should not crash: it should output
>     an error message. I could not reproduce a crash here. Could you send
>     your geo file and instructions on how to generate the mesh?)
> 
>     2) "Merge" calls the appropriate internal function to read the merged
>     file. It is the same thing as using the File->Merge menu.
> 
> 
> 
>      >
>      > (the geometry is the swift space-plane by aspirespace, each 'part' is
>      > modeled and meshed in a separate '.geo'  file, and then all the parts
>      > are tied together in a single file using either Merge or Include)
>      >
>      > or perhaps somebody knows where i could look this up (ive already
>      > checked out the users guide).
>      >
>      > in advance - thanks a lot!
>      >
>      > Laurence
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > gmsh mailing list
>      > gmsh at geuz.org <mailto:gmsh at geuz.org>
>      > http://www.geuz.org/mailman/listinfo/gmsh
> 
> 
>     --
>     Prof. Christophe Geuzaine
>     University of Liege, Electrical Engineering and Computer Science
>     http://www.montefiore.ulg.ac.be/~geuzaine
>     <http://www.montefiore.ulg.ac.be/%7Egeuzaine>
> 
> 


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine