pygeo/parameterization/DVGeo.py
def convertDictToSensitivity(self, dIdxDict):
        """
        This function performs the reverse operation of
        convertSensitivityToDict(); it transforms the dictionary back
        into an array. This function is important for the matrix-free
        interface.

        Parameters
        ----------
        dIdxDict : dictionary
           Dictionary of information keyed by this object's
           design variables

        Returns
        -------
        dIdx : array
           Flattened array of length getNDV().
        """
        DVCountGlobal, DVCountLocal, DVCountSecLoc, DVCountSpanLoc = self._getDVOffsets()
        dIdx = np.zeros(self.nDV_T, self.dtype)
        i = DVCountGlobal
        for key in self.DV_listGlobal:
            dv = self.DV_listGlobal[key]
            dIdx[i : i + dv.nVal] = dIdxDict[dv.name]
            i += dv.nVal

        i = DVCountLocal
        for key in self.DV_listLocal:
            dv = self.DV_listLocal[key]
            dIdx[i : i + dv.nVal] = dIdxDict[dv.name]
            i += dv.nVal

        i = DVCountSecLoc
        for key in self.DV_listSectionLocal:
            dv = self.DV_listSectionLocal[key]
            dIdx[i : i + dv.nVal] = dIdxDict[dv.name]
            i += dv.nVal

        i = DVCountSpanLoc
        for key in self.DV_listSpanwiseLocal:
            dv = self.DV_listSpanwiseLocal[key]
            dIdx[i : i + dv.nVal] = dIdxDict[dv.name]
            i += dv.nVal

        # Note: not sure if this works with (multiple) sibling child FFDs
        for iChild in range(len(self.children)):
            childdIdx = self.children[iChild].convertDictToSensitivity(dIdxDict)
            # update the total sensitivities with the derivatives from the child
            dIdx += childdIdx
        return dIdx

        This function performs the reverse operation of
        convertSensitivityToDict(); it transforms the dictionary back
        into an array. This function is important for the matrix-free
        interface.

        Parameters
        ----------
        dIdxDict : dictionary
           Dictionary of information keyed by this object's
           design variables

        Returns
        -------
        dIdx : array
           Flattened array of length getNDV().
        
This function performs the reverse operation of
convertSensitivityToDict(); it transforms the dictionary back
into an array. This function is important for the matrix-free
interface.

Parameters

dIdxDict : dictionary
Dictionary of information keyed by this object's
design variables

Returns

dIdx : array
Flattened array of length getNDV().
This function performs the reverse operation of convertSensitivityToDict () ; it transforms the dictionary back into an array . This function is important for the matrix - free interface . Parameters dIdxDict : dictionary Dictionary of information keyed by this object ' s design variables Returns dIdx : array Flattened array of length getNDV () .
def convertDictToSensitivity(self, dIdxDict):
        DVCountGlobal, DVCountLocal, DVCountSecLoc, DVCountSpanLoc = self._getDVOffsets()
        dIdx = np.zeros(self.nDV_T, self.dtype)
        i = DVCountGlobal
        for key in self.DV_listGlobal:
            dv = self.DV_listGlobal[key]
            dIdx[i : i + dv.nVal] = dIdxDict[dv.name]
            i += dv.nVal
        i = DVCountLocal
        for key in self.DV_listLocal:
            dv = self.DV_listLocal[key]
            dIdx[i : i + dv.nVal] = dIdxDict[dv.name]
            i += dv.nVal
        i = DVCountSecLoc
        for key in self.DV_listSectionLocal:
            dv = self.DV_listSectionLocal[key]
            dIdx[i : i + dv.nVal] = dIdxDict[dv.name]
            i += dv.nVal
        i = DVCountSpanLoc
        for key in self.DV_listSpanwiseLocal:
            dv = self.DV_listSpanwiseLocal[key]
            dIdx[i : i + dv.nVal] = dIdxDict[dv.name]
            i += dv.nVal
        for iChild in range(len(self.children)):
            childdIdx = self.children[iChild].convertDictToSensitivity(dIdxDict)
            dIdx += childdIdx
        return dIdx
def convertDictToSensitivity ( self , dIdxDict ) : DVCountGlobal , DVCountLocal , DVCountSecLoc , DVCountSpanLoc = self . _getDVOffsets ( ) dIdx = np . zeros ( self . nDV_T , self . dtype ) i = DVCountGlobal for key in self . DV_listGlobal : dv = self . DV_listGlobal [ key ] dIdx [ i : i + dv . nVal ] = dIdxDict [ dv . name ] i += dv . nVal i = DVCountLocal for key in self . DV_listLocal : dv = self . DV_listLocal [ key ] dIdx [ i : i + dv . nVal ] = dIdxDict [ dv . name ] i += dv . nVal i = DVCountSecLoc for key in self . DV_listSectionLocal : dv = self . DV_listSectionLocal [ key ] dIdx [ i : i + dv . nVal ] = dIdxDict [ dv . name ] i += dv . nVal i = DVCountSpanLoc for key in self . DV_listSpanwiseLocal : dv = self . DV_listSpanwiseLocal [ key ] dIdx [ i : i + dv . nVal ] = dIdxDict [ dv . name ] i += dv . nVal for iChild in range ( len ( self . children ) ) : childdIdx = self . children [ iChild ] . convertDictToSensitivity ( dIdxDict ) dIdx += childdIdx return dIdx
This function performs the reverse operation of
convertSensitivityToDict(); it transforms the dictionary back
into an array.
This function performs the reverse operation of convertSensitivityToDict () ; it transforms the dictionary back into an array .
"""
        This function performs the reverse operation of
        convertSensitivityToDict(); it transforms the dictionary back
        into an array. This function is important for the matrix-free
        interface.

        Parameters
        ----------
        dIdxDict : dictionary
           Dictionary of information keyed by this object's
           design variables

        Returns
        -------
        dIdx : array
           Flattened array of length getNDV().
        """ # Note: not sure if this works with (multiple) sibling child FFDs # update the total sensitivities with the derivatives from the child
self
dIdxDict