Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDF5: XMDF Creator #1

Open
ax3l opened this issue Sep 1, 2015 · 4 comments
Open

HDF5: XMDF Creator #1

ax3l opened this issue Sep 1, 2015 · 4 comments

Comments

@ax3l
Copy link
Member

ax3l commented Sep 1, 2015

Merge our old tools for splash2xdmf and pic2xdmf (usage see PIConGPU wiki) to a unified tool for openPMD files.

A specific tool for the ED-PIC extension might not be necessary since all definitions of the base standard stay valid (e.g., positions, etc.).

@ax3l
Copy link
Member Author

ax3l commented Aug 29, 2016

@MKirchen these are the links

@ax3l
Copy link
Member Author

ax3l commented May 15, 2018

Hi @hightower8083, @RemiLehe just told me you did write openPMD to VTK converters.
That's awesome!

If you like to contribute them, this repo would be the right place.

For curiosity: did you use the ASCII-tabular VTK formats or the XML-based formats? In case of the latter, the XDMF standard is a lightweight representation of these files without heavy-data lifting: It just places references to HDF5 files and variables where data would go. If you are interested in those or writing the xdmf meta file I can provide you with example files and the links above also contain our legacy tools for it.

@hightower8083
Copy link

hightower8083 commented May 15, 2018

Hey @ax3l

It's true, that from having some contra-natural experience with OpenFOAM CFD simulations, I've got addicted to Paraview. I didn't master the XDMF standard (looked into it but found kinda longer-term solution :) ), but, since for my cases the data volume is not yet an issue, I've decided to just process the data from HDF5 to VTK files (the recent formats). These files are big (i even reduce f64 to f32), and this is of course disadvantage against XDMF -- so I'd really be interested to look into your examples. Nevertheless, the advantage is that there are bunch of viewers which work with VTK and this way it becomes rather generic -- so no war between Visit and Paraview followers.

Unfortunately, I've not yet done it for the openPMD standard, but for my chimeraCL code, where I weirdly use cartesian vectors (e.g. Exyz) in the cylindrical space (r,z,theta), so it does not comply well. The script uses tvtk package and you can find it here:
https://github.com/hightower8083/chimeraCL/blob/dev/chimera2VTK.py

It's ultra-primitive. It just takes whole series of h5 files and turns the particles into tvtk.PolyData, and the fields (in my case theta-mode) into tvtk.StructuredGrid where it stores all grid-data. Script is also doing the parallel and somewhat selective processing.

In principle, it can be easily turned into openPMD, though we'll need to add 1d, 2d and 3d grids (which's easy) and make nicer. Since I'm working often with FBPIC and sometimes WARP, I'd be interested to give a try.

@hightower8083
Copy link

hightower8083 commented May 17, 2018

@ax3l Here is a first draft of the converter.

https://github.com/hightower8083/opmd2VTK

I've base it on openPMD_viewer and pyVTK which is way easier to get than tvtk.
So far, I've added only 3d mode, theta mode and particles
I think I'm not going right now for 1d and 2d, cause I think openPMD_viewer is already best for this (though I could imagine some pretty 3d visualization for 2d sims ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants