summaryrefslogtreecommitdiff
path: root/src/qms.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/qms.c')
-rw-r--r--src/qms.c9
1 files 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 */