summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-03-03 14:11:08 +0100
committerAnton Khirnov <anton@khirnov.net>2019-03-04 17:14:07 +0100
commitf2cd89401721d1f547a54ff6619d0dc9c8c9e863 (patch)
tree67c4544489f1ed325cb2a025cdf0d1915f33350e
parent45f41504f74896cf91733878fb5f012af653d967 (diff)
mg2d: be less strict for converging to machine epsilon
-rw-r--r--mg2d.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mg2d.c b/mg2d.c
index a8511da..eb3973b 100644
--- a/mg2d.c
+++ b/mg2d.c
@@ -362,7 +362,7 @@ static int mg_solve_subgrid(MG2DContext *ctx, MG2DLevel *level)
finish:
res_new = level->solver->residual_max;
if (!isfinite(res_new) ||
- (res_new > DBL_EPSILON && res_old / res_new <= 1e-1)) {
+ (res_new > 1e2 * DBL_EPSILON && res_old / res_new <= 1e-1)) {
mg2di_log(&ctx->priv->logger, MG2D_LOG_ERROR,
"The relaxation step at level %d has diverged: %g -> %g\n",
level->depth, res_old, res_new);