[Dune] Problems using VTK cell data with Dune IndexSet

Christian Engwer christian.engwer at uni-muenster.de
Thu Dec 27 15:57:46 CET 2012


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
> 

-- 
Prof. Dr. Christian Engwer 
Institut für Numerische und Angewandte Mathematik
Fachbereich Mathematik und Informatik der Universität Münster
Einsteinstrasse 62
48149 Münster

E-Mail	christian.engwer at uni-muenster.de
Telefon	+49 251 83-35067
FAX		+49 251 83-32729




More information about the Dune mailing list