[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 19:24:42 CEST 2012
Okay, I think I misread Martin's mail. I thought that the problem was that
ALUGrid cannot handle grids without a boundary. My apologies.
Best,
Oliver
Am 07.06.2012 19:11, schrieb Dedner, Andreas:
> Hi.
> The grid manager does not seem to be the problem but the gmesh file or reader - so the
> problem would probably be the same with foamgrid.
> I thought the gmsh reader in dune-grid should work for any grid implementation.
> Or is there some speical gmsh file reader for foamgrid?
> Best
> Andreas
>
> ________________________________________
> From: dune-bounces+a.s.dedner=warwick.ac.uk at dune-project.org [dune-bounces+a.s.dedner=warwick.ac.uk at dune-project.org] on behalf of Oliver Sander [sander at mi.fu-berlin.de]
> Sent: 07 June 2012 10:55
> To: dune at dune-project.org
> Subject: Re: [Dune] GMSH reader fails in reading the same file for ALUSimplexGrid<2, 3> and not ALUSimplexGrid<3, 3>
>
> 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
>
> _______________________________________________
> 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