diff options
Diffstat (limited to 'src/IO')
-rw-r--r-- | src/IO/IOMethods.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/IO/IOMethods.c b/src/IO/IOMethods.c index cd245cf0..02282f3f 100644 --- a/src/IO/IOMethods.c +++ b/src/IO/IOMethods.c @@ -118,6 +118,7 @@ int CCTKi_RegisterIOMethod (const char *thorn, const char *name) /* Initialise the I/O method structure with dummy routines */ new_method->implementation = CCTK_ThornImplementation (thorn); + new_method->name = name; new_method->OutputGH = DummyOutputGH; new_method->OutputVarAs = DummyOutputVarAs; new_method->TriggerOutput = DummyTriggerOutput; @@ -520,6 +521,34 @@ const char *CCTK_IOMethodImplementation (int handle) } + /*@@ + @routine CCTK_IOMethod + @date Thu Dec 27 2001 + @author Gabrielle Allen + @desc + Provide the IO Method name + @enddesc + @var handle + @vdesc handle of I/O method + @vtype int + @vio in + @endvar + + @returntype const char * + @returndesc + IO Method + @endreturndesc +@@*/ +const char *CCTK_IOMethod (int handle) +{ + struct IOMethod *method; + + method = (struct IOMethod *) Util_GetHandledData (IOMethods, handle); + + return (method ? method->name : NULL); +} + + /******************************************************************** ********************* Local Routines ************************* ********************************************************************/ |