[Dune] Re-ordering of elements in ALUGrid and boundarySegmentIndex()

Carsten Gräser graeser at mi.fu-berlin.de
Thu May 15 13:50:03 CEST 2014


Hi Andrea,
indeed the grid interface allows that entities and boundary segments are
reordered during creation time. Hence you need to know the reordering
map if you want to associate data to entities or boundary intersections.

After the grid was created you can use the insertionIndex() methods of
the grid factory for the insertion index of entities/intersections,
i.e. the index wrt. the insertion order. At the same time you can ask
the grid for the level index/leaf index/id of entities and the segment
index associated to intersections allowing you to reconstruct this map.

So mapping the indices using the insertionIndex method should solve
your problem.

Best,
Carsten




Am 15.05.2014 13:39, schrieb Sacconi, Andrea:
> Hi all,
> 
> I am experiencing a problem I can't solve, maybe you will be able to shed some light on it.
> 
> I am using ALUGrid as grid manager; I pass to the grid factory the complete list of vertices, elements and boundary faces, and then I create the grid.
> First point, I noticed that ALUGrid performs a re-ordering of the elements.
> Now, the problem is, when I traverse the intersections and extract the boundarySegmentIndex() to which I associated somewhere else the appropriate b.c., everything goes wrong, i.e. Neumann and Dirichlet conditions got mixed up on the boundary. I clearly see this from the vtk output: my solution is not the one which is supposed to be.
> 
> Does the element re-numbering affect the boundarySegmentIndex()? I switched to Alberta as grid manager, wiithout changing anything else, and in that case the programme works fine.
> Am I missing something about ALUGrid I should be aware of?
> 
> Thanks in advance!
> Cheers,
> Andrea
> __________________________________________________________




More information about the Dune mailing list