summaryrefslogtreecommitdiff
path: root/src/comm
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-01-16 17:51:29 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-01-16 17:51:29 +0000
commit4c656d84e766b7d46b5460b65a46dbf2880eef0e (patch)
treec11d02061d88c99562dbe2414e8968a5b6631035 /src/comm
parent1b39ea4a0a10279dcc2adf1f19245791823a7529 (diff)
Fix the return values of CactusDefaultGroupStorage{In,De}crease. They
cannot rely on CCTK_{En,Dis}ableGroupStorage, becuase those just return a flag. Explicltly call CCTK_QueryGroupStorageI and CCTK_NumTimeLevelsI. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3516 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/comm')
-rw-r--r--src/comm/CactusDefaultComm.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/src/comm/CactusDefaultComm.c b/src/comm/CactusDefaultComm.c
index 6b16fa90..f8b28ab0 100644
--- a/src/comm/CactusDefaultComm.c
+++ b/src/comm/CactusDefaultComm.c
@@ -654,18 +654,21 @@ int CactusDefaultGroupStorageIncrease (const cGH *GH, int n_groups,
* false and did all timelevels, only enable storage if timelevels is
not 0
*/
- value = 0;
+ if(CCTK_QueryGroupStorageI(GH, groups[i]))
+ {
+ value = CCTK_NumTimeLevelsI(groups[i]);
+ }
+ else
+ {
+ value = 0;
+ }
if(timelevels[i] != 0)
{
gname = CCTK_GroupName(groups[i]);
- value = CCTK_EnableGroupStorage(GH, gname);
+ CCTK_EnableGroupStorage(GH, gname);
free (gname);
- if (value)
- {
- value = CCTK_NumTimeLevelsI(groups[i]);
- }
- retval += value;
}
+ retval += value;
if(status)
{
status[i] = value;
@@ -760,18 +763,21 @@ int CactusDefaultGroupStorageDecrease (const cGH *GH, int n_groups,
/* Since the old enable and disable group storage just returned true or
* false and did all timelevels, only disable storage if timelevels is 0
*/
- value = 0;
+ if(CCTK_QueryGroupStorageI(GH, groups[i]))
+ {
+ value = CCTK_NumTimeLevelsI(groups[i]);
+ }
+ else
+ {
+ value = 0;
+ }
if(timelevels[i] == 0)
{
gname = CCTK_GroupName(groups[i]);
- value = CCTK_DisableGroupStorage(GH, gname);
+ CCTK_DisableGroupStorage(GH, gname);
free (gname);
- if (value)
- {
- value = CCTK_NumTimeLevelsI(groups[i]);
- }
- retval += value;
}
+ retval += value;
if(status)
{
status[i] = value;