|BS||- the number of vectors in the RHS|
|A||- a sparse matrix|
|- the incomplete factored version of A, if any|
|- the communication structure for A|
|- the contiguous block of vectors forming the rhs|
|- the preconditioner to use PRE_ICC: incomplete Cholesky factorization PRE_ILU: incomplete LU factorization PRE_SSOR: Successive over relaxation PRE_BJACOBI: Block Jacobi|
|- the tolerance to which to solve the problem stop if the estimated norm of the residual divided by the norm of the rhs is less than err_tol|
|- the maximum number of iterations to take|
|- the final computed residual|
|guess||- if TRUE, then initialize out_x to 0, otherwise the program assumes that out_x contains an initial guess|
- the usual processor stuff
out_x - the contiguous block of vectors containing the solution
The number of iterations or a negative number indicating the number of iterations prior to finding that the matrix (or preconditioner) is not positive definite.
The preconditioners must be computed prior to calling BSpar_isolve. For more information on the preconditioners, see the manual.
int BSpar_gmres(int BS, BSpar_mat *A, BSpar_mat *fact_A, BScomm *comm_A, FLOAT *in_rhs, FLOAT *out_x, int pre_option, int restart, FLOAT err_tol, int max_iter, FLOAT *residual, int guess, BSprocinfo *procinfo)