[Dune] starcd files reader and parallel alugrids

Marco Cisternino marco.cisternino at optimad.it
Fri Jun 1 14:56:46 CEST 2012


Thank you Jö,
my 3D case is like your 2D example. I wonder how to loop over all the 
codim(1) of a proc (ghost included) avoiding to visit more than once the 
same entity.

Marco

Il 01/06/2012 12:33, Jö Fahlke ha scritto:
> Am Fri,  1. Jun 2012, 11:48:00 +0200 schrieb Marco Cisternino:
>> I needed a starcd mesh files reader. I want to use parallel ALUGrid grids.
>> I modified the file starcdreader.hh I found in dune-grid, in order
>> to use it with more than one process. Firstly, I tried to use it as
>> it was, but running the code with more than one proc made dune
>> answer me that insertVertex and insertElement methods can be called
>> only by process 0.
>> Therefore, I did it and now I let 0 be the only proc that inserts
>> vertexes and elements using the methods of a factory declared by all
>> the procs in the communicator. Then I call the createGrid and
>> loadBalance methods with all the procs.
>> The problem is that if I launch the code with one proc the number of
>> the elements of any codimension (cubes, faces, segments and nodes)
>> obtained using the size(codimension) method is correct, while if I
>> use more then one proc only size(0) is correct.
> When computing the expected numbers, are you aware that
>
>   - ghost entities have a limited interface (i.e. I am not certain whether all
>     codim>  0 entities are present for a given codim = 0 ghost entity),
>
>   - in ALUGrid some of the ghost entities are duplicates of each other, e.g. in
>     the folliwing cases:
>
>     g: ghost codim=dim entity
>     b: border codim=dim entity
>     i: interior codim=dim entity
>     G: ghost codim=0 entity
>     I: interior codim=0 entity
>
>      +-----+-----+
>      |     |     |
>      |  G  |  I  |
>      |     |     |
>      +-----+-----+
>      |     |     |
>      |  I  |  I  |
>      |     |     |
>      +-----+-----+
>
>     The ghost entity actually appears twice, once for each interior entity it
>     is a neighbor of.
>
>
>      g-----g-----g
>      |     |     |
>      |  G  |  G  |
>      |     |     |
>      b-----b-----b
>      |     |     |
>      |  I  |  I  |
>      |     |     |
>      i-----i-----i
>
>     AFAIK the middle ghost vertex appears twice.
>
>
> If that doesn't help, can we get some numbers here?  Actual vs. expected
> element counts ?  Serial vs. parallel?
>
>> If I loop on the codim(dim) elements the globalIdSet seems good and
>> the leafIndexSet for partitions different from ghost too. But the
>> leafIndexSet for the ghost partition enumerates vertexes more than
>> once. The same thing happens for codim>0.
>> Definitely, interior and boundary codim>0 entities are univocally
>> numbered  both in the IdSet and in the IndexSet. Ghost codim>0
>> entities are not!
>> No problems for codim=0 entities in both sets.
>> Is this the normal behavior? How can I visit the vertexes only once
>> on all the partitions using VLeafIterator??
>> I hope I was clear enough. I made a file per proc with information
>> on vertexes and cubes for the cases with one or two procs with the
>> star grid in the dune-grid-howto. I can give you these files if you
>> need.
>> Thanks a lot for any help.
>>
>> Cheers,
>>
>> Marco
>>
>>
>> _______________________________________________
>> Dune mailing list
>> Dune at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune
>>




More information about the Dune mailing list