openmdao/core/total_jac.py
def matmat_input_setter(self, inds, imeta, mode):
        """
        Set -1's into the input vector in the matrix-matrix case.

        Parameters
        ----------
        inds : ndarray of int
            Total jacobian row or column indices.
        imeta : dict
            Dictionary of iteration metadata.
        mode : str
            Direction of derivative solution.

        Returns
        -------
        set
            Set of relevant system names.
        tuple of str or None
            (vec_name,) or None if linear solve caching is inactive.
        int or None
            key used for storage of cached linear solve (if active, else None).
        """
        input_vec = self.input_vec[mode]
        in_idx_map = self.in_idx_map[mode]
        in_loc_idxs = self.in_loc_idxs[mode]

        vec_name, rel_systems, cache_lin_sol = in_idx_map[inds[0]]

        self._zero_vecs(vec_name, mode)

        dinputs = input_vec[vec_name]

        for col, i in enumerate(inds):
            loc_idx = in_loc_idxs[i]
            if loc_idx != -1:
                # We apply a -1 here because the derivative of the output is minus the derivative
                # of the residual in openmdao.
                dinputs._data[loc_idx, col] = -1.0

        if cache_lin_sol:
            return rel_systems, (vec_name,), (inds[0], mode)
        else:
            return rel_systems, None, None

        Set -1's into the input vector in the matrix-matrix case.

        Parameters
        ----------
        inds : ndarray of int
            Total jacobian row or column indices.
        imeta : dict
            Dictionary of iteration metadata.
        mode : str
            Direction of derivative solution.

        Returns
        -------
        set
            Set of relevant system names.
        tuple of str or None
            (vec_name,) or None if linear solve caching is inactive.
        int or None
            key used for storage of cached linear solve (if active, else None).
        
1's into the input vector in the matrix-matrix case.
Parameters

inds : ndarray of int
Total jacobian row or column indices.
imeta : dict
Dictionary of iteration metadata.
mode : str
Direction of derivative solution.

Returns

set
Set of relevant system names.
tuple of str or None
(vec_name,) or None if linear solve caching is inactive.
int or None
key used for storage of cached linear solve (if active, else None).
1 ' s into the input vector in the matrix - matrix case . Parameters inds : ndarray of int Total jacobian row or column indices . imeta : dict Dictionary of iteration metadata . mode : str Direction of derivative solution . Returns set Set of relevant system names . tuple of str or None ( vec_name ) or None if linear solve caching is inactive . int or None key used for storage of cached linear solve ( if active else None ) .
def matmat_input_setter(self, inds, imeta, mode):
        input_vec = self.input_vec[mode]
        in_idx_map = self.in_idx_map[mode]
        in_loc_idxs = self.in_loc_idxs[mode]
        vec_name, rel_systems, cache_lin_sol = in_idx_map[inds[0]]
        self._zero_vecs(vec_name, mode)
        dinputs = input_vec[vec_name]
        for col, i in enumerate(inds):
            loc_idx = in_loc_idxs[i]
            if loc_idx != -1:
                dinputs._data[loc_idx, col] = -1.0
        if cache_lin_sol:
            return rel_systems, (vec_name,), (inds[0], mode)
        else:
            return rel_systems, None, None
def matmat_input_setter ( self , inds , imeta , mode ) : input_vec = self . input_vec [ mode ] in_idx_map = self . in_idx_map [ mode ] in_loc_idxs = self . in_loc_idxs [ mode ] vec_name , rel_systems , cache_lin_sol = in_idx_map [ inds [ 0 ] ] self . _zero_vecs ( vec_name , mode ) dinputs = input_vec [ vec_name ] for col , i in enumerate ( inds ) : loc_idx = in_loc_idxs [ i ] if loc_idx != - 1 : dinputs . _data [ loc_idx , col ] = - 1.0 if cache_lin_sol : return rel_systems , ( vec_name , ) , ( inds [ 0 ] , mode ) else : return rel_systems , None , None
Set -1's into the input vector in the matrix-matrix case.
Set - 1 ' s into the input vector in the matrix - matrix case .
"""
        Set -1's into the input vector in the matrix-matrix case.

        Parameters
        ----------
        inds : ndarray of int
            Total jacobian row or column indices.
        imeta : dict
            Dictionary of iteration metadata.
        mode : str
            Direction of derivative solution.

        Returns
        -------
        set
            Set of relevant system names.
        tuple of str or None
            (vec_name,) or None if linear solve caching is inactive.
        int or None
            key used for storage of cached linear solve (if active, else None).
        """ # We apply a -1 here because the derivative of the output is minus the derivative # of the residual in openmdao.
self
inds
imeta
mode