| { |
| "thorn_name": "CactusExamples/TimerInfo", |
| "url": "https://bitbucket.org/cactuscode/cactusexamples.git", |
| "configuration": "", |
| "interface": "# Interface definition for thorn TimerInfo\n# $Header$\n\nimplements: timerinfo", |
| "param": "# Parameter definitions for thorn TimerInfo\n# $Header$\n\nprivate:\n\nINT every \"How often to print information\" STEERABLE=always\n{\n 0:* :: \"Positive\"\n} 0\n\nSTRING clock \"Which clock to use\" STEERABLE=always\n{\n .* :: \"Anything\"\n} \"all\"\n\nSTRING timer \"Which timer to use\" STEERABLE=always\n{\n .* :: \"Anything\"\n} \"all\"", |
| "schedule": "# Schedule definitions for thorn TimerInfo\n# $Header$\n\nschedule TimerInfo at CCTK_POSTSTEP\n{\n LANG: C\n} \"Print Information from Cactus Timers\"\n", |
| "src": { |
| "make.code.defn": "# Main make.code.defn file for thorn TestTimers\n# $Header$\n\n# Source files in this directory\nSRCS = TimerInfo.c Custom.c\n\n# Subdirectories containing source files\nSUBDIRS = \n\n", |
| "TimerInfo.c": "/*@@\n @file TimerInfo.c\n @date Wed Oct 17 2001\n @author Gabrielle Allen\n @desc\n Scheduled rountines for printing all information from timers\n @enddesc\n @version $Header$\n @@*/\n\n#include <stddef.h>\n\n#include \"cctk.h\"\n#include \"cctk_Arguments.h\"\n#include \"cctk_Parameters.h\"\n#include \"cctk_Timers.h\"\n\nstatic const char *rcsid = \"$Header$\";\n\nCCTK_FILEVERSION(CactusExamples_TimerInfo_TimerInfo_c)\n\n/********************************************************************\n ********************* Local Data Types ***********************\n ********************************************************************/\n\n/********************************************************************\n ********************* Local Routine Prototypes *********************\n ********************************************************************/\n\nvoid TimerInfo(CCTK_ARGUMENTS);\n \n/********************************************************************\n ********************* Other Routine Prototypes *********************\n ********************************************************************/\n\n/********************************************************************\n ********************* Local Data *****************************\n ********************************************************************/\n\n/********************************************************************\n ********************* External Routines **********************\n ********************************************************************/\nvoid PrintTimerData (const char *timername, const cTimerData *info);\n\n /*@@\n @routine TimerInfo\n @date Wed Oct 17 2001\n @author Gabrielle Allen\n @desc\n Print timing information for all clocks\n @enddesc\n@@*/\n\nvoid TimerInfo(CCTK_ARGUMENTS)\n{\n DECLARE_CCTK_ARGUMENTS\n DECLARE_CCTK_PARAMETERS\n const char *newtimer=NULL;\n const char *newclock=NULL;\n\n if (every > 0 && (cctk_iteration % every)== 0) \n {\n if (!CCTK_Equals(timer,\"all\"))\n {\n newtimer = timer;\n }\n\n if (!CCTK_Equals(clock,\"all\"))\n {\n newclock = clock;\n }\n\n CCTK_TimerPrintData(newtimer,newclock);\n }\n}\n\n", |
| "Custom.c": "/*@@\n @file Custom.c\n @date Wed Oct 17 2001\n @author Gabrielle Allen\n @desc\n Customised output of timer data\n @enddesc\n @version $Header$\n @@*/\n\n#include <stdio.h>\n\n#include \"cctk.h\"\n#include \"cctk_Arguments.h\"\n#include \"cctk_Parameters.h\"\n\nstatic const char *rcsid = \"$Header$\";\n\nCCTK_FILEVERSION(CactusExamples_TimerInfo_Custom_c)\n\n/********************************************************************\n ********************* Local Data Types ***********************\n ********************************************************************/\n\n/********************************************************************\n ********************* Local Routine Prototypes *********************\n ********************************************************************/\n \n/********************************************************************\n ********************* Other Routine Prototypes *********************\n ********************************************************************/\n\n/********************************************************************\n ********************* Local Data *****************************\n ********************************************************************/\n\n/********************************************************************\n ********************* External Routines **********************\n ********************************************************************/\n\nvoid PrintTimerData (const char *timername, const cTimerData *info);\n\n /*@@\n @routine PrintTimerData\n @date Wed Oct 17 2001\n @author Gabrielle Allen\n @desc\n Customise output of timer data\n @enddesc\n@@*/\n\nvoid PrintTimerData (const char *timername, const cTimerData *info)\n{\n int i;\n\n printf(\"\\nResults for timer called '%s'\\n\", timername);\n for (i = 0; i < info->n_vals; i++)\n {\n switch (info->vals[i].type)\n {\n case val_int:\n printf(\" %s: %d %s\\n\", \n info->vals[i].heading,info->vals[i].val.i, \n info->vals[i].units);\n break;\n \n case val_long:\n printf(\" %s: %d %s\\n\", \n info->vals[i].heading,(int) info->vals[i].val.l, \n info->vals[i].units);\n break;\n \n case val_double:\n printf(\" %s: %.3f %s\\n\", \n info->vals[i].heading,info->vals[i].val.d, \n info->vals[i].units);\n break;\n \n default:\n CCTK_WARN(1, \"Unknown data type for timer info\");\n break;\n }\n }\n}\n" |
| }, |
| "test": {}, |
| "doc": { |
| "documentation.tex": "% *======================================================================*\n% Cactus Thorn template for ThornGuide documentation\n% Author: Ian Kelley\n% Date: Sun Jun 02, 2002\n% $Header$ \n%\n% Thorn documentation in the latex file doc/documentation.tex \n% will be included in ThornGuides built with the Cactus make system.\n% The scripts employed by the make system automatically include \n% pages about variables, parameters and scheduling parsed from the \n% relevent thorn CCL files.\n% \n% This template contains guidelines which help to assure that your \n% documentation will be correctly added to ThornGuides. More \n% information is available in the Cactus UsersGuide.\n% \n% Guidelines:\n% - Do not change anything before the line\n% % BEGIN CACTUS THORNGUIDE\",\n% except for filling in the title, author, date etc. fields.\n% - You can define your own macros are OK, but they must appear after\n% the BEGIN CACTUS THORNGUIDE line, and do not redefine standard \n% latex commands.\n% - To avoid name clashes with other thorns, 'labels', 'citations', \n% 'references', and 'image' names should conform to the following \n% convention: \n% ARRANGEMENT_THORN_LABEL\n% For example, an image wave.eps in the arrangement CactusWave and \n% thorn WaveToyC should be renamed to CactusWave_WaveToyC_wave.eps\n% - Graphics should only be included using the graphix package. \n% More specifically, with the \"includegraphics\" command. Do\n% not specify any graphic file extensions in your .tex file. This \n% will allow us (later) to create a PDF version of the ThornGuide\n% via pdflatex. |\n% - References should be included with the latex \"bibitem\" command. \n% - For the benefit of our Perl scripts, and for future extensions, \n% please use simple latex. \n%\n% *======================================================================* \n% \n% Example of including a graphic image:\n% \\begin{figure}[ht]\n% \t\\begin{center}\n% \t \\includegraphics[width=6cm]{MyArrangement_MyThorn_MyFigure}\n% \t\\end{center}\n% \t\\caption{Illustration of this and that}\n% \t\\label{MyArrangement_MyThorn_MyLabel}\n% \\end{figure}\n%\n% Example of using a label:\n% \\label{MyArrangement_MyThorn_MyLabel}\n%\n% Example of a citation:\n% \\cite{MyArrangement_MyThorn_Author99}\n%\n% Example of including a reference\n% \\bibitem{MyArrangement_MyThorn_Author99}\n% {J. Author, {\\em The Title of the Book, Journal, or periodical}, 1 (1999), \n% 1--16. {\\tt http://www.nowhere.com/}}\n%\n% *======================================================================* \n\n% If you are using CVS use this line to give version information\n% $Header$\n\n\\documentclass{article}\n\n% Use the Cactus ThornGuide style file\n% (Automatically used from Cactus distribution, if you have a \n% thorn without the Cactus Flesh download this from the Cactus\n% homepage at www.cactuscode.org)\n\\usepackage{../../../../doc/latex/cactus}\n\n\\begin{document}\n\n% The author of the documentation\n\\author{} \n\n% The title of the document (not necessarily the name of the Thorn)\n\\title{TimerInfo}\n\n% the date your document was last changed, if your document is in CVS, \n% please us:\n% \\date{$ $Date$ $}\n\\date{}\n\n\\maketitle\n\n% Do not delete next line\n% START CACTUS THORNGUIDE\n\n% Add all definitions used in this documentation here \n% \\def\\mydef etc\n\n% Add an abstract for this thorn's documentation\n\\begin{abstract}\n\n\\end{abstract}\n\n% The following sections are suggestive only.\n% Remove them or add your own.\n\n\\section{Introduction}\n\n\\section{Physical System}\n\n\\section{Numerical Implementation}\n\n\\section{Using This Thorn}\n\n\\subsection{Obtaining This Thorn}\n\n\\subsection{Basic Usage}\n\n\\subsection{Special Behaviour}\n\n\\subsection{Interaction With Other Thorns}\n\n\\subsection{Support and Feedback}\n\n\\section{History}\n\n\\subsection{Thorn Source Code}\n\n\\subsection{Thorn Documentation}\n\n\\subsection{Acknowledgements}\n\n\n\\begin{thebibliography}{9}\n\n\\end{thebibliography}\n\n% Do not delete next line\n% END CACTUS THORNGUIDE\n\n\\end{document}\n" |
| } |
| } |