So-called quadtree and octree grids are quite attractive for applications requiring adaptive mesh refinement. They are for example used in Gerris and Paramesh. Is anyone aware of a good file format for such grids, and supporting visualization software? See also this answer in the Gerris FAQ. The only potential candidate that I'm currently aware of is the VTK HyperOctree class, but there seems to be almost no documentation.
As a specific example of a mesh, consider a sparsely refined octree grid, consisting of $10^4$ boxes, each containing $8 \times 8 \times 8=512$ cells. My current strategies in Visit/Paraview are:
- Write the grid as a unstructured VTK file. This is expensive for larger datasets, and does not exploit the 'structuredness' of the quad/octree.
- Collect neighboring 'boxes' in the tree into larger blocks, and write a block-structured grid. This involves quite a bit of extra code, and loses the connectivity information embedded in the quad/octree.
Update If there is currently no viable format for directly writing and visualizing an octree grid, I would appreciate suggestions for a file format that can be used to write the octree as a block-structured grid. Ideally, this format:
- Has a relatively simple definition/implementation, ideally open source and with C/Fortran compatibility.
- Can efficiently handle a large number of grid blocks (e.g. 1000 or more).
- Allows to easily specify the connectivity of grid blocks, in particular at refinement boundaries.
I'm currently using Silo for this purpose, but I'm looking for something that scores better on the above three points (smaller, faster, simpler).