baserecorder.py

Class definition for BaseRecorder, the base class for all recorders.

class openmdao.recorders.baserecorder.BaseRecorder[source]

Bases: object

Base class for all case recorders.

close()[source]

Closes out unless it’s sys.stdout, sys.stderr, or StringIO. Note that a closed recorder will do nothing in record().

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

This is the method that drivers and solvers will call during their execution to record their current state. This method is responsible for filtering the provided data to reflect the includes/excludes provided by the user and then calling self.record.

Recorder subclasses should override record, altering this function should not be necessary.

Args:

params : VecWrapper

VecWrapper containing parameters. (p)

unknowns : VecWrapper

VecWrapper containing outputs and states. (u)

resids : VecWrapper

VecWrapper containing residuals. (r)

metadata : dict

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

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

Records the requested variables. This method must be defined in all recorders.

Args:

params : VecWrapper

VecWrapper containing parameters. (p)

unknowns : VecWrapper

VecWrapper containing outputs and states. (u)

resids : VecWrapper

VecWrapper containing residuals. (r)

metadata : dict

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

startup(group)[source]

Prepare for a new run.

Args:

group : Group

Group that owns this recorder.