From c6362a3cbe9b5b95f3b0a4b79653f46e2c70492c Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 16 Sep 2019 11:00:31 +0200 Subject: Take the finest solve level into account for correction. --- src/qms.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/qms.c b/src/qms.c index e64c560..a82cc01 100644 --- a/src/qms.c +++ b/src/qms.c @@ -1377,10 +1377,12 @@ skip_solve: /* add the solution to the list of past solutions */ { - //memcpy(W_val0, W_val1, sizeof(*W_val0) * grid_size); - //memcpy(W_val1, W_val, sizeof(*W_val1) * grid_size); +#if 0 + memcpy(W_val0, W_val1, sizeof(*W_val0) * grid_size); + memcpy(W_val1, W_val, sizeof(*W_val1) * grid_size); +#else - const double vel_fact = 1.0 / (1 << (reflevel - reflevel_top)); + const double vel_fact = 1.0 / (1 << (MIN(reflevel, ms->solve_level) - reflevel_top)); qms_assert(fabs(time - W_pred1_time[reflevel]) < 1e-13); @@ -1394,6 +1396,7 @@ skip_solve: } W_val0_time[reflevel] = W_val1_time[reflevel]; W_val1_time[reflevel] = time; +#endif } /* linearly extrapolate the past two solution to predict the next one */ -- cgit v1.2.3