From c3bc06c429d42bee811d18f306f65e48299b41f8 Mon Sep 17 00:00:00 2001 From: goodale Date: Tue, 6 Jul 1999 12:28:07 +0000 Subject: Rewrote the schedule.ccl bit and put bulletpoints under a few sections in the coding chapter. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@675 17b73243-c579-4c4c-a9d2-2d5706c11dac --- doc/UsersGuide/ThornWriters.tex | 294 +++++++++++++++++++--------------------- 1 file changed, 140 insertions(+), 154 deletions(-) (limited to 'doc') diff --git a/doc/UsersGuide/ThornWriters.tex b/doc/UsersGuide/ThornWriters.tex index dbdf9cb2..1623933f 100644 --- a/doc/UsersGuide/ThornWriters.tex +++ b/doc/UsersGuide/ThornWriters.tex @@ -399,22 +399,22 @@ For example REAL Coeff "Important coefficient" { -0:3.14 :: ``Range has to be from zero to Pi, default is zero'' +0:3.14 :: "Range has to be from zero to Pi, default is zero" } 0.0 #No need to define a range for LOGICAL -LOGICAL nice ``Nice weather ?'' +LOGICAL nice "Nice weather ?" { -}``yes'' +}"yes" # A example for a set of keywords and its default (which has to be # defined in the body) -KEYWORD confused "Are we getting confused ?'' +KEYWORD confused "Are we getting confused ?" { - "yes'' :: ``absolutley positively'' - "perhaps" :: "we are not sure'' - "never" :: "never'' -} "never'' + "yes" :: "absolutley positively" + "perhaps" :: "we are not sure" + "never" :: "never" +} "never" \end{verbatim} defines a REAL parameter, a LOGICAL parameter, and a KEYWORD. @@ -448,66 +448,30 @@ KEYWORD initial_data "" \end{verbatim} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \subsection{The {\tt schedule.ccl}} -The {\tt schedule.ccl} is used to register the routines of your thorn -with the CCTK and defines the storage characteristics of a group. - -We will first describe the storage concepts. There is no good reason -to keep memory allocated for variables which are only used -intermittendly in the course of the simulation, eg. during output or -analysis, or are not used at all depending on parameter settings. The -CCTK allows for a flexible memory allocation: -\begin{enumerate} -\item{} Variable memory can be turned on at all times, for example by -\begin{verbatim} -STORAGE: metric -\end{varbatim}, which would turn on storage for the group we defined -in the example above. -\item{}All-time memory can turned on depending on parameter -settings. This can be done in the same way, the parameters are acessed -within a C or Fortran code: by explicit use of the parameter variables -in the case of integer/real/logical (see \ref{????}) or -by use of the {\tt CCTK\_Equals()} function (see -\ref{????}). For example: -\begin{verbatim} -# reserve memory for the group ``shift'' if parameter -# shift NOT set to ``none'' -if (!CCTK_Equals(shift,"none")) -{ - STORAGE: shift -} -# allocate memory for the groups ``confac'',... -# if the LOGICAL parameter ``use_conformal'' was set to ``yes'' -if (use_conformal) { - STORAGE: confac,confac_1derivs,confac_2derivs -} -\end{verbatim} -\item{} The third options lets you associate the memory allocation -with a routine call: storage is allocated when the routine is called -by the CCTK. This options is explained in connection with the {\em -RFR} below. -\item{} A modification of \#3 is the options to have storage enabled, -when a certain variable is computed for output. This options is -explained in connection with the {\em RFR} below. -\end{enumerate} +By default no routine of a thorn will be run. The schedule.ccl file +defines those that should be run and when they should be run. +The specification of this is via a schudule block which consists of +a line of the form -The {\em runtime function registry (RFR)} registers the different routines a -a thorn provides with the CCTK depending on the timing keyword -chosen. You can assign timing keywords to your routines out of a -set of ordered keywords and register your routine with the -CCTK. During the evolution the CCTK will loop through this ordered -set of keywords and execute the registered thorn routines. This way, -you can hook your thorns at well defined locations into the main -iteration loop without having -to modify anybody's code. The CCTK currently features a fixed {\em -skeleton} of timing keywords, which mean that you cannot currently -register relative to a different thorn. +\begin{verbatim} + +schedule at