[Dune] hdf5 finite element data standard for Dune

Andreas Dedner dedner at mathematik.uni-freiburg.de
Mon Sep 25 11:51:38 CEST 2006


Hi,
just a few remarks to start of with. I'll look at the whole
thing latter:


> But, I need a little help:
> 
> The dgfparser writes a file (*.ALUgrid) for ALUGrid. Is there a way to
> init ALUGrid directly (without a file)?

Not at the moment. An alternative would be an ostream - with the same
information as given in the file.

> In the write routine for this file the boundary elements are written
> with the following code:
> 
>   std::map<EntityKey<int>,int>::iterator pos;
>   for(pos= facemap.begin(); pos!=facemap.end(); ++pos){
>     if (pos->second == 0)
>       out << "E ";
>     else
>       out << -pos->second << " ";
>     if (dimw == 3)
>       out << pos->first.size() << " ";
>     for (int i=0;i<pos->first.size();i++)
>       out << pos->first.origKey(i) << " ";
>     out << std::endl;
>   }
> using the entitykey.hh. I don't understand that part. What is the
> fileformat ALUGrid expect?

The entitkey is used to store the boundary face information, so basically
the facemap is a std::map with the nodes of the boundary faces used as
key and the boundary id as value. The key itself is a sorted vector
of vertex numbers and the origKey is the vertex numbers stored in the
form they were generated, i.e., not sorted but oriented so that the
face normal points outwards from the domain. And this is the form
ALUgrid expects the boundary faces to be given.

> 
> What is the reason, for writing for every node a number and a -1 at the
> end of the file with:
> 
>   if (dimw == 3)
>     for (int n=0;n<nofvtx;n++) {
>       out << n << " " << -1 << std::endl;
>     }
> 
Not essential: only needed for a-priori partitioned grids (parallel
computers). This is the default for a one partition grid.


> A very important question:
> How are elements, that I have read in ALUGrid, are numbered if I iterate
> over them with Dune?
> I want to import material parameters as user data in my Dune application
> and the data should belong to the correct element. Will there be
> problems using Dune and ALUGrid in parallel mode? (And for the future: Can
> ALUGrid handle to read files in parallel?)

The usage at the moment is: proz0 reads the grid and then it is
partitioned.
Reading grids in parallel is no problem - proc0 reads macro.ALUgrid.0
proc1 reads macro.ALUgrid.1 etc. But now the strange numbers
mentioned above (the final block) is important to identify
identical verticies (give a global id).

!!!!
Assigning data to the entities of a grid using some file is still
an open problem. The difficulty with index != macrogrid vertex has
already been noted. For alugrid the global id could be used but I think
that is not a DUNE feature - although probably all implementations
(ALBERTA/ALU/UG?) fulfill this property.

> 
> If I test my read in routine I get the message 'Aborted' from somewhere
> in   Dune::GridPtr<GridType> alusimplexgrid(inputFileName);
> I cannot find the part which produces this output. Some ideas?
> 

I would need the .ALUgrid file you generate or at least the dgf file...

By the way: I have done some more work on the DGFParser over the last
weeks and I hope the whole thing is more robust now. I will do the
checkin next week...

> 
> If you think that this work can be an improvement to dune I will check
> in my work to the dune-grid module. To make the Hdf5fed API in a modular
> way usable, I need some help:
> 
> Can somebody integrate a Hdf5fed-switch to the Dune-build-system? I am
> not a expert with the autotools.
> 
> The API and a tool to convert gmsh-files in the Hdf5file format is in a
> subdir of H5Part, it is available via svn:
> svn checkout
> svn+ssh://svn@savannah.psi.ch/afs/psi.ch/project/amas/svn/root/amas/H5Part/Hdf5fed/
> 
> with password svn. (see: http://h5part.web.psi.ch/Downloading.html).
> 
> 
> Best wishes and thanks from Patrick and Benedikt
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://www.dune-project.org/cgi-bin/mailman/listinfo/dune




More information about the Dune mailing list