On Mon, Aug 10, 2015 at 11:02 PM, mlesueur <
martin.lesu...@ecl2015.ec-lyon.fr> 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
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to