<div dir="ltr">Hi all,<div><br></div><div>another possibility is to write your Fortran data directly into VTK files format.</div><div><br></div><div>I develop a KISS library in pure Fortran for IO of Fortran data into VTK standard: see <a href="https://github.com/szaghi/Lib_VTK_IO">https://github.com/szaghi/Lib_VTK_IO</a></div><div><br></div><div>The exporters are almost complete. The importers are under developing by a power collaborator <a href="https://github.com/victorsndvg/Lib_VTK_IO">https://github.com/victorsndvg/Lib_VTK_IO</a> this work will be merged very soon into the main branch.</div><div><br></div><div>Summarizing, Lib_VTK_IO is</div><div><br></div><div>+ Lib_VTK_IO is a pure Fortran library to write and read data conforming the VTK standard;<br></div><div><div>+ Lib_VTK_IO is Fortran 2003+ standard compliant;</div><div>+ Lib_VTK_IO supports parallel architectures by means OpenMP and MPI paradigms;</div><div>+ Lib_VTK_IO supports ascii, binary and base64 file formats;</div><div>+ Lib_VTK_IO is a Free, Open Source Project.</div></div><div><br></div><div>My best regards</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font face="arial, helvetica, sans-serif"><font color="#6fa8dc" size="2">Stefano Zaghi</font> Ph.D. Aerospace Engineer</font></div><div dir="ltr"><font face="arial, helvetica, sans-serif"><br>Research Scientist, Dept. of Computational Hydrodynamics at <a href="http://www.insean.cnr.it/en/content/cnr-insean" target="_blank"><b><font color="#6fa8dc">CNR-INSEAN</font></b></a> <br><font color="#6fa8dc"><b>p</b></font>: </font><font color="#6fa8dc">+39 0650299260</font><font face="arial, helvetica, sans-serif"> | <font color="#6fa8dc"><b>m</b></font>: </font><font color="#6fa8dc">+39 3497730036</font><font face="arial, helvetica, sans-serif"> | <font color="#6fa8dc"><b>e</b></font>: </font><font color="#6fa8dc"><a href="mailto:stefano.zaghi@gmail.com" target="_blank">stefano.zaghi@gmail.com</a></font><div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Codes Showcase<br></font></div><div><font size="1" face="monospace, monospace"><a href="https://github.com/szaghi/OFF" target="_blank"><b><font color="#6fa8dc">OFF</font></b></a> </font><font size="1" face="arial, helvetica, sans-serif">Open source Finite volumes Fluid dynamics code</font></div><div><font size="1" face="monospace, monospace"><b><font color="#6fa8dc"><a href="https://github.com/szaghi/Lib_VTK_IO" target="_blank"><font color="#6fa8dc">Lib_VTK_IO</font></a> </font></b> </font><font size="1" face="arial, helvetica, sans-serif">Fortran library to write and read data conforming the VTK standard</font></div><div><font size="1" face="monospace, monospace"><a href="https://github.com/szaghi/FLAP" target="_blank"><b><font color="#6fa8dc">FLAP</font></b></a> </font><font size="1" face="arial, helvetica, sans-serif">Fortran command Line Arguments Parser for poor men<b><u><br></u></b></font></div><div><font size="1" face="monospace, monospace"><b><u><a href="https://github.com/szaghi/BeFoR64" target="_blank"><font color="#6fa8dc">BeFoR64</font></a></u></b> </font><font size="1" face="arial, helvetica, sans-serif">Base64 encoding/decoding library for FoRtran poor men</font></div><div><font face="monospace, monospace" size="1"><b><u><a href="https://github.com/szaghi/FiNeR" target="_blank"><font color="#6fa8dc">FiNeR</font></a></u></b> </font><font size="1" face="arial, helvetica, sans-serif">Fortran INI ParseR and generator for FoRtran poor men</font></div><div><font size="1" face="monospace, monospace"><b><a href="https://github.com/szaghi/IR_Precision" target="_blank"><font color="#6fa8dc">IR_Precision</font></a></b> </font><font size="1" face="arial, helvetica, sans-serif">Fortran (standard 2003) module to develop portable codes</font></div></div><div><font size="1" face="monospace, monospace"><a href="https://github.com/szaghi/FoBiS" target="_blank"><b><font color="#6fa8dc">FoBis.py</font></b></a> </font><font size="1" face="arial, helvetica, sans-serif">Fortran Building System for poor men<br></font></div><div><font size="1" face="monospace, monospace"><b><font color="#6fa8dc"><a href="https://github.com/szaghi/PreForM" target="_blank"><font color="#6fa8dc">PreForM.py</font></a> </font></b> </font><font size="1" face="arial, helvetica, sans-serif">Preprocessor for Fortran poor men<br></font></div><div><font size="1" face="monospace, monospace"><a href="https://github.com/szaghi/MaTiSSe" target="_blank"><b><font color="#6fa8dc">MaTiSSe.py</font></b></a> </font><font size="1" face="arial, helvetica, sans-serif">Markdown To Impressive Scientific Slides</font><font face="arial, helvetica, sans-serif"><br></font></div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Mon, Jun 8, 2015 at 11:27 AM, Armin Wehrfritz <span dir="ltr"><<a href="mailto:dkxls23@gmail.com" target="_blank">dkxls23@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Paul,<br>
<br>
as you and Dan already stated, the HDF5 format is a very good choice to write out large datasets.<br>
<br>
I usually write the HDF5 files directly from my simulation codes and generate a XDMF file afterwards.<br>
The actual XDMF file contains just the meta data in XML format [1] and this can be tailored to your application/dataset (I use python with h5py and xml.etree to do this).<br>
Hence, my simulation codes (written in C++) only depend on the HDF5 libraries.<br>
<br>
Eventually, this will enable you to store your data in a robust, flexible and portable file format.<br>
<br>
For more complex setups I would also consider using the VTK libraries to handle the data IO as Dan suggested.<br>
<br>
-Armin<br>
<br>
[1] <a href="http://www.xdmf.org/index.php/XDMF_Model_and_Format" target="_blank">http://www.xdmf.org/index.php/XDMF_Model_and_Format</a><br>
<br>
<br>
<br>
<br>
On 06/07/2015 10:40 PM, Dan Lipsa wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You are right, ParaView does not read hdf5 directly but rather hdf5<br>
based formats (hdf5 + additional info): both netcdf and xdmf have readers.<br>
You can get a list of all readers supported by your ParaView<br>
installation using Help in ParaView. Additional readers can be enabled with<br>
compile time options.<br>
<br>
You can write Xdmf data using vtkXdmfWriter or vtkXdm3Writer (you'll<br>
have to link with the VTK library). These writers have tests which is a<br>
good way to see an example of how to use the class. You can also take a<br>
look at the VTK XML based formats: vtkXMLPolyDataWriter,<br>
vtkXMLImageDataWriter, vtkXMLUnstructuredGridWriter/Reader. Probably you<br>
could write data with a library that comes with that format and then<br>
read it with ParaView.<br>
<br>
Do you need parallel writing/reading?<br>
<br>
Dan<br>
<br>
<br>
<br>
<br>
On Sun, Jun 7, 2015 at 4:26 AM Paul Anton Letnes <<a href="mailto:pa@letnes.com" target="_blank">pa@letnes.com</a><br>
<mailto:<a href="mailto:pa@letnes.com" target="_blank">pa@letnes.com</a>>> wrote:<br>
<br>
Hi Dan!<br>
<br>
I’m familiar with the HDF5 library and documentation, but thanks<br>
anyway for the link.<br>
<br>
I don’t see how I can have ParaView read and understand HDF5 files.<br>
That is, there are several readers (e.g. H5Nimrod) that use HDF5 as<br>
the underlying format, but I don’t see how to get paraview to<br>
understand which arrays are coordinates (nodes?), which are results,<br>
etc. for my application.<br>
<br>
Perhaps I should stress again that I have limited experience with<br>
ParaView, and since the supported file formats and possibilities<br>
seem endless, I have trouble getting an overview of sensible choices.<br>
<br>
My preference for hdf5 is partly due to other software in my<br>
organization supporting this format, and my own familiarity with it.<br>
<br>
Paul<br>
<br>
> On 7. jun. 2015, at 04.07, Dan Lipsa <<a href="mailto:dan.lipsa@kitware.com" target="_blank">dan.lipsa@kitware.com</a><br>
<mailto:<a href="mailto:dan.lipsa@kitware.com" target="_blank">dan.lipsa@kitware.com</a>>> wrote:<br>
><br>
> Hi Paul,<br>
> Indeed #2 makes sense, especially if you want to change the<br>
in-house format. To write the file (from the simulation) it seems to<br>
me you should checkout<br>
><br>
> <a href="https://www.hdfgroup.org/HDF5/doc/fortran/index.html" target="_blank">https://www.hdfgroup.org/HDF5/doc/fortran/index.html</a><br>
><br>
> I don't see why ParaView would be used in that process. Am I<br>
missing something?<br>
> Dan<br>
><br>
><br>
><br>
> On Sat, Jun 6, 2015 at 8:04 AM Paul Anton Letnes <<a href="mailto:pa@letnes.com" target="_blank">pa@letnes.com</a><br>
<mailto:<a href="mailto:pa@letnes.com" target="_blank">pa@letnes.com</a>>> wrote:<br>
> Hi, fellow paraviewers!<br>
><br>
> I’ve spent some time playing with tutorials and user manuals, and<br>
so far I’m impressed with what paraview can do.<br>
><br>
> I am working on a specialized structural engineering program<br>
that, mainly, performs simulations of pipes with circular cross<br>
sections. Each pipe is split into nodes and 1D elements, and results<br>
are reported at points (or, less commonly, elements) along the pipe.<br>
><br>
> Some results are reported once per cross section; e.g, the<br>
tension in the pipe has a single value for the entire cross section.<br>
Other results, e.g. plastic strain, is reported for a number of<br>
points along the circumference of the pipe (say, 5-50 points), for<br>
each of the cross sections. The results can be either “snapshots” or<br>
time series.<br>
><br>
> After what I’ve seen from the paraview documentation, possible<br>
approaches include:<br>
> 1. Create a paraview plugin to read our current in-house file format.<br>
> 2. Directly write output files in an already supported format.<br>
> 3. Write pvpython scripts that perform the conversion on the fly.<br>
><br>
> Approach 1 is probably a lot of work and the file format is not<br>
of interest to anyone else (optimally, I’d like to replace it), so<br>
this seems less attractive. Approach 3 is probably less<br>
user-friendly for our users.<br>
><br>
> The second approach seems sensible, but the paraview<br>
documentation does not give many examples of how to do this.<br>
Optimally, I’d like to write a hdf5-based format (xdmf? netcdf? raw<br>
hdf5?) directly from Fortran, but I haven’t found documentation on<br>
how to do this. Using hdf5 seems attractive as it’s so widely<br>
supported by e.g. matlab, python, and other postprocessing tools<br>
used in the industry. Getting a single results database would<br>
simplify a lot of workflows!<br>
><br>
> What would you guys do?<br>
><br>
> Cheers<br>
> Paul<br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> <<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>><br>
><br>
> Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
<a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br>
</blockquote>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
</blockquote></div><br></div>