From: mlesueur <mar...@ec...> - 2015-08-24 04:18:31
|
Hi John, Sorry for the delay, I was away for the two last weeks. Thanks for your help, here is one sample gmsh file. Did you have time to look at the documentation ? If you find my solution reasonable, is there a way to include it in Libmesh ? For everyone to use. Cheers, Martin Le 13/08/2015 01:30, John Peterson a écrit : > > > On Mon, Aug 10, 2015 at 11:02 PM, mlesueur > <mar...@ec... > <mailto:mar...@ec...>> wrote: > > Hi everyone, > I am using Moose Framework I have been working on getting a mesh that > can be read by libmesh, with 2D fractures in a 3D rock matrix. > I am using the .msh format for my mesh. The gmsh reader of Moose > wasn't > able to recognize those 2D blocks in a 3D domain as it only assigned > them as sidesets. > > > Yes, that was the initial design we went with, as lower-dimensional > elements seemed to be the natural way that Gmsh specified BCs. > > So I changed a bit the file gmsh_io.C and it's now working for me. In > order to do that however, I had to add a keyword in my Gmsh file in > order to treat it slightly differently in the gmsh_io.C reader > function. > My question to the list is therefore simple: which solution do you > recommend to make this work in the proper way? > > > I see that you've made your changes available via github > (https://github.com/pou036/redback/wiki/gmsh_io.C) so I'll take a > look. Can you please also post a (small!) sample modified gmsh file > that works with your modified reader? > > My current hack is to add an extra keyword in the .msh file in the > $PhyisicalNames paragraph, at the end of the line defining the tag > that > we want to consider as a lower dimensional block (instead of a > sideset). > Since the gmsh_io.C reader function doesn't currently use that > information, it's not breaking anything. Also, Gmsh itself doesn't > seem > to bother and can still read the file. But I understand that it might > not be the best solution since it changes (very slightly) the official > Gmsh format... > > > This seems like a reasonable approach to me as far as the file format > is concerned. As I understand it, the tags are for user-specified > information, so declaring that a set of lower-dimensional elements are > actually elements and not sidesets is a reasonable use case. > > However, this doesn't seem particularly convenient from your (and your > users') point of view, since you have to manually edit the Gmsh file > for it to work...? I guess it's a question of how you use Gmsh. What > you are doing may not be supported through the GUI, but I suspect it > could be scripted. From what I recall, Gmsh is fairly scriptable... > > > By the way, what is the proper way to compile a single file in the > libmesh subdirectory? > > > Just run 'make install' from your libmesh directory. It should detect > any files that changed, rebuild them, and install them to the > appropriate location. > > -- > John > |