summaryrefslogtreecommitdiff
path: root/src/main/SetParams.c
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-01-20 09:02:19 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-01-20 09:02:19 +0000
commit5531da65218951b61b3b4e9961a897ac110cb3bf (patch)
treeb3d9e8c474898d9f406e5a342e9dba4f9b046719 /src/main/SetParams.c
parenteaa1066a2272dbb3f9cf8eb457bfab69d8d51ab5 (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/SetParams.c')
-rw-r--r--src/main/SetParams.c92
1 files changed, 2 insertions, 90 deletions
diff --git a/src/main/SetParams.c b/src/main/SetParams.c
index 45da1178..cce1c646 100644
--- a/src/main/SetParams.c
+++ b/src/main/SetParams.c
@@ -16,12 +16,6 @@
static char *rcsid = "$Id$";
-int CCTK_ExtractImplementation(char **imp, char **name, const char *parameter);
-int CCTK_FindImpOfGlobalParam(char **imp, char **name, const char *parameter);
-int CCTK_SetImplementationParameter(const char *imp,
- const char *name,
- const char *value);
-
/*@@
@routine CCTK_SetParameter
@date Tue Jan 12 19:25:37 1999
@@ -39,29 +33,15 @@ int CCTK_SetImplementationParameter(const char *imp,
int CCTK_SetParameter(const char *parameter, const char *value)
{
int retval;
- char *imp;
- char *name;
- CCTK_ExtractImplementation(&imp, &name, parameter);
+ retval = CCTK_BindingsParameterSet(parameter, value);
- if(!imp)
- {
- CCTK_FindImpOfGlobalParam(&imp, &name, parameter);
- }
- if(imp)
- {
- retval = CCTK_SetImplementationParameter(imp, name, value);
- }
- else
+ if(!retval)
{
fprintf(stderr, "Unknown parameter %s\n", parameter);
- retval = 1;
}
- free(imp);
- free(name);
-
return retval;
}
@@ -125,71 +105,3 @@ int CCTK_ExtractImplementation(char **imp, char **name, const char *parameter)
return retval;
}
- /*@@
- @routine CCTK_FindImpOfGlobalParam
- @date Wed Jan 13 11:25:00 1999
- @author Tom Goodale
- @desc
- Finds the implementation name of a global (public) parameter.
- @enddesc
- @calls
- @calledby
- @history
-
- @endhistory
-
-@@*/
-int CCTK_FindImpOfGlobalParam(char **imp, char **name, const char *parameter)
-{
- *imp = NULL;
- *name = NULL;
-
-
- return 1;
-}
-
-
- /*@@
- @routine CCTK_SetImplementationParameter
- @date Wed Jan 13 11:25:53 1999
- @author Tom Goodale
- @desc
- Sets the value of the parameter in an implementation.
- @enddesc
- @calls
- @calledby
- @history
-
- @endhistory
-
-@@*/
-int CCTK_SetImplementationParameter(const char *imp,
- const char *name,
- const char *value)
-{
- int n_thorns;
- int thorn;
-
- char **thornlist;
- t_thorndata *thorndata;
-
- if((n_thorns = GetImplementationThorns(imp, &thornlist)))
- {
- for(thorn = 0; thorn < n_thorns; thorn++)
- {
- if(GetThornData(thornlist[thorn], &thorndata))
- {
- thorndata->param_set(name, value);
- }
- }
- }
- else
- {
- if(GetThornData(imp, &thorndata))
- {
- thorndata->param_set(name, value);
- }
- }
-
- return 0;
-}