summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-05-23 11:41:12 +0200
committerAnton Khirnov <anton@khirnov.net>2019-05-23 11:41:31 +0200
commit5d7d6aae888a9e85b68b0663833b7200ea3f1e7c (patch)
tree3441f551eb2237bcd2ba40b59e67276091b55f07
parentc353dd0befea615adf233afa33c47dd9be6b94a0 (diff)
mg2d_test: scale the tolerance with step size
-rw-r--r--mg2d_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mg2d_test.c b/mg2d_test.c
index 23e52bb..fc1d7dd 100644
--- a/mg2d_test.c
+++ b/mg2d_test.c
@@ -11,7 +11,7 @@
#define ARRAY_ELEMS(x) (sizeof(x) / sizeof(*x))
#define MAXITER 64
-#define TOL 1e-9
+#define TOL 5e-15
#define DOMAIN_SIZE 1.0
@@ -118,9 +118,9 @@ int main(int argc, char **argv)
ctx->nb_relax_pre = 2;
ctx->nb_cycles = 1;
ctx->nb_relax_post = 2;
- ctx->tol = TOL;
+ ctx->tol = TOL / (ctx->step[0] * ctx->step[1]);
ctx->nb_threads = 1;
- ctx->log_level = MG2D_LOG_VERBOSE;
+ ctx->log_level = MG2D_LOG_INFO;
for (int bnd_loc = 0; bnd_loc < ARRAY_ELEMS(ctx->boundaries); bnd_loc++) {
MG2DBoundary *bnd = ctx->boundaries[bnd_loc];