spectre.Visualization.GenerateXdmf

Tools to generate XDMF files that ParaView and VisIt can read.

The XDMF file format is documented here: https://xdmf.org/index.php/XDMF_Model_and_Format

Functions

generate_xdmf(h5files, output, subfile_name)

Generate an XDMF file for ParaView and VisIt

spectre.Visualization.GenerateXdmf.generate_xdmf(h5files, output: str, subfile_name: str, relative_paths: bool = True, start_time: float | None = None, stop_time: float | None = None, stride: int = 1, coordinates: str = 'InertialCoordinates', use_tetrahedral_connectivity: bool = False)

Generate an XDMF file for ParaView and VisIt

Read volume data from the ‘H5FILES’ and generate an XDMF file. The XDMF file points into the ‘H5FILES’ files so ParaView and VisIt can load the volume data. To process multiple files suffixed with the node number and from multiple segments specify a glob like ‘Segment*/VolumeData*.h5’.

To load the XDMF file in ParaView you must choose the ‘Xdmf Reader’, NOT ‘Xdmf3 Reader’.

Parameters:
  • h5files – List of H5 volume data files.

  • output – Output filename. A ‘.xmf’ extension is added if not present.

  • subfile_name – Volume data subfile in the H5 files.

  • relative_paths – If True, use relative paths in the XDMF file (default). If False, use absolute paths.

  • start_time – Optional. The earliest time at which to start visualizing. The start-time value is included.

  • stop_time – Optional. The time at which to stop visualizing. The stop-time value is not included.

  • stride – Optional. View only every stride’th time step.

  • coordinates – Optional. Name of coordinates dataset. Default: “InertialCoordinates”.

  • use_tetrahedral_connectivity – Optional. Use “tetrahedral_connectivity”. Default: False