[Dune] Problems using VTK cell data with Dune IndexSet

Sascha Zelzer s.zelzer at dkfz-heidelberg.de
Fri Dec 28 13:29:53 CET 2012


Hi,

I am now trying to do a parallel version of my Dune program. The grid 
factory for a ALUGrid only allows insertions on rank=0 so I am having 
difficulties creating a proper mapping from grid entities to their 
insertion index in order to map them to their respective vtk cell data.

Any ideas how to get the insertion index on processes with rank != 0 
would be great.

Thanks,
Sascha


On 12/27/2012 03:57 PM, Christian Engwer wrote:
> Hi Sascha,
>
>> I have VTK unstructured grid files as inputs for a FEM simulation.
>> Using the Dune GridFactory (templated with
>> Dune::ALUSimplexGrid<3,3>) I am able to translate the VTK grid into
>> a Dune grid. However, I need to be able to associate the grid
>> entities (tetrahedra) with their original VTK cell data and am
>> having hard times to achieve that. The indices returned by
>>
>> duneGrid.leafView().indexSet(tetEntity)
>>
>> are differently ordered compared to their insertion order with the
>> grid factory (maybe due to load balancing when creating the grid?)
>> and I cannot find a way to create a mapping of the index set values
>> into the original VTK cell ids (and their respective cell data).
> There is no guarantee on the indexes returned by the grid, compared to
> the grid file. You have to use the insertion index. You ask the grid
> factory for the insertionIndex of a given cell.
>
> Dune::GridFactory::insertionIndex (const typename Codim< 0 >::Entity &entity) const
>
>> Did I miss something? Does anybody have a nice solution for that? If
>> there is a solution and people are interested in such a conversion
>> class (VTK -> Dune Grid) I would be happy to share it.
> Adding such a reader would be nice :-)
>
> Christian
>
>> Many thanks,
>>
>> Sascha
>>
>> _______________________________________________
>> Dune mailing list
>> Dune at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune
>>





More information about the Dune mailing list