Ax = Operator_uniform_stress_matmul(Lw, alpha);
Precon = Operator_uniform_stress_diag_precon_new(Lw, alpha);
- return cg(Ax, Precon, Lw->m, dim, x0, rhs, tol, maxit, flag);
+ return cg(Ax, Precon, Lw->m, dim, x0, rhs, tol, maxit);
}
return res;
}
-real cg(Operator Ax, Operator precond, int n, int dim, real *x0, real *rhs, real tol, int maxit, int *flag){
+real cg(Operator Ax, Operator precond, int n, int dim, real *x0, real *rhs, real tol, int maxit){
real *x, *b, res = 0;
int k, i;
x = N_GNEW(n, real);
case SOLVE_METHOD_CG:
Ax = Operator_matmul_new(A);
precond = Operator_diag_precon_new(A);
- res = cg(Ax, precond, n, dim, x0, rhs, tol, maxit, flag);
+ res = cg(Ax, precond, n, dim, x0, rhs, tol, maxit);
Operator_matmul_delete(Ax);
Operator_diag_precon_delete(precond);
break;
real* (*Operator_apply)(Operator o, real *in, real *out);
};
-real cg(Operator Ax, Operator precond, int n, int dim, real *x0, real *rhs, real tol, int maxit, int *flag);
+real cg(Operator Ax, Operator precond, int n, int dim, real *x0, real *rhs, real tol, int maxit);
real SparseMatrix_solve(SparseMatrix A, int dim, real *x0, real *rhs, real tol, int maxit, int method, int *flag);