recording_manager.py

RecordingManager class definition.

class openmdao.recorders.recording_manager.RecordingManager[source]

Bases: object

Object that routes function calls to all attached recorders.

Attributes

rank (int) Rank of the iteration coordinate.
__getitem__(index)[source]

Get a particular recorder in the manager.

Parameters:
index : int

an index into _recorders.

Returns:
recorder : CaseRecorder

a recorder from _recorders

__init__()[source]

init.

__iter__()[source]

Iterate.

Returns:
iter : CaseRecorder

a recorder from _recorders.

append(recorder)[source]

Add a recorder for recording.

Parameters:
recorder : CaseRecorder

Recorder instance to be added to the manager.

has_recorders()[source]

Are there any recorders managed by this RecordingManager.

Returns:
True/False : bool

True if RecordingManager is managing at least one recorder

record_derivatives(recording_requester, data, metadata)[source]

Call record_derivatives on all recorders.

Parameters:
recording_requester : object

The object that needs an iteration of itself recorded.

data : dict

Dictionary containing derivatives keyed by ‘of,wrt’ to be recorded.

metadata : dict

Metadata for iteration coordinate.

record_iteration(recording_requester, data, metadata)[source]

Call record_iteration on all recorders.

Parameters:
recording_requester : object

The object that needs an iteration of itself recorded.

data : dict

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

metadata : dict

Metadata for iteration coordinate.

record_metadata(recording_requester)[source]

Call record_metadata for all recorders.

Parameters:
recording_requester : object

The object that needs its metadata recorded.

shutdown()[source]

Shut down and remove all recorders.

startup(recording_requester)[source]

Run startup on each recorder in the manager.

Parameters:
recording_requester : object

The object that needs an iteration of itself recorded.

openmdao.recorders.recording_manager.record_viewer_data(problem)[source]

Record model viewer data for all recorders that have that option enabled.

We don’t want to collect the viewer data if it’s not needed though, so first we’ll find all recorders that need the data (if any) and then record it for those recorders.

Parameters:
problem : Problem

The problem for which model viewer data is to be recorded.