recording_manager.py#
RecordingManager class definition.
- class openmdao.recorders.recording_manager.RecordingManager[source]
Bases:
object
Object that routes function calls to all recorders that are attached to the same object.
- Attributes:
- _recorderslist of CaseRecorder
All of the recorders attached to the current object.
- __getitem__(index)[source]
Get a particular recorder in the manager.
- Parameters:
- indexint
an index into _recorders.
- Returns:
- recorderCaseRecorder
a recorder from _recorders
- __init__()[source]
init.
- __iter__()[source]
Iterate.
- Returns:
- iterCaseRecorder
a recorder from _recorders.
- append(recorder)[source]
Add a recorder for recording.
- Parameters:
- recorderCaseRecorder
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_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(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.
- shutdown()[source]
Shut down and remove all recorders.
- startup(recording_requester, comm=None)[source]
Run startup on each recorder in the manager.
- Parameters:
- recording_requesterobject
The object that needs an iteration of itself recorded.
- commMPI.Comm or <FakeComm> or None
The communicator for recorders (should be the comm for the Problem).
- openmdao.recorders.recording_manager.record_model_options(problem, run_number)[source]
Record the options for all systems and solvers in the model.
- Parameters:
- problemProblem
The problem for which all its system and solver options are to be recorded.
- run_numberint or None
Number indicating which run the metadata is associated with. Zero or None for the first run, 1 for the second, etc.
- 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.