[Dune] starcd files reader and parallel alugrids

Marco Cisternino marco.cisternino at optimad.it
Fri Jun 1 11:48:00 CEST 2012


Hi to everybody,
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.
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





More information about the Dune mailing list