aboutsummaryrefslogtreecommitdiff
path: root/ell_grid_solve.c
diff options
context:
space:
mode:
Diffstat (limited to 'ell_grid_solve.c')
-rw-r--r--ell_grid_solve.c7
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);