From 6046e1ba82096437d6bed4ade54e8358e1ff12db Mon Sep 17 00:00:00 2001 From: tradke Date: Tue, 29 Jun 2004 08:41:27 +0000 Subject: 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 --- src/Storage.c | 45 +++++---------------------------------------- 1 file 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 -- cgit v1.2.3