armi.bookkeeping.visualization.xdmf module¶
Support for dumping XDMF files.
XDMF is a data interchange format that
allows for separate representation of the data itself and a description of how those
data are to be interpreted. The data description (“light” data) lives in an XML file,
while the actual data (in our case, data to be plotted), as well as the data describing
the mesh (“hard” data) can be stored in HDF5 files, binary files, or embedded directly
into the XML file. In most cases, this allows for visualizing data directly out of an
ARMI database file. Using the XdmfDumper
will produce an XML file (with an .xdmf
extension) containing the description of data, as well as an HDF5 file containing the
mesh. Together with the input database, the .xdmf
file can be opened in a
visualization tool that supports XDMF.
Note
Paraview seems to have rather good support for XDMF, while VisIt does not. The main issue seems to be that VisIt does not properly render the general polyhedra that XDMF supports. Unfortunately, we __need__ to use this to show hexagonal geometries, since it’s the only way to get a hexagonal prism without splitting up the mesh into wedges. To do that would require splitting the parameter data, which would defeat the main benefit of using XMDF in the first place (to be able to plot out of the original Database file). Cartesian and R-X-Theta geometries in VisIt seem to work fine. Support for polyhedra is being tracked in #1287.
- class armi.bookkeeping.visualization.xdmf.XdmfDumper(baseName: str, inputName: Optional[str] = None)[source]¶
Bases:
armi.bookkeeping.visualization.dumper.VisFileDumper
VisFileDumper implementation for XDMF format.
The general strategy of this dumper is to create a new HDF5 file that contains just the necessary mesh information for each dumped time step. The XML that describes/points to these data is stored internally as
ElementTree
objects until the end. When all time steps have been processed, these elements have time information added to them, and are collected into a “TemporalCollection” Grid and written to an.xdmf
file.