aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetInterp
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2005-11-24 00:10:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2005-11-24 00:10:00 +0000
commiteab0a7ae7f477cd11cb79e11226fd658311106ff (patch)
treefc48527d60e2853108faf9f174233a59b2883e3a /Carpet/CarpetInterp
parentddc86fa7fe30e8813584b4de8c45bd58bc030ee1 (diff)
CarpetInterp: Take cctk_initial_time into account
Take cctk_initial_time into account when calculating the iteration number from cctk_time and cctk_delta_time. darcs-hash:20051124001045-dae7b-ec93e9ca13d700c7aef29d66cb1ffe2e91b8d654.gz
Diffstat (limited to 'Carpet/CarpetInterp')
-rw-r--r--Carpet/CarpetInterp/param.ccl3
-rw-r--r--Carpet/CarpetInterp/src/interp.cc6
2 files changed, 8 insertions, 1 deletions
diff --git a/Carpet/CarpetInterp/param.ccl b/Carpet/CarpetInterp/param.ccl
index e4cb553b9..37f4d791a 100644
--- a/Carpet/CarpetInterp/param.ccl
+++ b/Carpet/CarpetInterp/param.ccl
@@ -1,2 +1,5 @@
# Parameter definitions for thorn CarpetInterp
+SHARES: Cactus
+
+USES CCTK_REAL cctk_initial_time
diff --git a/Carpet/CarpetInterp/src/interp.cc b/Carpet/CarpetInterp/src/interp.cc
index 9c9c17157..c5bab62b0 100644
--- a/Carpet/CarpetInterp/src/interp.cc
+++ b/Carpet/CarpetInterp/src/interp.cc
@@ -7,6 +7,7 @@
#include <mpi.h>
#include "cctk.h"
+#include "cctk_Parameters.h"
#include "util_ErrorCodes.h"
#include "util_Table.h"
@@ -691,6 +692,8 @@ namespace CarpetInterp {
vector<CCTK_INT>& operand_indices,
vector<CCTK_INT>& time_deriv_order)
{
+ DECLARE_CCTK_PARAMETERS;
+
// Find source map
assert (source_map.size() == N_interp_points);
int iret = Util_TableGetIntArray (param_table_handle, N_interp_points,
@@ -733,7 +736,8 @@ namespace CarpetInterp {
assert (partype == PARAMETER_INTEGER);
prolongation_order_time = *(CCTK_INT const*) parptr;
- current_time = cctkGH->cctk_time / cctkGH->cctk_delta_time;
+ current_time =
+ (cctkGH->cctk_time - cctk_initial_time) / cctkGH->cctk_delta_time;
delta_time = cctkGH->cctk_delta_time;
iret = Util_TableGetIntArray (param_table_handle, N_output_arrays,