diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-01-20 09:02:19 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-01-20 09:02:19 +0000 |
commit | 5531da65218951b61b3b4e9961a897ac110cb3bf (patch) | |
tree | b3d9e8c474898d9f406e5a342e9dba4f9b046719 /src/main/InitialiseDataStructures.c | |
parent | eaa1066a2272dbb3f9cf8eb457bfab69d8d51ab5 (diff) |
Now call the functions in the CatusBindings library.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@86 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/InitialiseDataStructures.c')
-rw-r--r-- | src/main/InitialiseDataStructures.c | 150 |
1 files changed, 18 insertions, 132 deletions
diff --git a/src/main/InitialiseDataStructures.c b/src/main/InitialiseDataStructures.c index 98cd9364..7abb8f50 100644 --- a/src/main/InitialiseDataStructures.c +++ b/src/main/InitialiseDataStructures.c @@ -13,150 +13,36 @@ #include "flesh.h" -#include "Implementations.h" -#include "StoreVariableData.h" - static char *rcsid = "$Id$"; -#define TEST_THORNREGISTRATION -#ifdef TEST_THORNREGISTRATION - -int test_startup(); -int test_rfr_init(cGH *); -int test_param_init(); -int test_param_set(const char *, const char *); -int test_param_get(const char *, void **); -int test_private_group_setup(cGH *); -int test_protected_group_setup(cGH *); -int test_public_group_setup(cGH *); - - -static t_thorndata thorndata[] = {"test", "test", test_startup, test_rfr_init, test_param_init, test_param_set, test_param_get, test_private_group_setup, test_protected_group_setup, test_public_group_setup}; - -static int n_thorns=1; - -#else -#include "thorndata.h" - -#endif + /*@@ + @routine InitialiseDataStructures + @date Wed Jan 20 09:27:56 1999 + @author Tom Goodale + @desc + + @enddesc + @calls + @calledby + @history + + @endhistory +@@*/ int InitialiseDataStructures(tFleshConfig *ConfigData) { - int i; - ConfigData->nGHs = 0; ConfigData->GH = NULL; - for(i=0; i < n_thorns; i++) - { - CCTK_RegisterThorn(thorndata[i].name, thorndata[i].implementation, - &(thorndata[i])); - } - - return 0; -} - -#ifdef TEST_THORNREGISTRATION - -static struct -{ - int test_int; - double test_double; - char test_keyword[20]; -} test_params = {1,1.5,"alpha"}; - -int test_startup() -{ -} - -int test_rfr_init(cGH *GH) -{ -} - -int test_param_init() -{ -} - -int test_param_set(const char *param, const char *value) -{ - char temp[1001]; - char *test; - int p; - - if(!strcmp(param, "test_int")) - { - test_params.test_int = atoi(value); - } - - if(!strcmp(param, "test_double")) - { - strncpy(temp, value, 1000); - - for (p=0;p<strlen(temp);p++) - if (temp[p] == 'E' || temp[p] == 'd' || temp[p] == 'D') - temp[p] = 'e'; - test_params.test_double = atof(temp); - } - - if(!strcmp(param, "test_keyword")) - { - if(!strcmp(value,"alpha")|| - !strcmp(value,"beta")) - { - strcpy(test_params.test_keyword, value); - } - } - -} - -int test_param_get(const char *param, void **value) -{ - int retval; - - int *temp_int; - double *temp_double; - char *temp_char; + /* Initialise appropriate subsystems. */ - retval = 0; - if(!strcmp(param, "test_int")) - { - temp_int = (int *)malloc(sizeof(int)); - *temp_int = test_params.test_int; - *value = (void *)temp_int; - retval = 1; - } + CCTK_BindingsParametersInitialise(); + CCTK_BindingsVariablesInitialise(); + CCTK_BindingsScheduleInitialise(); - if(!strcmp(param, "test_double")) - { - temp_double = (double *)malloc(sizeof(double)); - *temp_double = test_params.test_double; - *value = (void *)temp_double; - retval = 2; - } - if(!strcmp(param, "test_keyword")) - { - temp_char = (char *)malloc(strlen((test_params.test_keyword)+1)*sizeof(char)); - strcpy(temp_char, test_params.test_keyword); - *value = (void *)temp_char; - retval = 3; - } - - return retval; - -} -int test_private_group_setup(cGH *GH) -{ -} -int test_protected_group_setup(cGH *GH) -{ -} -int test_public_group_setup(cGH *GH) -{ + return 0; } - -#endif - |