diff options
author | Anton Khirnov <anton@khirnov.net> | 2019-09-16 11:00:31 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2019-09-16 11:00:31 +0200 |
commit | c6362a3cbe9b5b95f3b0a4b79653f46e2c70492c (patch) | |
tree | 528392909dec717a9eec1a57ca963ad743a648b5 | |
parent | 1424606c79dd3fa71125a7fda37e34372104ac32 (diff) |
Take the finest solve level into account for correction.
-rw-r--r-- | src/qms.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 */ |