diff options
author | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2005-09-28 17:09:31 +0000 |
---|---|---|
committer | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2005-09-28 17:09:31 +0000 |
commit | eb75db00165b16e86b94f9aa56c61f8fea601dc3 (patch) | |
tree | 3c0986245ee4fceccc0691b5a7343c89767a9742 /src/main/Groups.c | |
parent | e550a14b85001e57fdd4ee65bfdfb272d0254735 (diff) |
Undo changes that prevent more unwanted warnings about unused variables.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4155 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/Groups.c')
-rw-r--r-- | src/main/Groups.c | 151 |
1 files changed, 5 insertions, 146 deletions
diff --git a/src/main/Groups.c b/src/main/Groups.c index 45970659..605215fb 100644 --- a/src/main/Groups.c +++ b/src/main/Groups.c @@ -2733,108 +2733,12 @@ static CCTK_INT **CCTKi_ExtractSize (int dimension, } /*@@ - @routine CCTKi_GroupLength - @date Sat Jan 22 2005 - @author Erik Schnetter - @desc - Get the number of vector elements in a group - @enddesc - - @var fullgroupname - @vdesc The full name of a GV group - @vtype const char * - @vio in - @endvar - - @returntype int - @returndesc - the number of vector elements in the group - -1 - @endreturndesc -@@*/ -int CCTKi_GroupLength(const char *fullgroupname) -{ - int group; - int retval; - char *impname, *groupname; - - - retval = -1; - impname = groupname = NULL; - - if (! CCTK_DecomposeName (fullgroupname, &impname, &groupname)) - { - for (group = 0; group < n_groups; group++) - { - if (CCTK_Equals (impname, groups[group].implementation) && - CCTK_Equals (groupname, groups[group].name)) - { - retval = groups[group].vectorlength; - break; - } - } - } - - if (retval == -1) - { - CCTK_VWarn (1, __LINE__, __FILE__, "Cactus", - "CCTKi_GroupLength: No group named '%s' found", - fullgroupname); - } - - /* Free memory from CCTK_DecomposeName */ - free (impname); - free (groupname); - - return retval; -} - - /*@@ - @routine CCTKi_GroupLengthI - @date Thu Mar 24 2005 - @author Erik Schnetter - @desc - Get the number of vector elements in a group - @enddesc - - @var group - @vdesc The group index of a GV group - @vtype int - @vio in - @endvar - - @returntype int - @returndesc - the number of vector elements in the group - -1 - @endreturndesc -@@*/ -int CCTKi_GroupLengthI(int group) -{ - int retval; - - retval = -1; - - if (group < 0 || group >= n_groups) - { - CCTK_VWarn (6, __LINE__, __FILE__, "Cactus", - "CCTKi_GroupLengthI: Illegal group index %d", - group); - } - else - { - retval = groups[group].vectorlength; - } - - return retval; -} - - /*@@ @routine CCTKi_GroupLengthAsPointer @date Sun Oct 7 03:58:44 2001 @author Tom Goodale @desc - Get the number of vector elements in a group + Get the number of variables in a group, + or the number of elements in a vector group @enddesc @var fullgroupname @@ -2845,7 +2749,7 @@ int CCTKi_GroupLengthI(int group) @returntype const int * @returndesc - pointer to an integer containing the number of vector elements in the group + pointer to an integer containing the number of variables in the group NULL if group doesn't exist @endreturndesc @@*/ @@ -2866,7 +2770,8 @@ const int *CCTKi_GroupLengthAsPointer(const char *fullgroupname) if (CCTK_Equals (impname, groups[group].implementation) && CCTK_Equals (groupname, groups[group].name)) { - retval = &groups[group].vectorlength; + retval = groups[group].vectorlength ? + &groups[group].vectorlength : &groups[group].n_variables; break; } } @@ -2887,52 +2792,6 @@ const int *CCTKi_GroupLengthAsPointer(const char *fullgroupname) } /*@@ - @routine CCTKi_GroupLengthAsPointerI - @date Sun Jan 27 19:13 2002 - @author Erik Schnetter - @desc - Get the number of vector elements in a group - @enddesc - @calls - @calledby - @history - - @endhistory - @var group - @vdesc The index of a GV group - @vtype int - @vio in - @vcomment - - @endvar - - @returntype const int * - @returndesc - pointer to an integer containing the number of vector elements in the group - NULL if group doesn't exist - @endreturndesc -@@*/ -const int *CCTKi_GroupLengthAsPointerI(int group) -{ - const int *retval; - - retval = NULL; - - if (group < 0 || group >= n_groups) - { - CCTK_VWarn (6, __LINE__, __FILE__, "Cactus", - "CCTKi_GroupLengthAsPointerI: Group index %d does not exist", - group); - } - else - { - retval = &groups[group].vectorlength; - } - - return retval; -} - - /*@@ @routine IntParameterEvaluator @date Fri Oct 12 10:01:32 2001 @author Tom Goodale |