/*@@ @file Startup.c @date Friday 18th September 1999 @author Gabrielle Allen @desc Startup routines for IOBasic. @enddesc @@*/ #include #include #include "cctk.h" /* prototypes of functions to be registered */ int IOBasic_OutputGH (cGH *GH); int IOBasic_TriggerOutput (cGH *GH, int); int IOBasic_TimeForOutput (cGH *GH, int); int IOBasic_OutputVarAs (cGH *GH, const char *var, const char *alias); void *IOBasic_SetupGH (tFleshConfig *config, int convergence_level, cGH *GH); int IOBasic_InitGH (cGH *GH); int IOBasic_OutputInfoGH (cGH *GH); int IOBasic_TriggerOutputInfo (cGH *GH, int); int IOBasic_TimeForInfo (cGH *GH, int); /*@@ @routine IOBasic_Startup @date Friday 18th September 1999 @author Gabrielle Allen @desc The startup registration routine for Basic IO. Registers the GH extensions needed for IO and the registerable routines used for each method of IO. IO does not overload any functions. @enddesc @calls @calledby @history @endhistory @@*/ void IOBasic_Startup (void) { int IOMethod; int IO_GHExtension; if (CCTK_GHExtensionHandle ("IO") < 0) { CCTK_WARN (1, "Thorn IOUtil was not activated. " "No IOBasic IO methods will be enabled."); return; } IO_GHExtension = CCTK_RegisterGHExtension ("IOBasic"); CCTK_RegisterGHExtensionSetupGH (IO_GHExtension, IOBasic_SetupGH); CCTK_RegisterGHExtensionInitGH (IO_GHExtension, IOBasic_InitGH); /* Register the IOBasic routines as output methods */ IOMethod = CCTK_RegisterIOMethod ("Scalar"); CCTK_RegisterIOMethodOutputGH (IOMethod, IOBasic_OutputGH); CCTK_RegisterIOMethodOutputVarAs (IOMethod, IOBasic_OutputVarAs); CCTK_RegisterIOMethodTimeToOutput (IOMethod, IOBasic_TimeForOutput); CCTK_RegisterIOMethodTriggerOutput (IOMethod, IOBasic_TriggerOutput); IOMethod = CCTK_RegisterIOMethod ("Info"); CCTK_RegisterIOMethodOutputGH (IOMethod, IOBasic_OutputInfoGH); CCTK_RegisterIOMethodTimeToOutput (IOMethod, IOBasic_TimeForInfo); CCTK_RegisterIOMethodTriggerOutput (IOMethod, IOBasic_TriggerOutputInfo); }