Version:

This documentation is not for the latest stable Salvus version.

Visualizing input and output files

Point data

Point (receiver) data are output in the ASDF file format. Please see the ASDF website for details and documentation.

Volume and surface data

Meshes and wavefield data are read and written as HDF5 files. The HDF5 library allows us to performantly access single files in parallel, as well as allowing for the portable sharing of such files. To see a visual representation of what's in these files we recommend using Paraview.

Paraview 5.10 and 5.11 on Windows

Paraview versions 5.10 and 5.11 on Windows cannot open files from the WSL file system. Please copy them to a Windows file system or use Paraview 5.9.1.

Note that we strongly recommend to download Paraview from the official website -- the versions installed through Linux package management systems often do not come with the correct libraries installed.

Files are visualized in Paraview using the XDMF standard. This is why you'll see for every mesh, surface, or volume output file used by Salvus, an associated file with the same name but with a .xdmf file suffix. It is this .xdmf file that should be opened in Paraview. When you do open such a file, you should see a dialogue box which looks similar to the following image:

The reader you require is "XDMF Reader". Selecting a different reader may cause Paraview to crash.

Meshes and Models

Not all data that is required to visualize the mesh and the model defined on that mesh in detail is also required for the numerical computations. To avoid unnecessarily large files, salvus can write meshes with different level of detail for visualization. If a mesh lacks the visualization data, it can always be added later on by reading and rewriting the mesh:

Copy
UnstructuredMesh.from_h5("input.h5").write_h5("output.h5", mode="all")

Similarly, the mesh file size can be reduced by removing unnecessary data:

UnstructuredMesh.from_h5("input.h5").write_h5("output.h5", mode="minimal")

For details on the different output modes see salvus.mesh.UnstructuredMesh.write_h5()

Multi-Block XDMF Files

XDMF files can contain multiple blocks of data, in particular salvus meshes can contain:

  • the Skeleton Mesh, that is the first order mesh. This is useful to look at the element sizes and where refinements are placed. For higher order meshes, this should not be used to judge element shape or quality, but for first order meshes the skeleton is equal to actual mesh.

  • the GLL Model: this block contains a sub-connectivity for each element in the case of higher order meshes and duplicated nodes to correctly represent discontinuous fields such as the material properties as nodal fields.

  • the GLL Mesh: this block also contains the sub-connectivity, but does not duplicate the nodes. As such it allows paraview to correctly detect the outer boundaries of the domain, which leads to better performance and smoother rendering. On the downside, the model cannot be represented on this block.

Unfortunately, paraview by default enables all blocks when opening a multi-block file and the user has to select a single one to get a useful view.

High Order Meshes in Paraview

As XDMF does not support correct handling of high order meshes, we have resorted to sub-connectivities above. To get a more accurate representation of the smooth shapes of higher order elements, salvus can output meshes in VTK format. 3D meshes can be written both in the legacy ASCII format and the newer xml based format, 2D meshes currently only support the legacy format. For paraview to correctly detect the files, the file endings need to be *.vtu for xml files and *.vtk for the legacy files. Note that these files do not contain the model and cannot be used for numerical computations, but are only meant to visualize the geometry of the mesh.

Once opened, paraview renders the high order elements by a linear subdivision, to get a smooth view the user has to increase the `Nonlinear Subdivision Level` to a reasonable level. High values may lead to very high memory usage.
PAGE CONTENTS