summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-03-14 17:02:35 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-03-14 17:02:35 +0000
commita681bf971e72586d7b1a18678880ecbf2cc264b0 (patch)
tree0f8175fc0d018025c13563929403e47edc0965ab /src
parent293e0c200079891d3597286eb1c1b708fe6d1822 (diff)
Added the RFR tree print out
git-svn-id: http://svn.cactuscode.org/flesh/trunk@395 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src')
-rw-r--r--src/main/CactusDefaultInitialise.c2
-rw-r--r--src/main/rfrInterface.c91
-rw-r--r--src/param.ccl10
3 files changed, 103 insertions, 0 deletions
diff --git a/src/main/CactusDefaultInitialise.c b/src/main/CactusDefaultInitialise.c
index 67c68110..1747ca91 100644
--- a/src/main/CactusDefaultInitialise.c
+++ b/src/main/CactusDefaultInitialise.c
@@ -107,6 +107,8 @@ int Cactus_InitialiseGH(cGH *GH)
/* Do the rfr initialisation on this GH */
CCTK_BindingsScheduleRegister("RFRINIT", (void *)GH);
+ /* Report the rfr tree */
+ CCTK_rfrPrintTree(GH,GH->rfr_top);
/* Initialise all the extensions. */
CCTK_InitGHExtensions(GH);
diff --git a/src/main/rfrInterface.c b/src/main/rfrInterface.c
index 003fcee6..3e40d570 100644
--- a/src/main/rfrInterface.c
+++ b/src/main/rfrInterface.c
@@ -16,6 +16,7 @@
#include "rfr_constants.h"
#include "CactusCommFunctions.h"
#include "IOMethods.h"
+#include "declare_parameters.h"
static char *rcsid = "$Header$";
@@ -44,6 +45,96 @@ int CCTK_rfrTraverse(cGH *GH, int rfrpoint)
/*@@
+ @routine rfrPrintTree
+ @date 14 Mar 1999
+ @author Gabrielle Allen
+ @desc
+ Prints the order of the RFR calling tree
+ @enddesc
+ @calls
+ @history
+ @endhistory
+
+ @var
+ @vdesc
+ @vtype
+ @vio
+ @vcomment
+ @endvar
+
+ @returntype int
+ @returndesc
+ 0 = routine did not print rfr tree
+ 1 = routine did print rfr tree
+ @endreturndesc
+
+ @version $Header$
+@@*/
+
+int CCTK_rfrPrintTree(cGH *GH,void *rfr_top)
+{
+ DECLARE_PARAMETERS
+
+ static int showed_tree = 0;
+
+ /* Return if the users doesn't want to see the tree */
+ if (!cctk_show_rfr_tree || cctk_brief_output) return 0;
+
+ if (!showed_tree)
+ {
+
+ showed_tree = 1;
+
+ printf ("\nEvolution tree from the RFR\n\n");
+
+ rfrPrintDescs(rfr_top,GH,CACTUS_BASEGRID,"CACTUS_BASEGRID","");
+
+ rfrPrintDescs(rfr_top,GH,CACTUS_INITIAL0,"CACTUS_INITIAL0","");
+ rfrPrintDescs(rfr_top,GH,CACTUS_INITIAL, "CACTUS_INITIAL","");
+ rfrPrintDescs(rfr_top,GH,CACTUS_INITIAL2,"CACTUS_INITIAL2","");
+ rfrPrintDescs(rfr_top,GH,CACTUS_INITIAL3,"CACTUS_INITIAL3","");
+ rfrPrintDescs(rfr_top,GH,CACTUS_INITIAL4,"CACTUS_INITIAL4","");
+ rfrPrintDescs(rfr_top,GH,CACTUS_INITIAL5,"CACTUS_INITIAL5","");
+ rfrPrintDescs(rfr_top,GH,CACTUS_INITIAL6,"CACTUS_INITIAL6","");
+ rfrPrintDescs(rfr_top,GH,CACTUS_INITIAL7,"CACTUS_INITIAL7","");
+ rfrPrintDescs(rfr_top,GH,CACTUS_INITIAL8,"CACTUS_INITIAL8","");
+ rfrPrintDescs(rfr_top,GH,CACTUS_INITIAL9,"CACTUS_INITIAL9","");
+ printf ("\n (Don't forget CACTUS_POSTSTEP* is here too...)\n");
+ printf ("\n do loop over timesteps\n");
+ rfrPrintDescs(rfr_top,GH,CACTUS_PRESTEP,"CACTUS_PRESTEP"," ");
+ rfrPrintDescs(rfr_top,GH,CACTUS_PRESTEP2,"CACTUS_PRESTEP2"," ");
+ rfrPrintDescs(rfr_top,GH,CACTUS_PRESTEP3,"CACTUS_PRESTEP3"," ");
+ rfrPrintDescs(rfr_top,GH,CACTUS_PRESTEP4,"CACTUS_PRESTEP4"," ");
+ rfrPrintDescs(rfr_top,GH,CACTUS_PRESTEP5,"CACTUS_PRESTEP5"," ");
+
+ rfrPrintDescs(rfr_top,GH,CACTUS_EVOL,"CACTUS_EVOL"," ");
+ rfrPrintDescs(rfr_top,GH,CACTUS_BOUND,"CACTUS_BOUND"," ");
+
+ printf (" t = t+dt\n");
+
+ rfrPrintDescs(rfr_top,GH,CACTUS_POSTSTEP,"CACTUS_POSTSTEP"," ");
+ rfrPrintDescs(rfr_top,GH,CACTUS_POSTSTEP2,"CACTUS_POSTSTEP2"," ");
+ rfrPrintDescs(rfr_top,GH,CACTUS_POSTSTEP3,"CACTUS_POSTSTEP3"," ");
+ rfrPrintDescs(rfr_top,GH,CACTUS_POSTSTEP4,"CACTUS_POSTSTEP4"," ");
+ rfrPrintDescs(rfr_top,GH,CACTUS_POSTSTEP5,"CACTUS_POSTSTEP5"," ");
+ rfrPrintDescs(rfr_top,GH,CACTUS_POSTSTEP6,"CACTUS_POSTSTEP6"," ");
+ rfrPrintDescs(rfr_top,GH,CACTUS_POSTSTEP7,"CACTUS_POSTSTEP7"," ");
+ rfrPrintDescs(rfr_top,GH,CACTUS_POSTSTEP8,"CACTUS_POSTSTEP8"," ");
+ rfrPrintDescs(rfr_top,GH,CACTUS_POSTSTEP9,"CACTUS_POSTSTEP9"," ");
+ rfrPrintDescs(rfr_top,GH,CACTUS_POSTSTEP10,"CACTUS_POSTSTEP10"," ");
+
+ printf (" if (time-for-output)\n");
+ rfrPrintDescs(rfr_top,GH,CACTUS_ANALYSIS,"CACTUS_ANALYSIS"," ");
+ printf (" endif\n");
+ printf (" enddo\n");
+ printf ("End of tree from RFR\n\n");
+ }
+
+ return 1;
+
+}
+
+ /*@@
@routine CCTK_rfrStorageOn
@date Sat Feb 13 17:06:30 1999
@author Tom Goodale
diff --git a/src/param.ccl b/src/param.ccl
index 4d0c6e4c..292ec007 100644
--- a/src/param.ccl
+++ b/src/param.ccl
@@ -5,6 +5,16 @@ public:
public:
+LOGICAL cctk_show_rfr_tree "Show the order of the calling tree for the RFR"
+{
+ : ::
+} "yes"
+
+LOGICAL cctk_brief_output "Give only brief output"
+{
+ : ::
+} "no"
+
REAL cctk_initial_time "Initial time for evolution"
{
: :: "Anything"