summaryrefslogtreecommitdiff
path: root/src/main/MainUtils.c
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-09-19 23:41:46 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-09-19 23:41:46 +0000
commit6219ab351e74eef7c03c7a0221e54582cf47966f (patch)
treea57d8ac24d857a9eb5a55d2e684030d3f36f02e5 /src/main/MainUtils.c
parentbd552587325969ba6032eb8260314ea1854ad9a0 (diff)
Added CCTK_RunTitle which provides a string giving a description of
the simulation. This might change name in the near future git-svn-id: http://svn.cactuscode.org/flesh/trunk@1828 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/MainUtils.c')
-rw-r--r--src/main/MainUtils.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/main/MainUtils.c b/src/main/MainUtils.c
index 524ddbca..7fb61368 100644
--- a/src/main/MainUtils.c
+++ b/src/main/MainUtils.c
@@ -8,6 +8,20 @@
@version $Header$
@@*/
+#include <string.h>
+
+#include "cctk_Flesh.h"
+#include "cctk_Misc.h"
+#include "cctk_Schedule.h"
+#include "cctk_Parameter.h"
+
+static char *rcsid = "$Header$";
+
+static const char *startuptime = "How do I do this";
+
+CCTK_FILEVERSION(main_MainUtils_c)
+
+
/* the iteration counter used in the evolution loop */
static int iteration = 0;
@@ -48,3 +62,45 @@ int CCTK_MainLoopIndex (void)
return (iteration);
}
+ /*@@
+ @routine CCTK_RunTitle
+ @date Sun Sep 17 2000
+ @author Gabrielle Allen
+ @desc
+ Returns the simulation description
+ @enddesc
+ @calls
+ @calledby
+
+@@*/
+int CCTK_RunTitle(int len, char *title)
+{
+ int retval;
+ int param_type;
+ const char *cctk_title;
+
+ cctk_title = (*(const char **)
+ CCTK_ParameterGet("cctk_run_title",
+ "Cactus",
+ &param_type));
+
+ if (cctk_title)
+ {
+ if (CCTK_Equals(cctk_title,""))
+ {
+ strcpy(title,"Cactus Simulation");
+ }
+ else
+ {
+ strncpy(title,cctk_title,len-1);
+ }
+ retval = strlen(title);
+ retval=retval > len ? 0 : retval;
+ }
+ else
+ {
+ retval = -1;
+ }
+ return retval;
+}
+