[Dune] starcd files reader and parallel alugrids

Dedner, Andreas A.S.Dedner at warwick.ac.uk
Fri Jun 1 12:04:37 CEST 2012


Hi Marco.

I am not quite sure if I understand your problem correctly. You are getting the
same index for different vertices or you have the same vertex with different indices?
The second case might be 'normal' behavior for ALUGrid: if a ghost element is neighbor
for two interior elements there will be two copies of it, so for example the vertex which is
not part of the border will come up twice (as will the codim 0 ghost). But the indeces should
be different and during communication the communication will be done for both copies of the
ghost element.
Does this explain your observation or have I missunderstood your problem. Perhaps you
can sketch the situation with a very small grid?

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 Marco Cisternino [marco.cisternino at optimad.it]
Sent: Friday, June 01, 2012 10:48 AM
To: dune at dune-project.org
Subject: [Dune] starcd files reader and parallel alugrids

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


_______________________________________________
Dune mailing list
Dune at dune-project.org
http://lists.dune-project.org/mailman/listinfo/dune




More information about the Dune mailing list