From 9b35c115bd5f16e020718de67a961252ecec51fc Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 16 Jun 2021 17:54:23 -0700 Subject: [PATCH] remove unused flag argument to cg --- lib/sfdpgen/post_process.c | 2 +- lib/sfdpgen/sparse_solve.c | 4 ++-- lib/sfdpgen/sparse_solve.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sfdpgen/post_process.c b/lib/sfdpgen/post_process.c index a3a5ba0d0..66d914642 100644 --- a/lib/sfdpgen/post_process.c +++ b/lib/sfdpgen/post_process.c @@ -585,7 +585,7 @@ static real uniform_stress_solve(SparseMatrix Lw, real alpha, int dim, real *x0, 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); } diff --git a/lib/sfdpgen/sparse_solve.c b/lib/sfdpgen/sparse_solve.c index 582956fb3..dbe1873a9 100644 --- a/lib/sfdpgen/sparse_solve.c +++ b/lib/sfdpgen/sparse_solve.c @@ -216,7 +216,7 @@ static real conjugate_gradient(Operator A, Operator precon, int n, real *x, real 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); @@ -295,7 +295,7 @@ real SparseMatrix_solve(SparseMatrix A, int dim, real *x0, real *rhs, real tol, 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; diff --git a/lib/sfdpgen/sparse_solve.h b/lib/sfdpgen/sparse_solve.h index cd4580bd2..a29c25223 100644 --- a/lib/sfdpgen/sparse_solve.h +++ b/lib/sfdpgen/sparse_solve.h @@ -23,7 +23,7 @@ struct Operator_struct { 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); -- 2.40.0