aboutsummaryrefslogtreecommitdiff
path: root/relax_test.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-05-05 15:45:10 +0200
committerAnton Khirnov <anton@khirnov.net>2019-05-06 18:23:59 +0200
commit1145d43ffef5568e04fb79a4f73ecd69f2f09ce2 (patch)
treec4c32f122e55497848b2d6fe0adc013fb1fc88af /relax_test.c
parente91409830cbb4c06c4035d7084aa20b0d4d259bc (diff)
egs: allow the same context to be used for both relaxation and exact solves
Diffstat (limited to 'relax_test.c')
-rw-r--r--relax_test.c4
1 files changed, 2 insertions, 2 deletions
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;