File numerics/src/NonSmoothNewton.h

Go to the source code of this file

Typedef and functions declarations related to non-smooth Newton solver.

Solve \( \phi(z) = 0 \) using a Newton method.

The algorithm is alg 4.1 of the paper of Kanzow and Kleinmichel, “A new class of semismooth Newton-type methods

for nonlinear complementarity problems”, in Computational Optimization and Applications, 11, 227-251 (1998).

Typedefs

typedef void (*NewtonFunctionPtr)(int, double *, double *, int)

Functions

void linesearch_Armijo(int n, double *z, double *dir, double psi_k, double descentCondition, NewtonFunctionPtr *phi)

Armijo Linesearch.

Parameters
  • n: size of the vector z
  • z: unknown vector
  • dir: search direction
  • psi_k: initial value of the merit function
  • descentCondition: descent condition
  • phi: pointer to function used to compute phi(z)

int nonSmoothDirectNewton(int n, double *z, NewtonFunctionPtr *phi, NewtonFunctionPtr *jacobianPhi, int *iparam, double *dparam)

Newton solver without line Search.

Return
int 0 if ok
Parameters
  • n: size of the vector z
  • z: unknown vector, in-out argument
  • phi: pointer to \( \phi \) function
  • jacobianPhi: pointer to \( \nabla_z \phi(z) \) function
  • iparam: vector of int parameters:
    • [0] : max. number of iterations
    • [1] : number of iterations processed
  • dparam: vector of double parameters:
    • [0]: tolerance
    • [1]: error

int nonSmoothNewton(int n, double *z, NewtonFunctionPtr *phi, NewtonFunctionPtr *jacobianPhi, int *iparam, double *dparam)

Newton solver with line Search.

Return
int 0 if ok
Parameters
  • n: size of the vector z
  • z: unknown vector, in-out argument
  • phi: pointer to \( \phi \) function
  • jacobianPhi: pointer to \( \nabla_z \phi(z) \) function
  • iparam: vector of int parameters:
    • [0] : max. number of iterations
    • [1] : number of iterations processed
  • dparam: vector of double parameters:
    • [0]: tolerance
    • [1]: error