|
ADPCG 1.0.0
|
Working struct for the adaptive CG solver. More...
#include <adpcg.h>
Data Fields | |
| void * | A |
| LHS data. | |
| void * | r |
| Residual. | |
| void * | rnew |
| Workspace array. | |
| void * | d |
| Workspace array. | |
| void * | pinvr |
| Workspace array. | |
| void * | Ad |
| Workspace array. | |
| void * | x |
| CG solution vector. | |
| void * | aux |
| CG auxiliary array. | |
| void * | btmp |
| CG temporary RHS array. | |
| cgint | ptype |
| Pre-conditioner type. | |
| void * | chol |
| Cholesky pre-conditioner. | |
| void * | diag |
| Diagonal pre-conditioner. | |
| double | tol |
| Relative tolerance of CG. | |
| double | rnrm |
| Residual norm. | |
| double | avgsvtime |
| Averate solution time of previous CG solves. | |
| double | avgfctime |
| Average factorization time of previous CG solves. | |
| double | currenttime |
| Buffer of solution time in the current round. | |
| double | latesttime |
| Time for the latest solve. | |
| cgint | n |
| Dimension of linear system. | |
| cgint | niter |
| Number of iterations in most recent solve. | |
| cgint | maxiter |
| Maximum number of iterations. | |
| cgint | status |
| Solution status. | |
| cgint | reuse |
| Reuse Cholesky pre-conditioner. | |
| cgint | nused |
| Number of rounds current Cholesky pre-conditioner is already used. | |
| cgint | nmaxiter |
| Number of non-successfull solves. | |
| cgint | restart |
| Restart frequency. | |
| cgint | nfactors |
| Number of factorizes performed so far. | |
| cgint | nrounds |
| Number of rounds of solves. | |
| cgint | nsolverd |
| Number of solves in a round. | |
| cgint | nsolves |
| Number of linear systems solved. | |
| void(* | v_init )(void *v) |
| Initialize vector. | |
| cgint(* | v_alloc )(void *v, cgint n) |
| Allocate memory for v. | |
| void(* | v_free )(void *v) |
| Free the internal memory of vector. | |
| void(* | v_copy )(void *s, void *t) |
| Copy s to t. | |
| void(* | v_reset )(void *v) |
| Reset vector to 0. | |
| void(* | v_norm )(void *v, double *nrm) |
| nrm = norm(v) | |
| void(* | v_axpy )(double a, void *x, void *y) |
| y = y + a * x | |
| void(* | v_axpby )(double a, void *x, double b, void *y) |
| y = a * x + b * y | |
| void(* | v_zaxpby )(void *z, double a, void *x, double b, void *y) |
| z = a * x + b * y | |
| void(* | v_dot )(void *x, void *y, double *xTy) |
| xTy = x' * y | |
| cgint(* | A_chol )(void *A) |
| Compute Cholesky of A. | |
| cgint(* | A_cond )(void *A) |
| Evaluate conditioning of A. | |
| void(* | A_getdiag )(void *A, void *diag) |
| Compute diagonal pre-conditioner diag = diag(A) | |
| cgint(* | diagpcd )(void *diag, void *v) |
| Diagonal Preconditioning operation v = P \ v. | |
| cgint(* | cholpcd )(void *chol, void *v, void *aux) |
| Cholesky Preconditioning operation v = P \ v. | |
| void(* | Av )(void *A, void *v, void *Av) |
| Compute Av = A * v. | |
| cgint(* | Ainv )(void *A, void *v, void *aux) |
| Solve Ainvv = A \ v. | |
Working struct for the adaptive CG solver.
To make the CG solver more general, the operations on
More details: the following operations are expected Vector:
Matrix:
Matrix-vector: