summaryrefslogtreecommitdiff
path: root/src/main/Groups.c
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-02-08 19:01:17 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-02-08 19:01:17 +0000
commitec93f400006fd4e1e47698de2c0ef15b48dcc0e0 (patch)
treee08b913b72e7a2d130864dd65b3481641d7d3f19 /src/main/Groups.c
parentc303d67a0f225e778aaa94989d814849b7da8052 (diff)
Added CCTK_GetGroupData which returns the types and number of variables
of a group. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@228 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/Groups.c')
-rw-r--r--src/main/Groups.c41
1 files changed, 38 insertions, 3 deletions
diff --git a/src/main/Groups.c b/src/main/Groups.c
index f75d1112..36eed9fe 100644
--- a/src/main/Groups.c
+++ b/src/main/Groups.c
@@ -16,7 +16,7 @@
#include "Misc.h"
#include "Groups.h"
-static char *rcsid = "$Id$";
+static char *rcsid = "$Header$";
/* Static variables needed to hold group and variable data. */
@@ -278,8 +278,8 @@ int CCTK_GetGroupNum(const char *implementation,
@@*/
int CCTK_GetVarNum(const char *implementation,
- const char *group_name,
- const char *variable_name)
+ const char *group_name,
+ const char *variable_name)
{
int retval;
int group_num;
@@ -463,3 +463,38 @@ int CCTK_VTypeNumber(const char *type)
return retval;
}
+
+
+ /*@@
+ @routine CCTK_GetGroupData
+ @date Mon Feb 8 15:56:01 1999
+ @author Tom Goodale
+ @desc
+ Gets the group type, the variable type, and the number of variables
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+@@*/
+int CCTK_GetGroupData(int group, int *gtype, int *vtype, int *n_variables)
+{
+ int return_code;
+
+ if(group >=0 && group < n_groups)
+ {
+ *gtype = groups[group].gtype;
+ *vtype = groups[group].vtype;
+ *n_variables = groups[group].n_variables;
+
+ return_code = 1;
+ }
+ else
+ {
+ return_code = 0;
+ }
+
+ return return_code;
+}