openmdao/core/total_jac.py
def simul_coloring_iter(self, imeta, mode):
        """
        Iterate over index lists for the simul coloring case.

        Parameters
        ----------
        imeta : dict
            Dictionary of iteration metadata.
        mode : str
            Direction of derivative solution.

        Yields
        ------
        list of int or int
            Current indices or current index.
        method
            Input setter method.
        method
            Jac setter method.
        """
        coloring_info = imeta['coloring']
        both = 'fwd' in coloring_info and 'rev' in coloring_info
        input_setter = self.simul_coloring_input_setter
        jac_setter = self.simul_coloring_jac_setter

        # for mode in modes:
        for color, ilist in enumerate(coloring_info[mode][0]):
            if color == 0:
                # do all uncolored indices individually (one linear solve per index)
                if both:
                    for i in ilist:
                        yield [i], input_setter, jac_setter, None
                else:
                    for i in ilist:
                        yield i, self.single_input_setter, self.single_jac_setter, None
            else:
                # yield all indices for a color at once
                yield ilist, input_setter, jac_setter, imeta['itermeta'][color]

        Iterate over index lists for the simul coloring case.

        Parameters
        ----------
        imeta : dict
            Dictionary of iteration metadata.
        mode : str
            Direction of derivative solution.

        Yields
        ------
        list of int or int
            Current indices or current index.
        method
            Input setter method.
        method
            Jac setter method.
        
Iterate over index lists for the simul coloring case.
Parameters

imeta : dict
Dictionary of iteration metadata.
mode : str
Direction of derivative solution.

Yields

list of int or int
Current indices or current index.
method
Input setter method.
method
Jac setter method.
Iterate over index lists for the simul coloring case . Parameters imeta : dict Dictionary of iteration metadata . mode : str Direction of derivative solution . Yields list of int or int Current indices or current index . method Input setter method . method Jac setter method .
def simul_coloring_iter(self, imeta, mode):
        coloring_info = imeta['coloring']
        both = 'fwd' in coloring_info and 'rev' in coloring_info
        input_setter = self.simul_coloring_input_setter
        jac_setter = self.simul_coloring_jac_setter
        for color, ilist in enumerate(coloring_info[mode][0]):
            if color == 0:
                if both:
                    for i in ilist:
                        yield [i], input_setter, jac_setter, None
                else:
                    for i in ilist:
                        yield i, self.single_input_setter, self.single_jac_setter, None
            else:
                yield ilist, input_setter, jac_setter, imeta['itermeta'][color]
def simul_coloring_iter ( self , imeta , mode ) : coloring_info = imeta [ 'coloring' ] both = 'fwd' in coloring_info and 'rev' in coloring_info input_setter = self . simul_coloring_input_setter jac_setter = self . simul_coloring_jac_setter for color , ilist in enumerate ( coloring_info [ mode ] [ 0 ] ) : if color == 0 : if both : for i in ilist : yield [ i ] , input_setter , jac_setter , None else : for i in ilist : yield i , self . single_input_setter , self . single_jac_setter , None else : yield ilist , input_setter , jac_setter , imeta [ 'itermeta' ] [ color ]
Iterate over index lists for the simul coloring case.
Iterate over index lists for the simul coloring case .
"""
        Iterate over index lists for the simul coloring case.

        Parameters
        ----------
        imeta : dict
            Dictionary of iteration metadata.
        mode : str
            Direction of derivative solution.

        Yields
        ------
        list of int or int
            Current indices or current index.
        method
            Input setter method.
        method
            Jac setter method.
        """ # for mode in modes: # do all uncolored indices individually (one linear solve per index) # yield all indices for a color at once
self
imeta
mode