[Dune] starcd files reader and parallel alugrids

Jö Fahlke jorrit at jorrit.de
Fri Jun 1 12:33:16 CEST 2012


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
> 

-- 
Jorrit (Jö) Fahlke, Interdisciplinary Center for Scientific Computing,
Heidelberg University, Im Neuenheimer Feld 368, D-69120 Heidelberg
Tel: +49 6221 54 8890 Fax: +49 6221 54 8884

Of all the things I've lost, I miss my mind the most.
-- Ozzy Osbourne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20120601/2f3e4b24/attachment.sig>


More information about the Dune mailing list