diff options
author | Anton Khirnov <anton@khirnov.net> | 2019-05-16 18:06:53 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2019-05-16 18:25:31 +0200 |
commit | 7a4e7a23022fee5431e039e385a96a5244ea4fb9 (patch) | |
tree | 4ccfd18f5603a54e731526bc65beee2067a0a08f | |
parent | 40cc57d76a0bfe0bb16572b45c21b28c5a2509da (diff) |
egs: simplify condition
-rw-r--r-- | ell_grid_solve.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ell_grid_solve.c b/ell_grid_solve.c index ac5aa28..13d9072 100644 --- a/ell_grid_solve.c +++ b/ell_grid_solve.c @@ -338,9 +338,7 @@ static int solve_relax_step(EGSContext *ctx, int export_res) } if (export_res) { - if (u_next_valid) - residual_calc(ctx, 1); - else { + if (!u_next_valid) { mg2di_timer_start(&r->timer_correct); tp_execute(ctx->tp, ctx->domain_size[1], residual_add_task, ctx); mg2di_timer_stop(&r->timer_correct); @@ -348,8 +346,9 @@ static int solve_relax_step(EGSContext *ctx, int export_res) memset(priv->reflect_disable, 0, sizeof(priv->reflect_disable)); boundaries_apply(ctx, ctx->u, 0); - residual_calc(ctx, 1); } + + residual_calc(ctx, 1); } else { mg2di_assert(u_next_valid); residual_calc(ctx, 0); |