On 10/08/2012 10:49 AM, Garth N. Wells wrote: > On Mon, Oct 8, 2012 at 9:21 AM, Johan Hake <hake....@gmail.com> wrote: >> On 10/07/2012 02:44 PM, Garth N. Wells wrote: >>> Thanks to good work by Chris Richardson, support for the XDMF output >>> format with HDF5 data storage is available in the development version >>> of DOLFIN. HDF5 must be installed ('apt-get install >>> libhdf5-openmpi-dev' or 'apt-get install libhdf5-mpich-dev' for >>> Debian/Ubuntu users) to use it. To write to an XDMF file, just do >>> >>> file = File("foo.xdmf") >>> file << u >>> >>> XDMF files can be read by ParaView, and have the following advantages >>> over the VTK format: >>> >>> - All output data is stored in a single file (even in parallel), >>> rather than the (#num_time_steps x #num_processes) files for VTK XML >>> files >>> >>> - For Functions, the Mesh is not stored at every time step. At present >>> the Mesh data structure is hashed to detect changes, with a new Mesh >>> written to file only when a change is detected. This may change in the >>> future. >> >> Nice! How did you hash the mesh data? Just num_vertices/num_cells or a >> more detailed one. Would be nice with a robust and fast routine for such >> a computation. >> > > We're using to Boost to hash two a big data structures: (1) a vector > holding all the coords and (2) a vectors holding all the connectivity. > We need to check how expensive this is. There is also scope for > optimisations of what we have.
Ok. I see that keeping data in standard libraries comes with some benefits ;) >>> - Output files are much small than uncompressed VTK files >>> >>> - Writing output files is faster (about 5x for meshes, at present) >>> >>> Please try it out and report any issues. Since HDF5 is an optional >>> dependency, no demos have been set to use XDMF yet. Some options for >>> adding XDMF output to the demos are >>> >>> 1) Fall-back to VTK/PVD format if XDMF is not available; or >>> 2) Add support for writing ASCII data in the XDMF file if HDF5 is not >>> available. >> >> I also see that there are no File::Type corresponding to HDF5 or xdmf. >> Is this intentionally? Even if dolfin has not been compiled with HDF5 >> support we could include the enum and then issue an error? >> > > Thanks - I've made a fix and will push it shortly. Great! Johan > Garth > >> Johan >> >>> Garth >>> >>> _______________________________________________ >>> Mailing list: https://launchpad.net/~dolfin >>> Post to : dolfin@lists.launchpad.net >>> Unsubscribe : https://launchpad.net/~dolfin >>> More help : https://help.launchpad.net/ListHelp >>> >> _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp