hdf5_recorder.py

Class definition for HDF5Recorder, which uses the HDF5 format.

class openmdao.recorders.hdf5_recorder.HDF5Recorder(out, **driver_kwargs)[source]

Bases: openmdao.recorders.base_recorder.BaseRecorder

A recorder that stores data using HDF5. This format naturally handles hierarchical data and is a standard for handling large datasets.

Args:

out : str

String containing the filename for the HDF5 file.

**driver_kwargs

Additional keyword args to be passed to the HDF5 driver.

Options:

options[‘record_metadata’] : bool(True)

Tells recorder whether to record variable attribute metadata.

options[‘record_unknowns’] : bool(True)

Tells recorder whether to record the unknowns vector.

options[‘record_params’] : bool(False)

Tells recorder whether to record the params vector.

options[‘record_resids’] : bool(False)

Tells recorder whether to record the ressiduals vector.

options[‘includes’] : list of strings

Patterns for variables to include in recording.

options[‘excludes’] : list of strings

Patterns for variables to exclude in recording (processed after includes).

record_iteration(params, unknowns, resids, metadata)[source]

Stores the provided data in the HDF5 file using the iteration coordinate for the Group name.

Args:

params : dict

Dictionary containing parameters. (p)

unknowns : dict

Dictionary containing outputs and states. (u)

resids : dict

Dictionary containing residuals. (r)

metadata : dict, optional

Dictionary containing execution metadata (e.g. iteration coordinate).

record_metadata(group)[source]

Stores the metadata of the given group in a HDF5 file using the variable name for the key.

Args:

group : System

System containing vectors