nifty7.minimization.nonlinear_cg module#

class NonlinearCG(controller, beta_heuristics='Polak-Ribiere')[source]#

Bases: Minimizer

Nonlinear Conjugate Gradient scheme according to Polak-Ribiere.

Algorithm 5.4 from Nocedal & Wright.

Parameters:
  • controller (IterationController) – Object that decides when to terminate the minimization.

  • beta_heuristics (str) – One of ‘Polak-Ribiere’, ‘Fletcher-Reeves’, ‘Hestenes-Stiefel’ or ‘5.49’

Notes

No restarting procedure has been implemented yet.

References

Jorge Nocedal & Stephen Wright, “Numerical Optimization”, Second Edition, 2006, Springer-Verlag New York

__call__(energy)[source]#

Performs the minimization of the provided Energy functional.

Parameters:
  • energy (Energy) – Energy object at the starting point of the iteration

  • preconditioner (LinearOperator, optional) – Preconditioner to accelerate the minimization

Returns:

  • Energy (Latest energy of the minimization.)

  • int (exit status of the minimization) – Can be controller.CONVERGED or controller.ERROR