base_recorder.py

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

class openmdao.recorders.base_recorder.BaseRecorder[source]

Bases: object

Base class for all case recorders and is not a functioning case recorder on its own.

Options:

recording_options[‘record_metadata’] : bool(True)

Tells recorder whether to record variable attribute metadata.

recording_options[‘record_outputs’] : bool(True)

Tells recorder whether to record the outputs of a System.

recording_options[‘record_inputs’] : bool(False)

Tells recorder whether to record the inputs of a System.

recording_options[‘record_residuals’] : bool(False)

Tells recorder whether to record the residuals of a System.

recording_options[‘record_derivatives’] : bool(False)

Tells recorder whether to record the derivatives of a Driver.

recording_options[‘record_desvars’] : bool(True)

Tells recorder whether to record the desvars of a Driver.

recording_options[‘record_responses’] : bool(False)

Tells recorder whether to record the responses of a Driver.

recording_options[‘record_objectives’] : bool(False)

Tells recorder whether to record the objectives of a Driver.

recording_options[‘record_constraints’] : bool(False)

Tells recorder whether to record the constraints of a Driver.

recording_options[‘record_abs_error’] : bool(True)

Tells recorder whether to record the absolute error of a Solver.

recording_options[‘record_rel_error’] : bool(True)

Tells recorder whether to record the relative error of a Solver.

recording_options[‘record_solver_derivatives’] : bool(False)

Tells recorder whether to record the derivatives of a Solver.

recording_options[‘includes’] : list of strings(“*”)

Patterns for variables to include in recording.

recording_options[‘excludes’] : list of strings([])

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

Attributes

out (StringIO) Output to the recorder.
__init__()[source]

Initialize.

close()[source]

Clean up the recorder.

record_iteration(recording_requester, data, metadata, **kwargs)[source]

Route the record_iteration call to the proper method.

Parameters:

recording_requester : object

System, Solver, Driver in need of recording.

metadata : dict, optional

Dictionary containing execution metadata.

data : dict

Dictionary containing desvars, objectives, constraints, responses, and System vars.

**kwargs : keyword args

Some implementations of record_iteration need additional args.

record_iteration_driver(recording_requester, data, metadata)[source]

Record data and metadata from a Driver.

Parameters:

recording_requester : Driver

Driver in need of recording.

data : dict

Dictionary containing desvars, objectives, constraints, responses, and System vars.

metadata : dict

Dictionary containing execution metadata.

record_iteration_solver(recording_requester, data, metadata)[source]

Record data and metadata from a Solver.

Parameters:

recording_requester : Solver

Solver in need of recording.

data : dict

Dictionary containing outputs, residuals, and errors.

metadata : dict

Dictionary containing execution metadata.

record_iteration_system(recording_requester, data, metadata)[source]

Record data and metadata from a System.

Parameters:

recording_requester : System

System in need of recording.

data : dict

Dictionary containing inputs, outputs, and residuals.

metadata : dict

Dictionary containing execution metadata.

record_metadata(recording_requester)[source]

Route the record_metadata call to the proper method.

Parameters:

recording_requester : object

The object that would like to record its metadata.

record_metadata_driver(recording_requester)[source]

Record driver metadata.

Parameters:

recording_requester : Driver

The Driver that would like to record its metadata.

record_metadata_solver(recording_requester)[source]

Record solver metadata.

Parameters:

recording_requester : Solver

The Solver that would like to record its metadata.

record_metadata_system(recording_requester)[source]

Record system metadata.

Parameters:

recording_requester : System

The System that would like to record its metadata.

startup(recording_requester)[source]

Prepare for a new run and calculate inclusion lists.

Parameters:

recording_requester : object

Object to which this recorder is attached.