cuiknewton.c File Reference

Detailed Description


Find a solution of a cuiksystem set of equations using the Newton-Rhapson method. It is based on an iterative process starting from a random point sampled in the initial box.
If the system is undetermined, i.e. number of variables higher than number of equations, the method is based on the Moor-Penrose generalised inverse.
The method can diverge if the initial point is far from the solutions of the system.

See Also
cuiknewtonworld.c cuikplan.c

Definition in file cuiknewton.c.


int main (int argc, char **arg)
 Main body of the cuiknewton application. More...

Function Documentation

int main ( int  argc,
char **  arg 

Main body of the cuiknewton application.


  • cuiknewton num_samples problem_name.cuik


  • problem_name contains the kinematic equations.
  • num_samples is the number of times we want to apply the Newton process.

In this case we sample points at random in the initial box and try to converge to the manifold. If the Newton process succeeds, we print the solution point, a tiny box around it, and the error in the solution point.

The program can also be used as:

  • cuiknewton problem_name.cuik


  • problem_name contains the kinematic equations.

In this case we search for a solution file and we try to converge to a point for each one of the boxes in the solution file. If the solution file does not exists an error is triggered.

In any cases .cuik extension is optional.

argcNumber of elements in the command line that starts the application (i.e., the cuiknewton command itself and its arguments).
argStrings with the arguments.
EXIT_SUCCESS (0) if the execution worked out fine and EXIT_FAILURE if not.

Definition at line 78 of file cuiknewton.c.

References ChangeParameter(), CONVERGED_IN_BOX, CONVERGED_IN_GLOBAL, CONVERGED_OUTSIDE_GLOBAL, CreateFileName(), CT_MAX_NEWTON_ITERATIONS, CT_REPRESENTATION, CUIK_EXT, CuikNewton(), CuikNewtonInBox(), DeleteBox(), DeleteCuikSystem(), DeleteFileName(), DeleteParameters(), DIVERGED, Error(), ErrorInCSEquations(), ErrorInSolution(), GetCSSystemVars(), GetFileFullName(), GetParameter(), InitCuikSystemFromFile(), InitParametersFromFile(), JOINTS_EXT, LINKS_EXT, NEW, PARAM_EXT, PrintBoxSubset(), randomSet(), ReadBox(), REP_JOINTS, and SOL_EXT.