Rendering several vtk files each of which shows part of a domain

I am running a astrophysical application (Athena) that outputs .vtk files from different processors (each processor outputs data from its subset of the computational domain) into different directories: id0/ id1/…id127/. The directory id0, for instance, contains data from the sub-domain held by processor 0. Is possible to automate the reading of the different vtk files in the different folders so that the data for the entire computational domain can be rendered. Thanks.

You want to switch to a non legacy format (eg: .vtu) and then use a .vtm to create a multiblock dataset for it.

Alternatively, you can automaitze reading every file with a macro but this may be complex to do.

If you are referring to the Athena++ code project, I believe you have better luck writing out the files in HDF5/Xdmf format. ParaView should support the output of that (at least as early as version 5.8).

The VTK file itself is not a great choice for this output as it does not support subdomains. The only way I can think of to do this is to write a Python script to iteratively create a reader for each subdomain.

1 Like