Newton_methods (functions)


siconos.numerics.init_lsa_functions(functions_LSA *functions, compute_F_ptr compute_F, compute_F_merit_ptr merit_function) → None[source]

Set the functions to compute F and F_merit and all the other pointers to NULL.

Parameters
  • functions – structure to fill

  • compute_F – function to compute F

  • merit_function – function to compute F_merit


siconos.numerics.newton_LSA(n, array_like (np.float64, 1D)z, array_like (np.float64, 1D)w, int *info, None *data, SolverOptions *options, functions_LSA *functions) → None[source]

Newton algorithm for finding the zero of a function with a line search.

Mainly used for equation-based reformulation of CP or VI.

Parameters
  • n – size of the problem

  • z – variable

  • w – value of F(z)

  • info – solver-specific values

  • data – opaque problem definition

  • options – options for this solver

  • functions – struct of function pointers to compute F, H and the error


siconos.numerics.newton_LSA_check_solverId(int solverId) → bool[source]

Check whether the solver uses the Newton_LSA framework or not.

Parameters

solverId – the solver id

Returns

true if the solver is using newton_LSA, false otherwise


siconos.numerics.newton_LSA_free_solverOptions(SolverOptions *options) → None[source]

clear the solver-specific data

Parameters

options – the SolverOption structure


siconos.numerics.newton_lsa_setDefaultSolverOptions(SolverOptions *options) → None[source]

Set some default values in the SolverOption when the solver is based on newton_LSA()

Parameters

options – the struct to modify


siconos.numerics.set_lsa_params_data(SolverOptions *options, NumericsMatrix *mat) → None[source]

Set the parameters and data for newton_LSA.

Parameters
  • options – the solver option

  • mat – the