openmdao/core/problem.py
def record_iteration(self, case_name):
        """
        Record the variables at the Problem level.

        Parameters
        ----------
        case_name : str
            Name used to identify this Problem case.
        """
        if not self._rec_mgr._recorders:
            return

        # Get the data to record (collective calls that get across all ranks)
        opts = self.recording_options
        filt = self._filtered_vars_to_record

        model = self.model
        driver = self.driver

        if opts['record_desvars']:
            des_vars = driver.get_design_var_values()
        else:
            des_vars = {}

        if opts['record_objectives']:
            obj_vars = driver.get_objective_values()
        else:
            obj_vars = {}

        if opts['record_constraints']:
            con_vars = driver.get_constraint_values()
        else:
            con_vars = {}

        des_vars = {name: des_vars[name] for name in filt['des']}
        obj_vars = {name: obj_vars[name] for name in filt['obj']}
        con_vars = {name: con_vars[name] for name in filt['con']}

        if MPI:
            des_vars = model._gather_vars(model, des_vars)
            obj_vars = model._gather_vars(model, obj_vars)
            con_vars = model._gather_vars(model, con_vars)

        outs = {}
        if not MPI or model.comm.rank == 0:
            outs.update(des_vars)
            outs.update(obj_vars)
            outs.update(con_vars)

        data = {
            'out': outs,
        }

        metadata = create_local_meta(case_name)

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

        Record the variables at the Problem level.

        Parameters
        ----------
        case_name : str
            Name used to identify this Problem case.
        
Record the variables at the Problem level.
Parameters

case_name : str
Name used to identify this Problem case.
Record the variables at the Problem level . Parameters case_name : str Name used to identify this Problem case .
def record_iteration(self, case_name):
        if not self._rec_mgr._recorders:
            return
        opts = self.recording_options
        filt = self._filtered_vars_to_record
        model = self.model
        driver = self.driver
        if opts['record_desvars']:
            des_vars = driver.get_design_var_values()
        else:
            des_vars = {}
        if opts['record_objectives']:
            obj_vars = driver.get_objective_values()
        else:
            obj_vars = {}
        if opts['record_constraints']:
            con_vars = driver.get_constraint_values()
        else:
            con_vars = {}
        des_vars = {name: des_vars[name] for name in filt['des']}
        obj_vars = {name: obj_vars[name] for name in filt['obj']}
        con_vars = {name: con_vars[name] for name in filt['con']}
        if MPI:
            des_vars = model._gather_vars(model, des_vars)
            obj_vars = model._gather_vars(model, obj_vars)
            con_vars = model._gather_vars(model, con_vars)
        outs = {}
        if not MPI or model.comm.rank == 0:
            outs.update(des_vars)
            outs.update(obj_vars)
            outs.update(con_vars)
        data = {
            'out': outs,
        }
        metadata = create_local_meta(case_name)
        self._rec_mgr.record_iteration(self, data, metadata)
def record_iteration ( self , case_name ) : if not self . _rec_mgr . _recorders : return opts = self . recording_options filt = self . _filtered_vars_to_record model = self . model driver = self . driver if opts [ 'record_desvars' ] : des_vars = driver . get_design_var_values ( ) else : des_vars = { } if opts [ 'record_objectives' ] : obj_vars = driver . get_objective_values ( ) else : obj_vars = { } if opts [ 'record_constraints' ] : con_vars = driver . get_constraint_values ( ) else : con_vars = { } des_vars = { name : des_vars [ name ] for name in filt [ 'des' ] } obj_vars = { name : obj_vars [ name ] for name in filt [ 'obj' ] } con_vars = { name : con_vars [ name ] for name in filt [ 'con' ] } if MPI : des_vars = model . _gather_vars ( model , des_vars ) obj_vars = model . _gather_vars ( model , obj_vars ) con_vars = model . _gather_vars ( model , con_vars ) outs = { } if not MPI or model . comm . rank == 0 : outs . update ( des_vars ) outs . update ( obj_vars ) outs . update ( con_vars ) data = { 'out' : outs , } metadata = create_local_meta ( case_name ) self . _rec_mgr . record_iteration ( self , data , metadata )
Record the variables at the Problem level.
Record the variables at the Problem level .
"""
        Record the variables at the Problem level.

        Parameters
        ----------
        case_name : str
            Name used to identify this Problem case.
        """ # Get the data to record (collective calls that get across all ranks)
self
case_name