aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2004-06-29 08:41:27 +0000
committertradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2004-06-29 08:41:27 +0000
commit6046e1ba82096437d6bed4ade54e8358e1ff12db (patch)
treeb3924f2c0a26292c79a35f12e44a8eff0697a4dc /src
parentf9ffeddc36c783357fd689b9da744b495094703e (diff)
Return size 1 in PUGH_ArrayGroupSize() for zero-sized vector groups (same as
for non-allocated variables). This closes PR CactusPUGH/1792: "Zero sized vector groups kill PUGH". git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@448 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src')
-rw-r--r--src/Storage.c45
1 files changed, 5 insertions, 40 deletions
diff --git a/src/Storage.c b/src/Storage.c
index 70044f0..dfe9024 100644
--- a/src/Storage.c
+++ b/src/Storage.c
@@ -142,6 +142,10 @@ const int *PUGH_ArrayGroupSize (const cGH *GH,
retval = &one;
}
}
+ else if (CCTK_NumVarsInGroupI (group) == 0)
+ {
+ retval = &one;
+ }
else
{
if (groupname)
@@ -482,44 +486,6 @@ int PUGH_DisableGroupStorage (const cGH *GH, const char *groupname)
return (retval);
}
-/*@@
- @routine PUGH_ReturnTotalStorage
- @author Gerd Lanfermann
- @date 19 Feb 2002
- @desc
- Return static float totalstorage
- @enddesc
-
- @returntype float
- @returndesc
- total storage
- @endreturndesc
-@@*/
-
-float PUGH_ReturnTotalStorage(void)
-{
- return(totalstorage);
-}
-
-/*@@
- @routine PUGH_ReturnMaxStorage
- @author Gerd Lanfermann
- @date 19 Feb 2002
- @desc
- Return static float maxstorage
- @enddesc
-
- @returntype float
- @returndesc
- maximum storage
- @endreturndesc
-@@*/
-
-float PUGH_ReturnMaxStorage(void)
-{
- return(maxstorage);
-}
-
/********************************************************************
******************** Internal Routines ************************
@@ -582,8 +548,7 @@ static int PUGH_EnableGArrayGroupStorage (pGH *pughGH,
{
for (level = 0; level < n_timelevels; level++)
{
- GA = (pGA *) pughGH->variables[var][level];
-
+ GA = pughGH->variables[var][level];
if (GA->storage == PUGH_NOSTORAGE)
{
#ifdef DEBUG_PUGH