RcdMathLib_doc
Open Source Library for Linear and Non-linear Algebra

Solve multi-variant nonlinear equation systems. More...

Go to the source code of this file.

Enumerations

enum  NON_LIN_ALGORITHM { Newton_Raphson, Damped_Newton_Raphson }
 Possible algorithms to solve multi-variant nonlinear equation systems. More...
 

Functions

uint8_t fsolve (uint8_t f_length, uint8_t x0_length, vector_t x0_arr[], enum NON_LIN_ALGORITHM algo, vector_t est_x_arr[], void(*get_non_lin_sys)(vector_t x_arr[], vector_t f_vec[]), void(*get_jacobian)(vector_t x_arr[], matrix_t J[][x0_length]))
 Solve systems of multi-variant nonlinear equations. More...
 

Detailed Description

Solve multi-variant nonlinear equation systems.

The multi-variant nonlinear equation systems are solved using damped or the Newton–Raphson algorithms.

Author
Zakaria Kasmi zkasm.nosp@m.i@in.nosp@m.f.fu-.nosp@m.berl.nosp@m.in.de

Definition in file fsolve.h.

Enumeration Type Documentation

◆ NON_LIN_ALGORITHM

Possible algorithms to solve multi-variant nonlinear equation systems.

Enumerator
Newton_Raphson 

Newton–Raphson algorithm.

Damped_Newton_Raphson 

Damped Newton–Raphson algorithm.

Definition at line 30 of file fsolve.h.

Function Documentation

◆ fsolve()

uint8_t fsolve ( uint8_t  f_length,
uint8_t  x0_length,
vector_t  x0_arr[],
enum NON_LIN_ALGORITHM  algo,
vector_t  est_x_arr[],
void(*)(vector_t x_arr[], vector_t f_vec[])  get_non_lin_sys,
void(*)(vector_t x_arr[], matrix_t J[][x0_length])  get_jacobian 
)

Solve systems of multi-variant nonlinear equations.

The user should provide pointers to non-linear equation systems and Jacobian functions. The user can choose between the damped or the Newton–Raphson algorithms.

Note
This function is generally implemented.
Parameters
[in]f_lengthlength of the error functions vector.
[in]x0_lengthlength of the start vector.
[in]x0_arr[]start vector.
[in]algodamped or the Newton–Raphson algorithm.
[in,out]est_x_arr[]estimated (solution) vector.
[in](*get_non_lin_sys)pointer to non-linear equation systems.
[in](*get_jacobian)pointer to the Jacobian matrix.
Returns
required iteration number.

Definition at line 29 of file fsolve.c.

References damped_newton_raphson(), Damped_Newton_Raphson, Newton_Raphson, and newton_raphson().

Referenced by fsolve_test().