From 1145d43ffef5568e04fb79a4f73ecd69f2f09ce2 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 5 May 2019 15:45:10 +0200 Subject: egs: allow the same context to be used for both relaxation and exact solves --- relax_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'relax_test.c') diff --git a/relax_test.c b/relax_test.c index 50ad04c..599fb4d 100644 --- a/relax_test.c +++ b/relax_test.c @@ -75,7 +75,7 @@ int main(int argc, char **argv) N = (1L << log2N) + 1; maxiter = 1L << log2maxiter; - ctx = mg2di_egs_alloc(EGS_SOLVER_RELAXATION, (size_t [2]){N, N}); + ctx = mg2di_egs_alloc((size_t [2]){N, N}); if (!ctx) { fprintf(stderr, "Error allocating the solver context\n"); return 1; @@ -144,7 +144,7 @@ int main(int argc, char **argv) res_old = findmax(ctx->residual->data, ctx->residual->stride[0] * ctx->domain_size[1]); for (int i = 0; i < maxiter; i++) { - ret = mg2di_egs_solve(ctx, 0); + ret = mg2di_egs_solve(ctx, EGS_SOLVE_RELAXATION, 0); if (ret < 0) { fprintf(stderr, "Error during relaxation\n"); ret = 1; -- cgit v1.2.3