openmdao/core/total_jac.py
def _get_tuple_map(self, names, vois, abs2meta):
        """
        Create a dict that maps var name to metadata tuple.

        The tuple has the form (jacobian row/column slice, indices, distrib)

        Parameters
        ----------
        names : iter of str
            Names of the variables making up the rows or columns of the jacobian.
        vois : dict
            Mapping of variable of interest (desvar or response) name to its metadata.
        abs2meta : dict
            Mapping of absolute var name to metadata for that var.

        Returns
        -------
        dict
            Dict of metadata tuples keyed by output name.
        int
            Total number of rows or columns.
        """
        idx_map = {}
        start = 0
        end = 0

        for name in names:
            if name in vois:
                # this 'size' already takes indices into account
                size = vois[name]['size']
                indices = vois[name]['indices']
            else:
                size = abs2meta[name]['global_size']
                indices = None

            end += size

            idx_map[name] = (slice(start, end), indices, abs2meta[name]['distributed'])
            start = end

        return idx_map, end

        Create a dict that maps var name to metadata tuple.

        The tuple has the form (jacobian row/column slice, indices, distrib)

        Parameters
        ----------
        names : iter of str
            Names of the variables making up the rows or columns of the jacobian.
        vois : dict
            Mapping of variable of interest (desvar or response) name to its metadata.
        abs2meta : dict
            Mapping of absolute var name to metadata for that var.

        Returns
        -------
        dict
            Dict of metadata tuples keyed by output name.
        int
            Total number of rows or columns.
        
Create a dict that maps var name to metadata tuple.
The tuple has the form (jacobian row/column slice, indices, distrib)

Parameters

names : iter of str
Names of the variables making up the rows or columns of the jacobian.
vois : dict
Mapping of variable of interest (desvar or response) name to its metadata.
abs2meta : dict
Mapping of absolute var name to metadata for that var.

Returns

dict
Dict of metadata tuples keyed by output name.
int
Total number of rows or columns.
Create a dict that maps var name to metadata tuple . The tuple has the form ( jacobian row / column slice indices distrib ) Parameters names : iter of str Names of the variables making up the rows or columns of the jacobian . vois : dict Mapping of variable of interest ( desvar or response ) name to its metadata . abs2meta : dict Mapping of absolute var name to metadata for that var . Returns dict Dict of metadata tuples keyed by output name . int Total number of rows or columns .
def _get_tuple_map(self, names, vois, abs2meta):
        idx_map = {}
        start = 0
        end = 0
        for name in names:
            if name in vois:
                size = vois[name]['size']
                indices = vois[name]['indices']
            else:
                size = abs2meta[name]['global_size']
                indices = None
            end += size
            idx_map[name] = (slice(start, end), indices, abs2meta[name]['distributed'])
            start = end
        return idx_map, end
def _get_tuple_map ( self , names , vois , abs2meta ) : idx_map = { } start = 0 end = 0 for name in names : if name in vois : size = vois [ name ] [ 'size' ] indices = vois [ name ] [ 'indices' ] else : size = abs2meta [ name ] [ 'global_size' ] indices = None end += size idx_map [ name ] = ( slice ( start , end ) , indices , abs2meta [ name ] [ 'distributed' ] ) start = end return idx_map , end
Create a dict that maps var name to metadata tuple.
Create a dict that maps var name to metadata tuple .
"""
        Create a dict that maps var name to metadata tuple.

        The tuple has the form (jacobian row/column slice, indices, distrib)

        Parameters
        ----------
        names : iter of str
            Names of the variables making up the rows or columns of the jacobian.
        vois : dict
            Mapping of variable of interest (desvar or response) name to its metadata.
        abs2meta : dict
            Mapping of absolute var name to metadata for that var.

        Returns
        -------
        dict
            Dict of metadata tuples keyed by output name.
        int
            Total number of rows or columns.
        """ # this 'size' already takes indices into account
self
names
vois
abs2meta