openmdao/solvers/solver.py
def record_iteration(self, **kwargs):
        """
        Record an iteration of the current Solver.

        Parameters
        ----------
        **kwargs : dict
            Keyword arguments (used for abs and rel error).
        """
        if not self._rec_mgr._recorders:
            return

        metadata = create_local_meta(self.SOLVER)

        # Get the data
        data = {}

        if self.recording_options['record_abs_error']:
            data['abs'] = kwargs.get('abs')
        else:
            data['abs'] = None

        if self.recording_options['record_rel_error']:
            data['rel'] = kwargs.get('rel')
        else:
            data['rel'] = None

        system = self._system
        if isinstance(self, NonlinearSolver):
            outputs = system._outputs
            inputs = system._inputs
            residuals = system._residuals
        else:  # it's a LinearSolver
            outputs = system._vectors['output']['linear']
            inputs = system._vectors['input']['linear']
            residuals = system._vectors['residual']['linear']

        if self.recording_options['record_outputs']:
            data['o'] = {}
            if 'out' in self._filtered_vars_to_record:
                for out in self._filtered_vars_to_record['out']:
                    if out in outputs._names:
                        data['o'][out] = outputs._views[out]
            else:
                data['o'] = outputs
        else:
            data['o'] = None

        if self.recording_options['record_inputs']:
            data['i'] = {}
            if 'in' in self._filtered_vars_to_record:
                for inp in self._filtered_vars_to_record['in']:
                    if inp in inputs._names:
                        data['i'][inp] = inputs._views[inp]
            else:
                data['i'] = inputs
        else:
            data['i'] = None

        if self.recording_options['record_solver_residuals']:
            data['r'] = {}
            if 'res' in self._filtered_vars_to_record:
                for res in self._filtered_vars_to_record['res']:
                    if res in residuals._names:
                        data['r'][res] = residuals._views[res]
            else:
                data['r'] = residuals
        else:
            data['r'] = None

        self._rec_mgr.record_iteration(self, data, metadata)

        Record an iteration of the current Solver.

        Parameters
        ----------
        **kwargs : dict
            Keyword arguments (used for abs and rel error).
        
Record an iteration of the current Solver.
Parameters

kwargs : dict
Keyword arguments (used for abs and rel error).
Record an iteration of the current Solver . Parameters kwargs : dict Keyword arguments ( used for abs and rel error ) .
def record_iteration(self, **kwargs):
        if not self._rec_mgr._recorders:
            return
        metadata = create_local_meta(self.SOLVER)
        data = {}
        if self.recording_options['record_abs_error']:
            data['abs'] = kwargs.get('abs')
        else:
            data['abs'] = None
        if self.recording_options['record_rel_error']:
            data['rel'] = kwargs.get('rel')
        else:
            data['rel'] = None
        system = self._system
        if isinstance(self, NonlinearSolver):
            outputs = system._outputs
            inputs = system._inputs
            residuals = system._residuals
        else:  
            outputs = system._vectors['output']['linear']
            inputs = system._vectors['input']['linear']
            residuals = system._vectors['residual']['linear']
        if self.recording_options['record_outputs']:
            data['o'] = {}
            if 'out' in self._filtered_vars_to_record:
                for out in self._filtered_vars_to_record['out']:
                    if out in outputs._names:
                        data['o'][out] = outputs._views[out]
            else:
                data['o'] = outputs
        else:
            data['o'] = None
        if self.recording_options['record_inputs']:
            data['i'] = {}
            if 'in' in self._filtered_vars_to_record:
                for inp in self._filtered_vars_to_record['in']:
                    if inp in inputs._names:
                        data['i'][inp] = inputs._views[inp]
            else:
                data['i'] = inputs
        else:
            data['i'] = None
        if self.recording_options['record_solver_residuals']:
            data['r'] = {}
            if 'res' in self._filtered_vars_to_record:
                for res in self._filtered_vars_to_record['res']:
                    if res in residuals._names:
                        data['r'][res] = residuals._views[res]
            else:
                data['r'] = residuals
        else:
            data['r'] = None
        self._rec_mgr.record_iteration(self, data, metadata)
def record_iteration ( self , ** kwargs ) : if not self . _rec_mgr . _recorders : return metadata = create_local_meta ( self . SOLVER ) data = { } if self . recording_options [ 'record_abs_error' ] : data [ 'abs' ] = kwargs . get ( 'abs' ) else : data [ 'abs' ] = None if self . recording_options [ 'record_rel_error' ] : data [ 'rel' ] = kwargs . get ( 'rel' ) else : data [ 'rel' ] = None system = self . _system if isinstance ( self , NonlinearSolver ) : outputs = system . _outputs inputs = system . _inputs residuals = system . _residuals else : outputs = system . _vectors [ 'output' ] [ 'linear' ] inputs = system . _vectors [ 'input' ] [ 'linear' ] residuals = system . _vectors [ 'residual' ] [ 'linear' ] if self . recording_options [ 'record_outputs' ] : data [ 'o' ] = { } if 'out' in self . _filtered_vars_to_record : for out in self . _filtered_vars_to_record [ 'out' ] : if out in outputs . _names : data [ 'o' ] [ out ] = outputs . _views [ out ] else : data [ 'o' ] = outputs else : data [ 'o' ] = None if self . recording_options [ 'record_inputs' ] : data [ 'i' ] = { } if 'in' in self . _filtered_vars_to_record : for inp in self . _filtered_vars_to_record [ 'in' ] : if inp in inputs . _names : data [ 'i' ] [ inp ] = inputs . _views [ inp ] else : data [ 'i' ] = inputs else : data [ 'i' ] = None if self . recording_options [ 'record_solver_residuals' ] : data [ 'r' ] = { } if 'res' in self . _filtered_vars_to_record : for res in self . _filtered_vars_to_record [ 'res' ] : if res in residuals . _names : data [ 'r' ] [ res ] = residuals . _views [ res ] else : data [ 'r' ] = residuals else : data [ 'r' ] = None self . _rec_mgr . record_iteration ( self , data , metadata )
Record an iteration of the current Solver.
Record an iteration of the current Solver .
"""
        Record an iteration of the current Solver.

        Parameters
        ----------
        **kwargs : dict
            Keyword arguments (used for abs and rel error).
        """ # Get the data # it's a LinearSolver
self