pygeo/parameterization/DVGeo.py
def totalSensitivityProd(self, vec, ptSetName, comm=None, child=False, nDVStore=0, config=None):
        """
        This function computes sensitivty information.

        Specifically, it computes the following:
        :math:`\\frac{dX_{pt}}{dX_{DV}} \\ vec`

        This is useful for forward AD mode.

        Parameters
        ----------
        vec : dictionary whose keys are the design variable names, and whose
              values are the derivative seeds of the corresponding design variable.

        ptSetName : str
            The name of set of points we are dealing with

        comm : MPI.IntraComm
            The communicator to use to reduce the final derivative. If
            comm is None, no reduction takes place.

        config : str or list
            Define what configurations this design variable will be applied to
            Use a string for a single configuration or a list for multiple
            configurations. The default value of None implies that the design
            variable appies to *ALL* configurations.

        Returns
        -------
        xsdot : array (Nx3) -> Array with derivative seeds of the surface nodes.

        Notes
        -----
        The ``child`` and ``nDVStore`` options are only used
        internally and should not be changed by the user.
        """

        self.computeTotalJacobian(ptSetName, config=config)

        names = self.getVarNames()
        newvec = np.zeros(self.getNDV(), self.dtype)
        i = 0
        for key in names:
            if key in self.DV_listGlobal:
                dv = self.DV_listGlobal[key]
            elif key in self.DV_listSpanwiseLocal:
                dv = self.DV_listSpanwiseLocal[key]
            elif key in self.DV_listSectionLocal:
                dv = self.DV_listSectionLocal[key]
            else:
                dv = self.DV_listLocal[key]

            if key in vec:
                newvec[i : i + dv.nVal] = vec[key]

            i += dv.nVal

        # perform the product
        if self.JT[ptSetName] is None:
            xsdot = np.zeros((0, 3))
        else:
            xsdot = self.JT[ptSetName].T.dot(newvec)
            xsdot.reshape(len(xsdot) // 3, 3)
            # Maybe this should be:
            # xsdot = xsdot.reshape(len(xsdot)//3, 3)

        return xsdot

        This function computes sensitivty information.

        Specifically, it computes the following:
        :math:`\\frac{dX_{pt}}{dX_{DV}} \\ vec`

        This is useful for forward AD mode.

        Parameters
        ----------
        vec : dictionary whose keys are the design variable names, and whose
              values are the derivative seeds of the corresponding design variable.

        ptSetName : str
            The name of set of points we are dealing with

        comm : MPI.IntraComm
            The communicator to use to reduce the final derivative. If
            comm is None, no reduction takes place.

        config : str or list
            Define what configurations this design variable will be applied to
            Use a string for a single configuration or a list for multiple
            configurations. The default value of None implies that the design
            variable appies to *ALL* configurations.

        Returns
        -------
        xsdot : array (Nx3) -> Array with derivative seeds of the surface nodes.

        Notes
        -----
        The ``child`` and ``nDVStore`` options are only used
        internally and should not be changed by the user.
        
This function computes sensitivty information.
Specifically, it computes the following.
This function computes sensitivty information . Specifically it computes the following .
def totalSensitivityProd(self, vec, ptSetName, comm=None, child=False, nDVStore=0, config=None):
        self.computeTotalJacobian(ptSetName, config=config)
        names = self.getVarNames()
        newvec = np.zeros(self.getNDV(), self.dtype)
        i = 0
        for key in names:
            if key in self.DV_listGlobal:
                dv = self.DV_listGlobal[key]
            elif key in self.DV_listSpanwiseLocal:
                dv = self.DV_listSpanwiseLocal[key]
            elif key in self.DV_listSectionLocal:
                dv = self.DV_listSectionLocal[key]
            else:
                dv = self.DV_listLocal[key]
            if key in vec:
                newvec[i : i + dv.nVal] = vec[key]
            i += dv.nVal
        if self.JT[ptSetName] is None:
            xsdot = np.zeros((0, 3))
        else:
            xsdot = self.JT[ptSetName].T.dot(newvec)
            xsdot.reshape(len(xsdot) // 3, 3)
        return xsdot
def totalSensitivityProd ( self , vec , ptSetName , comm = None , child = False , nDVStore = 0 , config = None ) : self . computeTotalJacobian ( ptSetName , config = config ) names = self . getVarNames ( ) newvec = np . zeros ( self . getNDV ( ) , self . dtype ) i = 0 for key in names : if key in self . DV_listGlobal : dv = self . DV_listGlobal [ key ] elif key in self . DV_listSpanwiseLocal : dv = self . DV_listSpanwiseLocal [ key ] elif key in self . DV_listSectionLocal : dv = self . DV_listSectionLocal [ key ] else : dv = self . DV_listLocal [ key ] if key in vec : newvec [ i : i + dv . nVal ] = vec [ key ] i += dv . nVal if self . JT [ ptSetName ] is None : xsdot = np . zeros ( ( 0 , 3 ) ) else : xsdot = self . JT [ ptSetName ] . T . dot ( newvec ) xsdot . reshape ( len ( xsdot ) // 3 , 3 ) return xsdot
This function computes sensitivty information.
This function computes sensitivty information .
"""
        This function computes sensitivty information.

        Specifically, it computes the following:
        :math:`\\frac{dX_{pt}}{dX_{DV}} \\ vec`

        This is useful for forward AD mode.

        Parameters
        ----------
        vec : dictionary whose keys are the design variable names, and whose
              values are the derivative seeds of the corresponding design variable.

        ptSetName : str
            The name of set of points we are dealing with

        comm : MPI.IntraComm
            The communicator to use to reduce the final derivative. If
            comm is None, no reduction takes place.

        config : str or list
            Define what configurations this design variable will be applied to
            Use a string for a single configuration or a list for multiple
            configurations. The default value of None implies that the design
            variable appies to *ALL* configurations.

        Returns
        -------
        xsdot : array (Nx3) -> Array with derivative seeds of the surface nodes.

        Notes
        -----
        The ``child`` and ``nDVStore`` options are only used
        internally and should not be changed by the user.
        """ # perform the product # Maybe this should be: # xsdot = xsdot.reshape(len(xsdot)//3, 3)
self
vec
ptSetName
comm
child
nDVStore
config
math
`\\frac{dX_{pt}}{dX_{DV}} \\ vec`
This is useful for forward AD mode.

Parameters

vec : dictionary whose keys are the design variable names, and whose
values are the derivative seeds of the corresponding design variable.

ptSetName : str
The name of set of points we are dealing with

comm : MPI.IntraComm
The communicator to use to reduce the final derivative. If
comm is None, no reduction takes place.

config : str or list
Define what configurations this design variable will be applied to
Use a string for a single configuration or a list for multiple
configurations. The default value of None implies that the design
variable appies to *ALL* configurations.

Returns

xsdot : array (Nx3) -> Array with derivative seeds of the surface nodes.

Notes

The ``child`` and ``nDVStore`` options are only used
internally and should not be changed by the user.
` \\ frac { dX_ { pt }} { dX_ { DV }} \\ vec ` This is useful for forward AD mode . Parameters vec : dictionary whose keys are the design variable names and whose values are the derivative seeds of the corresponding design variable . ptSetName : str The name of set of points we are dealing with comm : MPI . IntraComm The communicator to use to reduce the final derivative . If comm is None no reduction takes place . config : str or list Define what configurations this design variable will be applied to Use a string for a single configuration or a list for multiple configurations . The default value of None implies that the design variable appies to * ALL * configurations . Returns xsdot : array ( Nx3 ) - > Array with derivative seeds of the surface nodes . Notes The ` ` child ` ` and ` ` nDVStore ` ` options are only used internally and should not be changed by the user .