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__(self, index)[source]

Get a particular recorder in the manager.

Parameters
indexint

an index into _recorders.

Returns
recorderCaseRecorder

a recorder from _recorders

__init__(self)[source]

init.

__iter__(self)[source]

Iterate.

Returns
iterCaseRecorder

a recorder from _recorders.

append(self, recorder)[source]

Add a recorder for recording.

Parameters
recorderCaseRecorder

Recorder instance to be added to the manager.

has_recorders(self)[source]

Are there any recorders managed by this RecordingManager.

Returns
True/Falsebool

True if RecordingManager is managing at least one recorder

record_derivatives(self, recording_requester, data, metadata)[source]

Call record_derivatives on all recorders.

Parameters
recording_requesterobject

The object that needs an iteration of itself recorded.

datadict

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

metadatadict

Metadata for iteration coordinate.

record_iteration(self, recording_requester, data, metadata)[source]

Call record_iteration on all recorders.

Parameters
recording_requesterobject

The object that needs an iteration of itself recorded.

datadict

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

metadatadict

Metadata for iteration coordinate.

record_metadata(self, recording_requester)[source]

Call record_metadata for all recorders.

Parameters
recording_requesterobject

The object that needs its metadata recorded.

shutdown(self)[source]

Shut down and remove all recorders.

startup(self, recording_requester)[source]

Run startup on each recorder in the manager.

Parameters
recording_requesterobject

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
problemProblem

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