|
TheBoussinesqModel
3.2.1
|
#include "turtle.h"#include "t_utilities.h"#include "doublevector_utilities.h"#include "preconditioned_conjugate_gradient.h"Go to the source code of this file.
Macros | |
| #define | MAX_VALUE_DIAG 1e-10 |
| #define | MAX_REITERTION 1 |
Functions | |
| int | get_diagonal (DOUBLEVECTOR *diagonal, t_Matrix_element Matrix) |
| long | jacobi_preconditioned_conjugate_gradient_search (long icnt, double epsilon, DOUBLEVECTOR *x, DOUBLEVECTOR *b, t_Matrix_element funz) |
Variables | |
| t_Matrix | Functional_M |
| #define MAX_REITERTION 1 |
Definition at line 36 of file preconditioned_conjugate_gradient.c.
Referenced by jacobi_preconditioned_conjugate_gradient_search().
| #define MAX_VALUE_DIAG 1e-10 |
Definition at line 35 of file preconditioned_conjugate_gradient.c.
| int get_diagonal | ( | DOUBLEVECTOR * | diagonal, |
| t_Matrix_element | Matrix | ||
| ) |
Definition at line 41 of file preconditioned_conjugate_gradient.c.
References free_doublevector(), new_doublevector(), DOUBLEVECTOR::nh, and DOUBLEVECTOR::nl.
Referenced by jacobi_preconditioned_conjugate_gradient_search(), and time_loop().
| long jacobi_preconditioned_conjugate_gradient_search | ( | long | icnt, |
| double | epsilon, | ||
| DOUBLEVECTOR * | x, | ||
| DOUBLEVECTOR * | b, | ||
| t_Matrix_element | funz | ||
| ) |
| icnt | - (long) number of reiterations |
| epsilon | - (double) required tollerance (2-order norm of the residuals) |
| x | - (DOUBLEVECTOR *) vector of the unknowns x in Ax=b |
| b | - (DOUBLEVECTOR *) vector of b in Ax=b |
| funz | - (t_Matrix_element) - (int) pointer to the application A (x and y doublevector y=A(param)x ) it return 0 in case of success, -1 otherwise. |
algorithm proposed by Jonathan Richard Shewckuck in http://www.cs.cmu.edu/~jrs/jrspapers.html#cg and http://www.cs.cmu.edu/~quake-papers/painless-conjugate-gradient.pdf
Definition at line 80 of file preconditioned_conjugate_gradient.c.
References free_doublevector(), get_diagonal(), max_doublevector(), MAX_REITERTION, new_doublevector(), DOUBLEVECTOR::nh, DOUBLEVECTOR::nl, and stop_execution().
Referenced by Newton_convergence().
| t_Matrix Functional_M |
Definition at line 39 of file preconditioned_conjugate_gradient.c.