diff options
author | hawke <> | 2004-01-16 09:57:00 +0000 |
---|---|---|
committer | hawke <> | 2004-01-16 09:57:00 +0000 |
commit | 764f4fa5a7c097eee9487ce783986deed8c2b6bb (patch) | |
tree | 28888b9df212f0f9de309b43e0c1a517b2386923 /Carpet/Carpet/src/Storage.cc | |
parent | ee5f4234c983e88b536265e78d0c54b4699d0429 (diff) |
EnableGroupStorage now returns the number of active timelevels before the call. Note that this is always the maximum number of timelevels as Carpet always switches on all storage.
darcs-hash:20040116095704-58737-0b01f91957109646209f596a26c1dd4a2031389d.gz
Diffstat (limited to 'Carpet/Carpet/src/Storage.cc')
-rw-r--r-- | Carpet/Carpet/src/Storage.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Carpet/Carpet/src/Storage.cc b/Carpet/Carpet/src/Storage.cc index e2d05efd4..ed51a4d15 100644 --- a/Carpet/Carpet/src/Storage.cc +++ b/Carpet/Carpet/src/Storage.cc @@ -10,7 +10,7 @@ #include "carpet.hh" extern "C" { - static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Storage.cc,v 1.28 2003/10/14 16:39:16 schnetter Exp $"; + static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Storage.cc,v 1.29 2004/01/16 10:57:04 hawke Exp $"; CCTK_FILEVERSION(Carpet_Carpet_Storage_cc); } @@ -51,7 +51,11 @@ namespace Carpet { if (CCTK_QueryGroupStorageI(cgh, group)) { // storage was enabled previously - return 1; + const int n0 = CCTK_FirstVarIndexI(group); + assert (n0>=0); + const int num_tl = CCTK_NumTimeLevelsFromVarI(n0); + assert (num_tl>0); + return num_tl; } // Check whether this group has transfer operators |