Tar + XDMF mesh format
The XDMF data and mesh format is arguably one of the best mesh formats out there in terms of file size, I/O speed, and ecosystem support. There is one annoyance though that has bugged me over the years: If using the binary or HDF data type (which you should), an XDMF archive consists of multiple files. When copying things over, it is easy to miss or accidentally replace one of those.
Along comes TMF, tar + XDMF convenience format. It's just like XDMF, except that it puts all files in one: tarball, the TMF file. It also restricts itself to HDF data (which most XDMF files use anyway).
Disadvantage: Since tar is inheriently serial, all your data has to be pushed through one core and its memory. If your files are too large for that, better stick with vanilla XDMF.
This repository contains a Python package that makes working with TMF files easy. Install with
pip install tmf
and use the command-line tools
tmf-info <input-tmf> # print some info about the file tmf-convert <input-mesh-file> <output-mesh-file> # convert to/from TMF into other formats tmf-compress <input-tmf> # compress the TMF file tmf-uncompress <input-tmf> # uncompress the TMF file
Note that compressed TMF files (which is the default) tend to be much smaller, but
require a bit longer to read. Depending on how often you need to read a file, you might
tmf-uncompress it first.
You can use a plugin to read TMF files with ParaView. Open ParaView and go to
Tools -> Manage Plugins... -> Load New ...
and select the file
paraview-tmf-plugin.py (typically installed at
$HOME/.local/paraview-plugin). Also activate Auto Load.
After that, you can view any TMF file with ParaView. Note that you might have to start ParaView with
HDF5_DISABLE_VERSION_CHECK=1 paraview out.tmf
to avoid a version warning/error.
The code in this repository is published under the MIT license.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size tmf-0.0.2-py3-none-any.whl (10.7 kB)||File type Wheel||Python version py3||Upload date||Hashes View hashes|
|Filename, size tmf-0.0.2.tar.gz (9.0 kB)||File type Source||Python version None||Upload date||Hashes View hashes|