summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-01-30 14:03:13 +0100
committerAnton Khirnov <anton@khirnov.net>2019-02-02 11:52:04 +0100
commitb59388074bd6107c827e372d3ca6f6b6bce8c5b0 (patch)
tree14c7c4cd848090303fe2b902b16825ad1699713b
parent64ddeff65f6e16432dba67c84304d42e4ed79e4c (diff)
mg2d: relax the condition on residual convergence
Apparently in certain cases the residual can briefly grow, even though the process converges after.
-rw-r--r--mg2d.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mg2d.c b/mg2d.c
index 453a9c4..0cb9dd8 100644
--- a/mg2d.c
+++ b/mg2d.c
@@ -548,7 +548,7 @@ int mg2d_solve(MG2DContext *ctx)
mg2di_log(&priv->logger, MG2D_LOG_VERBOSE,
"finished toplevel iteration %d, residual %g -> %g (%g)\n",
i, res_prev, res_cur, res_prev / res_cur);
- if (res_cur / res_prev > 1.0) {
+ if (res_cur / res_prev > 1e1) {
mg2di_log(&priv->logger, MG2D_LOG_ERROR, "A multigrid iteration diverged\n");
ret = MG2D_ERR_DIVERGE;
goto fail;