[Dune-devel] Updates on psurface convert

Xiaoxue Gong xiaoxue198912 at gmail.com
Thu Aug 1 00:16:19 CEST 2013


Hi, Markus!

I have addressed some of the changes listed below. I will finish the
remaining ones in the next few days.

In the last few weeks I was also working the 3ed point in the plan Oliver
madeļ¼š

3. Implement an HDF5-based file format for psurface objects

Nobody will be able to use your stuff as long as we rely on the
AmiraMesh format.
(The format itself is not a secret, but the support library is
difficult to come by).

- AmiraMesh is a general-purpose file format for all kinds of
visualization-related
data.  Read the file psurface/README to learn how psurface objects are stored in
AmiraMesh files.

- Familiarize yourself with HDF5 (http://www.hdfgroup.org/HDF5/)  Find a way to
store a psurface object in HDF5 instead of AmiraMesh.  Here it is okay to use
the HDF5 support library.

- Implement HDF5 reading and writing in psurface-convert

After doing some research on hdf5, I find that both paraview and visit
could not read unstructured hdf5 file directly. So I write some function
that could write the xmdf file. xmdf file provide a description on the data
structure while the heavy data are stored in hdf5. The paraviw could read
hdf5 thought xmdf.

I have updated the hdf5 code (hdf5IO.cpp and hdf5test.cpp)  and the new
Makefile.am into my git directory in
https://gitorious.org/gcos/psurface-convert.
<https://gitorious.org/gcos/psurface-convert>
I have it with the sphere object, the output hdf5 file psurface.h5 and xdmf
file xdmf3d.xmf  is also put to that directory.

I am sorry for the late reply. My grandma passed away last week, so I
changed the summer plan and travelled back to China last weekend. I spent
some time on visa application this week.  There are good internet
connection at home and I will be working on this project from home.

Best,
Xiaoxue
 <https://gitorious.org/gcos/psurface-convert>

On Sat, Jul 27, 2013 at 5:08 AM, Markus Blatt
<markus at dr-blatt.de><markus at dr-blatt.de>wrote


> On Fri, Jul 26, 2013 at 09:39:10PM -0400, Xiaoxue Gong wrote:
> > I have made a clean repository in
> > https://gitorious.org/gcos/psurface-convert
> > Documentation on the format I used on storing psurface information into
> vtk
> > files and documentation on how to replicate my results is included in
> > ./doc/REARDME and ./doc/note
>
> Thanks, now it looks much cleaner. Still I think there are a few
> things that could be changed:
>
> + When I clone the the repository the directory tree looks like this
>   psurface-convert/
>   |
>    -------- dune-surface-convert
>             |
>             ---- dune
>             |
>             ---- src
>             ...
>
>   Personally I would have expected the files directly in the root
>   directory, i.e. without the additional dune-psurface-convert
>   directory in between.
>   BTW: I think this is a minor issue, and can easily be resolved (even
>   later).
>
> + With your code being a dune module, I would have exspected it to
>    adhere to our guidlines.
>    - Use CamelCase for the method and class names. Method names start
>      with a lowercase letter, class names with an uppercase letter.
>     (e.g. VTKPWriter::IndexMapBack should be VTKPWriter::indexMapBack
>    - The root namespace should probably be Dune (you could use a
>      nested PSurface namespace inside it)
>
I have changed the method and class names according to CamelCase.
The root name is changed to psurface


    + Your code is indented very inconsequently. This makes it very hard
> to read for others. It is     probably due to using tabs. You should

not use them for indentation! There is the possibility to enforce
>    not using tabs when commiting with dunecontrol. Please ask on this
>    list how to use this with your repository.

Christoph have given me some instruction on this. I have not figure out the
details yet. I will do this during this week.


> Most probably you can
>    tell your favorite editor not use tabs for indentation.
>
> + You should make use of information hiding. Currently all the
>    methods of VTKPWriter are declared public. You should limit public
>    methods to those that should be exposed to user (e.g. for
>    writing/reading the data). I can see why you did, as you seem to
>    use all methods and members in writevtk. Maybe this should be a
>    member functionod VTKPWriter, too?
>
I have put the public function into the VtkPWriter.

>
> + Currently one can only write PSurface<2,float>. Is that intended?
>    Shouldn't we be able to write others like PSurface<3,double>, too?
>
It could work with PSurface<2,double>
But I am not sure whether it could work with Psurface<3,ctype>.
The function to read am file could only deal with 2d (since it have
Psurface<2,ctype> as
input. So I could only test with 2d case. What is the difference between 2d
and 3d?

>
> + IMHO vtuIO.[hc]pp should be usable from other modules
>    too. Therefore I would move to an appropriate subdirectory below
>    dune/ (take a look at the core modules to see what might be
>    appropriate). If you stick with the free method writevtk then
>    vtuIO.cpp should be put into a library.
>
> + Please try to document your code along (or even before) writing it
>    using the doxygen syntax. Most developers (me, too) are not
>    disciplined enough to document their code after writing it. In the
>    rare occasion the we are and that there is time left, we are often
>    having a hard time understanding it ourselves (which is a shame and
>    waste of time). I would recommend documenting it properly _now_.
>
> + What is up with the weired AC_ARG_WITH clauses in configure.ac? I do not
>    think that they are needed and doubt that they serve their intended
>    purpose.
>
 I will deal with these issues during this week.

>
> Cheers,
>
> Markus
> --
> Do you need more support with DUNE or HPC in general?
>
> Dr. Markus Blatt - HPC-Simulation-Software & Services
> http://www.dr-blatt.de
> Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
> Tel.: +49 (0) 160 97590858  Fax: +49 (0)322 1108991658
>
> _______________________________________________
> Dune-devel mailing list
> Dune-devel at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20130731/54c43daf/attachment.htm>


More information about the Dune-devel mailing list