diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2012-02-13 11:25:13 +0100 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2012-02-13 11:25:13 +0100 |
commit | 02ab91db2fa276270246c7bed87770f3a28af984 (patch) | |
tree | cf5968f0ac9f208effb502fad9169a6ebc9820ed | |
parent | 4ae122baf12fc05b2c66508892cab12953f86b34 (diff) |
Inform the Accelerator thorn that past timelevels have been filled on the host
-rw-r--r-- | Carpet/Carpet/interface.ccl | 6 | ||||
-rw-r--r-- | Carpet/Carpet/src/Cycle.cc | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/Carpet/Carpet/interface.ccl b/Carpet/Carpet/interface.ccl index 506f9e8d4..4f53054f6 100644 --- a/Carpet/Carpet/interface.ccl +++ b/Carpet/Carpet/interface.ccl @@ -231,6 +231,12 @@ CCTK_INT FUNCTION Accelerator_PostSync \ CCTK_INT IN ngroups) USES FUNCTION Accelerator_PostSync +CCTK_INT FUNCTION Accelerator_NotifyVariableWritten \ + (CCTK_POINTER_TO_CONST IN cctkGH, \ + CCTK_INT IN vi, \ + CCTK_INT IN tl, \ + CCTK_INT IN onhost) +USES FUNCTION Accelerator_NotifyVariableWritten # Access coordinate information (on the coarse level) diff --git a/Carpet/Carpet/src/Cycle.cc b/Carpet/Carpet/src/Cycle.cc index bd0acac0a..64b7ff25b 100644 --- a/Carpet/Carpet/src/Cycle.cc +++ b/Carpet/Carpet/src/Cycle.cc @@ -238,6 +238,13 @@ namespace Carpet { assert (reflevel>=0 and reflevel<reflevels); for (int m=0; m<(int)arrdata.AT(group).size(); ++m) { for (int var=0; var<CCTK_NumVarsInGroupI(group); ++var) { + + if (CCTK_IsFunctionAliased("Accelerator_NotifyVariableWritten")) { + for (int tl = 1; tl < arrdata.AT(group).AT(m).data.AT(var)->timelevels(mglevel,reflevel); tl++) { + Accelerator_NotifyVariableWritten(cctkGH, CCTK_FirstVarIndexI(group)+var, tl, 1 /* on host */); + } + } + arrdata.AT(group).AT(m).data.AT(var)-> fill_all (reflevel, mglevel); } |