openmdao/core/group.py
def approx_totals(self, method='fd', step=None, form=None, step_calc=None):
        """
        Approximate derivatives for a Group using the specified approximation method.

        Parameters
        ----------
        method : str
            The type of approximation that should be used. Valid options include:
            'fd': Finite Difference, 'cs': Complex Step
        step : float
            Step size for approximation. Defaults to None, in which case, the approximation
            method provides its default value.
        form : string
            Form for finite difference, can be 'forward', 'backward', or 'central'. Defaults to
            None, in which case, the approximation method provides its default value.
        step_calc : string
            Step type for finite difference, can be 'abs' for absolute', or 'rel' for
            relative. Defaults to None, in which case, the approximation method
            provides its default value.
        """
        self._approx_schemes = OrderedDict()
        supported_methods = {'fd': (FiniteDifference, DEFAULT_FD_OPTIONS),
                             'cs': (ComplexStep, DEFAULT_CS_OPTIONS)}

        if method not in supported_methods:
            msg = 'Method "{}" is not supported, method must be one of {}'
            raise ValueError(msg.format(method, supported_methods.keys()))

        if method not in self._approx_schemes:
            self._approx_schemes[method] = supported_methods[method][0]()

        default_opts = supported_methods[method][1]

        kwargs = {}
        if step:
            if 'step' in default_opts:
                kwargs['step'] = step
            else:
                raise RuntimeError("'step' is not a valid option for '%s'" % method)
        if form:
            if 'form' in default_opts:
                kwargs['form'] = form
            else:
                raise RuntimeError("'form' is not a valid option for '%s'" % method)
        if step_calc:
            if 'step_calc' in default_opts:
                kwargs['step_calc'] = step_calc
            else:
                raise RuntimeError("'step_calc' is not a valid option for '%s'" % method)

        self._owns_approx_jac = True
        self._owns_approx_jac_meta = kwargs

        Approximate derivatives for a Group using the specified approximation method.

        Parameters
        ----------
        method : str
            The type of approximation that should be used. Valid options include:
            'fd': Finite Difference, 'cs': Complex Step
        step : float
            Step size for approximation. Defaults to None, in which case, the approximation
            method provides its default value.
        form : string
            Form for finite difference, can be 'forward', 'backward', or 'central'. Defaults to
            None, in which case, the approximation method provides its default value.
        step_calc : string
            Step type for finite difference, can be 'abs' for absolute', or 'rel' for
            relative. Defaults to None, in which case, the approximation method
            provides its default value.
        
Approximate derivatives for a Group using the specified approximation method.
Parameters

method : str
The type of approximation that should be used. Valid options include:
'fd': Finite Difference, 'cs': Complex Step
step : float
Step size for approximation. Defaults to None, in which case, the approximation
method provides its default value.
Approximate derivatives for a Group using the specified approximation method . Parameters method : str The type of approximation that should be used . Valid options include : ' fd ' : Finite Difference ' cs ' : Complex Step step : float Step size for approximation . Defaults to None in which case the approximation method provides its default value .
def approx_totals(self, method='fd', step=None, form=None, step_calc=None):
        self._approx_schemes = OrderedDict()
        supported_methods = {'fd': (FiniteDifference, DEFAULT_FD_OPTIONS),
                             'cs': (ComplexStep, DEFAULT_CS_OPTIONS)}
        if method not in supported_methods:
            msg = 'Method "{}" is not supported, method must be one of {}'
            raise ValueError(msg.format(method, supported_methods.keys()))
        if method not in self._approx_schemes:
            self._approx_schemes[method] = supported_methods[method][0]()
        default_opts = supported_methods[method][1]
        kwargs = {}
        if step:
            if 'step' in default_opts:
                kwargs['step'] = step
            else:
                raise RuntimeError("'step' is not a valid option for '%s'" % method)
        if form:
            if 'form' in default_opts:
                kwargs['form'] = form
            else:
                raise RuntimeError("'form' is not a valid option for '%s'" % method)
        if step_calc:
            if 'step_calc' in default_opts:
                kwargs['step_calc'] = step_calc
            else:
                raise RuntimeError("'step_calc' is not a valid option for '%s'" % method)
        self._owns_approx_jac = True
        self._owns_approx_jac_meta = kwargs
def approx_totals ( self , method = 'fd' , step = None , form = None , step_calc = None ) : self . _approx_schemes = OrderedDict ( ) supported_methods = { 'fd' : ( FiniteDifference , DEFAULT_FD_OPTIONS ) , 'cs' : ( ComplexStep , DEFAULT_CS_OPTIONS ) } if method not in supported_methods : msg = 'Method "{}" is not supported, method must be one of {}' raise ValueError ( msg . format ( method , supported_methods . keys ( ) ) ) if method not in self . _approx_schemes : self . _approx_schemes [ method ] = supported_methods [ method ] [ 0 ] ( ) default_opts = supported_methods [ method ] [ 1 ] kwargs = { } if step : if 'step' in default_opts : kwargs [ 'step' ] = step else : raise RuntimeError ( "'step' is not a valid option for '%s'" % method ) if form : if 'form' in default_opts : kwargs [ 'form' ] = form else : raise RuntimeError ( "'form' is not a valid option for '%s'" % method ) if step_calc : if 'step_calc' in default_opts : kwargs [ 'step_calc' ] = step_calc else : raise RuntimeError ( "'step_calc' is not a valid option for '%s'" % method ) self . _owns_approx_jac = True self . _owns_approx_jac_meta = kwargs
Approximate derivatives for a Group using the specified approximation method.
Approximate derivatives for a Group using the specified approximation method .
"""
        Approximate derivatives for a Group using the specified approximation method.

        Parameters
        ----------
        method : str
            The type of approximation that should be used. Valid options include:
            'fd': Finite Difference, 'cs': Complex Step
        step : float
            Step size for approximation. Defaults to None, in which case, the approximation
            method provides its default value.
        form : string
            Form for finite difference, can be 'forward', 'backward', or 'central'. Defaults to
            None, in which case, the approximation method provides its default value.
        step_calc : string
            Step type for finite difference, can be 'abs' for absolute', or 'rel' for
            relative. Defaults to None, in which case, the approximation method
            provides its default value.
        """
self
method
step
form
step_calc