nutopy.nle.Options

class Options(*args, **kwargs)[source]

Bases: nutopy.options.Options

Options for nutopy.nle.solve.

Variables
  • Display (str, {‘on’, ‘off’}, default is on) – Display iterations and results or not

  • MaxFEval (int, default is 2000) – Maximum number of calls to the function f

  • SolverMethod (str, default is 'hybrj') –

    Solver method

    • From nutopy package 1:

      • hybrj

    • From scipy.optimize.root:

      • hybr : this method is equivalent to hybrj.

      • lm

      • broyden1

      • broyden2

      • anderson

      • linearmixing

      • diagbroyden

      • excitingmixing

      • krylov

      • df-sane

  • ScipyRootOptions (dict) –

    A dictionary of solver options for python scipy solver. E.g. xtol or maxiter, see show_options() for details:

    >>> from scipy import optimize
    >>> print(optimize.show_options(solver='root'))
    

  • TolX (float, default is 1e-8) – Relative tolerance between iterates.

Examples

>>> from nutopy import nle

Constructor usage

>>> options = nle.Options()
>>> options = nle.Options(Display='off', TolX=1e-8)
>>> options = nle.Options({'Display' : 'off', 'TolX' : 1e-8})

Update

>>> options.update(Display='on')

Get

>>> solver = options.get('Display')

References

1

M. J. D. Powell, A Hybrid Method for Nonlinear Equations. Numerical Methods for Nonlinear Algebraic Equations, P. Rabinowitz, editor. Gordon and Breach, 1970.