aboutsummaryrefslogtreecommitdiff
path: root/src/Startup.c
diff options
context:
space:
mode:
authortradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>1999-06-25 11:40:06 +0000
committertradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>1999-06-25 11:40:06 +0000
commitde89a5c6b08b5ad9eb7044dc8b2c04a965b19982 (patch)
tree339e8646892a1638fc0d9b81c38cfed38acb238c /src/Startup.c
parentf9c5c1bc939250652e057dcd06f5ce9701b8a0bb (diff)
The hopefully final renaming of the FlexIO thorn.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@2 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src/Startup.c')
-rw-r--r--src/Startup.c78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/Startup.c b/src/Startup.c
new file mode 100644
index 0000000..a9d5113
--- /dev/null
+++ b/src/Startup.c
@@ -0,0 +1,78 @@
+ /*@@
+ @file Startup.c
+ @date Fri May 21 1999
+ @author Thomas Radke
+ @desc
+ Startup routines for IOFlexIO.
+ @enddesc
+ @history
+ @hauthor Thomas Radke @hdate May 21 1999
+ @hdesc Just copied from thorn IOFlexIO.
+ @endhistory
+ @@*/
+
+#include <stdio.h>
+
+#include "flesh.h"
+#include "GHExtensions.h"
+#include "declare_parameters.h"
+
+/* prototypes of functions to be registered */
+int IOFlexIO_Output2DGH (cGH *GH);
+int IOFlexIO_TriggerOutput2D (cGH *GH, int);
+int IOFlexIO_TimeFor2D (cGH *GH, int);
+int IOFlexIO_Output2DVarAs (cGH *GH, const char *var, const char *alias);
+int IOFlexIO_Output3DGH (cGH *GH);
+int IOFlexIO_TriggerOutput3D (cGH *GH, int);
+int IOFlexIO_TimeFor3D (cGH *GH, int);
+int IOFlexIO_Output3DVarAs (cGH *GH, const char *var, const char *alias);
+void *IOFlexIO_SetupGH (tFleshConfig *config, int convergence_level, cGH *GH);
+int IOFlexIO_InitGH (cGH *GH);
+int IOFlexIO_rfrTraverseGH (cGH *GH, int rfrpoint);
+
+
+
+ /*@@
+ @routine IOFlexIO_Startup
+ @date Fri May 21 1999
+ @author Thomas Radke
+ @desc
+ The startup registration routine for IOFlexIO.
+ Registers the GH extensions needed for IOFlexIO and
+ the registerable routines used for each method of IOFlexIO.
+ IOFlexIO does not overload any functions.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+@@*/
+void IOFlexIO_Startup (void)
+{
+ DECLARE_PARAMETERS
+ int IO_GHExtension;
+ int IOMethod;
+
+ IO_GHExtension = CCTK_RegisterGHExtension ("IOFlexIO");
+ CCTK_RegisterGHExtensionSetupGH (IO_GHExtension, IOFlexIO_SetupGH);
+ CCTK_RegisterGHExtensionInitGH (IO_GHExtension, IOFlexIO_InitGH);
+ CCTK_RegisterGHExtensionrfrTraverseGH (IO_GHExtension, IOFlexIO_rfrTraverseGH);
+
+ /* Register the 2D and 3D IOFlexIO routines as output methods */
+ if (strlen (output2D) > 0) {
+ IOMethod = CCTK_RegisterIOMethod ("IOFlexIO_2D");
+ CCTK_RegisterIOMethodOutputGH (IOMethod, IOFlexIO_Output2DGH);
+ CCTK_RegisterIOMethodOutputVarAs (IOMethod, IOFlexIO_Output2DVarAs);
+ CCTK_RegisterIOMethodTimeToOutput (IOMethod, IOFlexIO_TimeFor2D);
+ CCTK_RegisterIOMethodTriggerOutput (IOMethod, IOFlexIO_TriggerOutput2D);
+ }
+ if (strlen (output3D) > 0) {
+ IOMethod = CCTK_RegisterIOMethod ("IOFlexIO_3D");
+ CCTK_RegisterIOMethodOutputGH (IOMethod, IOFlexIO_Output3DGH);
+ CCTK_RegisterIOMethodOutputVarAs (IOMethod, IOFlexIO_Output3DVarAs);
+ CCTK_RegisterIOMethodTimeToOutput (IOMethod, IOFlexIO_TimeFor3D);
+ CCTK_RegisterIOMethodTriggerOutput (IOMethod, IOFlexIO_TriggerOutput3D);
+ }
+}