diff options
-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 */ |