[Dune] GMSH reader fails in reading the same file for ALUSimplexGrid<2, 3> and not ALUSimplexGrid<3, 3>

Oliver Sander sander at mi.fu-berlin.de
Thu Jun 7 11:55:13 CEST 2012


Hi Andrea,
if you want to do computations on a sphere (i.e., a 2d triangular 
surface in 3d
without boundary), you may also want to consider using FoamGrid:
http://users.dune-project.org/projects/dune-foamgrid
You can read gmsh files directly into a FoamGrid.
Best,
Oliver

Am 07.06.2012 11:34, schrieb Martin Nolte:
> Hi Andrea,
>
> it seems your grid actually models a sphere, i.e., a borderless surface.
> Therefore, the output you provide actually shows the error: 84 boundary
> elements. ALUGrid detects this problem and throws an exception.
>
> Unfortunately, I cannot tell whether this is an error in your Gmsh file
> or in the Gmsh reader (but I would guess the latter).
>
> On the upside I have a workaround for you: AlbertaGrid ignores the
> additional boundary segments. I don't know whether this should be
> considered a bug or a feature, but there it is.
>
> So, you can convert your Gmsh file into DGF using the utility gmsh2dgf
> (located in dune-grid/dune/grid/io/file/dgfparser/utils). Simply compile
> it using
>
> make GRIDTYPE=ALBERTAGRID GRIDDIM=2 WORLDDIM=3
>
> and call it with your Gmsh file as first argument. You should be able to
> read the resulting DGF file into ALUGrid.
>
> For your convenience I attached the generated DGF file and a vtk output
> file showing the grid (both using AlbertaGrid).
>
> I hope this helps a little.
>
> Best,
>
> Martin
>
>
> On 06/06/2012 04:06 PM, Sacconi, Andrea wrote:
>> Hi everyone,
>>
>> I have a problem with the GMSH reader.
>>
>> I'm trying to build a new grid by reading a .msh file (attached);
>> ideally, the
>> computational mesh should be made only of triangles located in R^3, so
>> it can be
>> interpreted either as a 3D mesh with only boundary elements or as a 2D
>> mesh
>> embedded in R^3.
>>
>> When I try the first solution, that is
>>
>> #define ALUGRID_SIMPLEX
>> #define GRIDDIM 3
>> #define GRIDWORLD 3
>>
>> everything works properly.
>>
>> Instead, if I modify
>>
>> #define ALUGRID_SIMPLEX
>> #define GRIDDIM 2
>> #define GRIDWORLD 3
>>
>> I get this error:
>>
>> Reading 2d Gmsh grid...
>> version 2.2 Gmsh file detected
>> file contains 304 nodes
>> file contains 693 elements
>> number of real vertices = 303
>> number of boundary elements = 84
>> number of elements = 602
>> terminate called after throwing an instance of 'Dune::GridError'
>> Abort trap
>>
>> Does anyone know if there are problems when passing from < 3 , 3 > to
>> < 2 , 3> ?
>> I've attached the file.
>>
>> Thanks in advance!
>>
>> Andrea
>> __________________________________________________________
>>
>> Andrea Sacconi
>> PhD student, Applied Mathematics
>> AMMP Section, Department of Mathematics, Imperial College London,
>> London SW7 2AZ, UK
>> a.sacconi11 at imperial.ac.uk
>>
>>
>> _______________________________________________
>> Dune mailing list
>> Dune at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune
>
>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune




More information about the Dune mailing list