base_recorder.py¶
Class definition for BaseRecorder, the base class for all recorders.
-
class
openmdao.recorders.base_recorder.
BaseRecorder
[source]¶ Bases:
object
This is a base class for all case recorders and is not a functioning case recorder on its own.
Options: options[‘record_metadata’] : bool(True)
Tells recorder whether to record variable attribute metadata.
options[‘record_unknowns’] : bool(True)
Tells recorder whether to record the unknowns vector.
options[‘record_params’] : bool(False)
Tells recorder whether to record the params vector.
options[‘record_resids’] : bool(False)
Tells recorder whether to record the ressiduals vector.
options[‘record_derivs’] : bool(True)
Tells recorder whether to record derivatives that are requested by a Driver.
options[‘includes’] : list of strings
Patterns for variables to include in recording.
options[‘excludes’] : list of strings
Patterns for variables to exclude in recording (processed after includes).
-
close
()[source]¶ Closes out unless it’s
sys.stdout
,sys.stderr
, or StringIO. Note that a closed recorder will do nothing inrecord()
, and closing a closed recorder also does nothing.
-
record_derivatives
(derivs, metadata)[source]¶ Writes the metadata of the given group
Args: derivs : dict
Dictionary containing derivatives
metadata : dict, optional
Dictionary containing execution metadata (e.g. iteration coordinate).
-
record_iteration
(params, unknowns, resids, metadata)[source]¶ Writes the provided data.
Args: params : dict
Dictionary containing parameters. (p)
unknowns : dict
Dictionary containing outputs and states. (u)
resids : dict
Dictionary containing residuals. (r)
metadata : dict, optional
Dictionary containing execution metadata (e.g. iteration coordinate).
-