openmdao/core/group.py
def _linearize(self, jac, sub_do_ln=True):
        """
        Compute jacobian / factorization. The model is assumed to be in a scaled state.

        Parameters
        ----------
        jac : Jacobian or None
            If None, use local jacobian, else use assembled jacobian jac.
        sub_do_ln : boolean
            Flag indicating if the children should call linearize on their linear solvers.
        """
        # Group finite difference
        if self._owns_approx_jac:
            jac = self._jacobian
            with self._unscaled_context(outputs=[self._outputs]):
                for approximation in itervalues(self._approx_schemes):
                    approximation.compute_approximations(self, jac=jac, total=True)
        else:
            if self._assembled_jac is not None:
                jac = self._assembled_jac

            # Only linearize subsystems if we aren't approximating the derivs at this level.
            for subsys in self._subsystems_myproc:
                do_ln = sub_do_ln and (subsys._linear_solver is not None and
                                       subsys._linear_solver._linearize_children())
                subsys._linearize(jac, sub_do_ln=do_ln)

            # Update jacobian
            if self._assembled_jac is not None:
                self._assembled_jac._update(self)

            if sub_do_ln:
                for subsys in self._subsystems_myproc:
                    if subsys._linear_solver is not None:
                        subsys._linear_solver._linearize()

        Compute jacobian / factorization. The model is assumed to be in a scaled state.

        Parameters
        ----------
        jac : Jacobian or None
            If None, use local jacobian, else use assembled jacobian jac.
        sub_do_ln : boolean
            Flag indicating if the children should call linearize on their linear solvers.
        
Compute jacobian / factorization. The model is assumed to be in a scaled state.
Parameters

jac : Jacobian or None
If None, use local jacobian, else use assembled jacobian jac.
sub_do_ln : boolean
Flag indicating if the children should call linearize on their linear solvers.
Compute jacobian / factorization . The model is assumed to be in a scaled state . Parameters jac : Jacobian or None If None use local jacobian else use assembled jacobian jac . sub_do_ln : boolean Flag indicating if the children should call linearize on their linear solvers .
def _linearize(self, jac, sub_do_ln=True):
        if self._owns_approx_jac:
            jac = self._jacobian
            with self._unscaled_context(outputs=[self._outputs]):
                for approximation in itervalues(self._approx_schemes):
                    approximation.compute_approximations(self, jac=jac, total=True)
        else:
            if self._assembled_jac is not None:
                jac = self._assembled_jac
            for subsys in self._subsystems_myproc:
                do_ln = sub_do_ln and (subsys._linear_solver is not None and
                                       subsys._linear_solver._linearize_children())
                subsys._linearize(jac, sub_do_ln=do_ln)
            if self._assembled_jac is not None:
                self._assembled_jac._update(self)
            if sub_do_ln:
                for subsys in self._subsystems_myproc:
                    if subsys._linear_solver is not None:
                        subsys._linear_solver._linearize()
def _linearize ( self , jac , sub_do_ln = True ) : if self . _owns_approx_jac : jac = self . _jacobian with self . _unscaled_context ( outputs = [ self . _outputs ] ) : for approximation in itervalues ( self . _approx_schemes ) : approximation . compute_approximations ( self , jac = jac , total = True ) else : if self . _assembled_jac is not None : jac = self . _assembled_jac for subsys in self . _subsystems_myproc : do_ln = sub_do_ln and ( subsys . _linear_solver is not None and subsys . _linear_solver . _linearize_children ( ) ) subsys . _linearize ( jac , sub_do_ln = do_ln ) if self . _assembled_jac is not None : self . _assembled_jac . _update ( self ) if sub_do_ln : for subsys in self . _subsystems_myproc : if subsys . _linear_solver is not None : subsys . _linear_solver . _linearize ( )
Compute jacobian / factorization.
Compute jacobian / factorization .
"""
        Compute jacobian / factorization. The model is assumed to be in a scaled state.

        Parameters
        ----------
        jac : Jacobian or None
            If None, use local jacobian, else use assembled jacobian jac.
        sub_do_ln : boolean
            Flag indicating if the children should call linearize on their linear solvers.
        """ # Group finite difference # Only linearize subsystems if we aren't approximating the derivs at this level. # Update jacobian
self
jac
sub_do_ln