← Back to team overview

dolfin team mailing list archive

Re: Support for XDMF output for visualisation

 

On Sun, Oct 7, 2012 at 3:56 PM, Anders Logg <logg@xxxxxxxxx> wrote:
> On Sun, Oct 07, 2012 at 01:44:19PM +0100, 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.
>>
>> - Output files are much small than uncompressed VTK files
>>
>> - Writing output files is faster (about 5x for meshes, at present)
>
> Great!
>
>> Please try it out and report any issues. Since HDF5 is an optional
>> dependency, no demos have been set to use XDMF yet.
>
> Except for this one?
>
>   demo/undocumented/hdf5
>

I mean to take it out - it won't work without HDF5.

>> 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.
>
> It would be easy to make File.cpp choose VKT (pvd) if XDMF is not
> available. I haven't tried the XDMF output yet, but if it works well I
> don't see why we shouldn't make it the default output format and
> change to XDMF in all the demos, with automatic fallback to VTK.
>

ok.

Garth


> --
> Anders


References