![]() |
Bachelor's degree final project
v1.0
Faculty of Mathematics, University of Barcelona
|
Header of compute a solutions of an equation with Newton method. More...
#include "linear_solve.h"
Include dependency graph for newton.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Defines | |
| #define | _OPENMP_NEWTON_METHOD 1e2 |
| #define | _FUNCTION_PROTOTYPE |
| Function prototype of a pic struct. | |
Functions | |
| unsigned int | get_newton_max_iterations () |
| Get the maximum number of newton iterations. | |
| unsigned int | set_newton_max_iterations (unsigned int newton_max_iter) |
| Set the maximum number of newton iterations. | |
| void * | newton_execute (size_t n, size_t N, double *const x, double *const X, double **const DF, double w, double tol, void(*f)(size_t, size_t, double *const, double *const, double **const, double, double), void *(*solve)(size_t, size_t, double **const, double *const, double *const, double), short unsigned int autonomous) |
| Implement the execution of a Newton's method. | |
| void | newton_differential (size_t n, size_t N, double *const x, double *const X, double **const DF, void(*f)(size_t, size_t, double *const, double *const, double **const, double, double), double w, double *h) |
| Compute the differential for the Newton's method. | |
| void | dft_r2r_1d (size_t n, size_t N, double *const dft, double *const x, double theta) |
| Compute the Discrete Fourier Transform. | |
| int | newton (size_t m, size_t n, double *const x, double *const f, double **const df, void *(*solve)(size_t, size_t, double **const, double *const, double *const, double), double tol) |
| Implements the compute of a newton method's iteration. | |
Header of compute a solutions of an equation with Newton method.
| #define _FUNCTION_PROTOTYPE |
Function prototype of a pic struct.
| #define _OPENMP_NEWTON_METHOD 1e2 |
| void dft_r2r_1d | ( | size_t | n, |
| size_t | N, | ||
| double *const | dft, | ||
| double *const | x, | ||
| double | theta | ||
| ) |
Compute the Discrete Fourier Transform.
| [in] | n | Space's dimension |
| [in] | N | Mesh size |
| [out] | x | Discrete Fourier Transform |
| [in] | X | Fourier coefficients |
| [in] | theta | Angle evaluation |
Here is the caller graph for this function:| unsigned int get_newton_max_iterations | ( | ) |
Get the maximum number of newton iterations.
| int newton | ( | size_t | m, |
| size_t | n, | ||
| double *const | x, | ||
| double *const | f, | ||
| double **const | df, | ||
| void *(*)(size_t, size_t, double **const, double *const, double *const, double) | solve, | ||
| double | tol | ||
| ) |
Implements the compute of a newton method's iteration.
| [in] | m | Rows of the matrix |
| [in] | n | Columns of the matrix |
| [in] | x | Current iteration value |
| [out] | x | Next iteration value |
| [in] | f | Constant terms |
| [in] | df | Matrix of the linear system |
| [in] | *solve | Pointer to solver linear systems of equations |
| [in] | tol | Tolerance |
| 0 | Some problem has ocurred |
| 1 | When the solution x is accepted by the tolerance given |
References solve().
Here is the call graph for this function:
Here is the caller graph for this function:| void newton_differential | ( | size_t | n, |
| size_t | N, | ||
| double *const | x, | ||
| double *const | X, | ||
| double **const | DF, | ||
| void(*)(size_t, size_t, double *const, double *const, double **const, double, double) | f, | ||
| double | w, | ||
| double * | h | ||
| ) |
Compute the differential for the Newton's method.
| [in] | n | Space's dimension |
| [in] | N | Mesh size |
| [in,out] | x | Discrete Fourier Transform for each mesh's element, that is, n(2N+1) components |
| [in] | X | Fourier coefficients |
| [in] | DF | Matrix of the linear system |
| [in] | f | Pointer to function given by the user |
| [in] | w | Parameter |
| [in] | h | Auxiliar vector |
References dft_r2r_1d(), malloc_vector(), and newton_differential_block().
Here is the call graph for this function:
Here is the caller graph for this function:| void * newton_execute | ( | size_t | n, |
| size_t | N, | ||
| double *const | x, | ||
| double *const | X, | ||
| double **const | DF, | ||
| double | w, | ||
| double | tol, | ||
| void(*)(size_t, size_t, double *const, double *const, double **const, double, double) | f, | ||
| void *(*)(size_t, size_t, double **const, double *const, double *const, double) | solve, | ||
| short unsigned int | autonomous | ||
| ) |
Implement the execution of a Newton's method.
| [in] | n | Space's dimension |
| [in] | N | Mesh size |
| [in,out] | x | Discrete Fourier Transform for each mesh's element, that is, n(2N+1) components |
| [in] | X | Fourier coefficients |
| [in] | DF | Matrix of the linear system |
| [in] | w | Parameter |
| [in] | tol | Tolerance |
| [in] | f | Pointer to function given by the user |
| [in] | solve | Pointer to solver linear systems of equations |
References newton(), newton_differential(), and solve().
Here is the call graph for this function:
Here is the caller graph for this function:| unsigned int set_newton_max_iterations | ( | unsigned int | newton_max_iter | ) |
Set the maximum number of newton iterations.
| [in] | newton_max_iter | New value |
1.7.6.1