diff options
author | Anton Khirnov <anton@khirnov.net> | 2019-09-30 08:48:20 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2019-09-30 08:48:20 +0200 |
commit | e62cd9dc639e2b73b31f1b6278da285c23d28373 (patch) | |
tree | 06e31b785dacac0b6ca4629a16d404ff35cf518a | |
parent | bd71174fd6dc58c8f22ec3325d95c9057daeaf20 (diff) |
Use the solved values, not the smoothed ones, for correction calculation.
-rw-r--r-- | interface.ccl | 1 | ||||
-rw-r--r-- | schedule.ccl | 1 | ||||
-rw-r--r-- | src/qms.c | 5 |
3 files changed, 4 insertions, 3 deletions
diff --git a/interface.ccl b/interface.ccl index 10a472d..fefb24d 100644 --- a/interface.ccl +++ b/interface.ccl @@ -26,6 +26,7 @@ USES FUNCTION VarDataPtrI public: REAL W_val TYPE=GF TIMELEVELS=2 +REAL W_eval TYPE=GF TIMELEVELS=1 tags='Prolongation="None"' REAL W_val0 TYPE=GF TIMELEVELS=1 tags='Prolongation="None"' REAL W_val1 TYPE=GF TIMELEVELS=1 tags='Prolongation="None"' REAL W_val0_time TYPE=ARRAY DIM=1 SIZE=32 DISTRIB=constant diff --git a/schedule.ccl b/schedule.ccl index 1f2b6d0..244300f 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -46,6 +46,7 @@ if (CCTK_EQUALS(lapse_source, "QMS_MG")) { STORAGE: W_pred1_time STORAGE: W_val[2] + STORAGE: W_eval STORAGE: W_val0 STORAGE: W_val1 STORAGE: W_val0_time @@ -1391,15 +1391,14 @@ skip_solve: const double vel_fact = 1.0 / (1 << (MIN(reflevel, ms->solve_level) - reflevel_top)); - qms_assert(fabs(time - W_pred1_time[reflevel]) < 1e-13); - #pragma omp parallel for for (int i = 0; i < grid_size; i++) { const double sol_new = W_val[i]; - const double delta = sol_new - W_pred1[i]; + const double delta = sol_new - W_eval[i]; W_val0[i] = W_val1[i] + delta - delta * vel_fact; W_val1[i] = sol_new; + W_eval[i] = 2 * W_val1[i] - W_val0[i]; } W_val0_time[reflevel] = W_val1_time[reflevel]; W_val1_time[reflevel] = time; |