On 14/11/15 19:57, David Knezevic wrote:
> On Sat, Nov 14, 2015 at 1:39 PM, John Peterson <jwpeter...@gmail.com
> <mailto:jwpeter...@gmail.com>> wrote:
>
>
>
>     > On Nov 14, 2015, at 11:21 AM, Torquil Macdonald Sørensen
>     <torq...@gmail.com <mailto:torq...@gmail.com>> wrote:
>     >
>     > Hi!
>     >
>     > I'm a libmesh beginner, and I seem to be having some trouble with
>     > importing meshes created by GMSH 2.11.0. In GMSH, I create a
>     simple unit
>     > cube, and define faces and a volume. Then I create a 3d mesh and
>     save in
>     > the MSH format (ASCII version 2). I have attached the file cube.msh.
>     >
>     > When I run the simple attached libmesh program import_gmsh.cpp,
>     I get
>     > the following error message:
>     >
>     > Cannot handle meshes with dimension mismatch greater than 1.
>
>     This error means that your mesh has 1, 2, and 3D elements in it...
>     not something our Gmsh reader is currently able to handle.  We
>     assume that lower dimensional elements are used to define boundary
>     conditions, but don't yet handle reading edge-based (?) BCs.  This
>     could probably be fixed.
>
>
>
> I haven't used GMSH for a long time, but IIRC by default it includes
> out all the lines and surfaces you used to build up your 3D geometry
> in the mesh. This is why you can end up with 1D elements, even if you
> didn't want the 1D elements in your mesh. There is some command to
> suppress that behavior, but I don't remember what it is. I think it's
> related to the "physical" entities in GMSH.
>

Thanks! It was necessary to define a volume physical group in the GMSH
geometry. When saving to MSH format, only the meshing of physical groups
is exported (if they exist), and by defining a volume physical group it
lead to a MSH file containing only 3d elements. Now and can import to
libmesh and print mesh information properly.

Best regards,
Torquil Sørensen

------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to