File size: 12,412 Bytes
0950351
 
 
 
 
10a2580
0950351
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  "thorn_name": "CactusExamples/FleshInfo",
  "url": "https://bitbucket.org/cactuscode/cactusexamples.git",
  "configuration": "",
  "interface": "# Interface definition for thorn FleshInfo\n# $Header$\n\nimplements: FleshInfo",
  "param": "# Parameter definitions for thorn FleshInfo\n# $Header$\n",
  "schedule": "# Schedule definitions for thorn FleshInfo\n# $Header$\n\nschedule InterpInfo at CCTK_INITIAL\n{\n  LANG: C\n} \"Information about Interpolation Operators\"\n\nschedule ReduceInfo at CCTK_INITIAL\n{\n  LANG: C\n} \"Information about Reduction Operators\"\n\nschedule IOInfo at CCTK_INITIAL\n{\n  LANG: C\n} \"Information about IO Methods\"\n\nschedule CoordInfo at CCTK_INITIAL\n{\n  LANG: C\n} \"Information about Coordinate Systems\"",
  "src": {
    "Reduce.c": "/*@@\n   @file      Reduce.c\n   @date      Thu Dec 27 2001\n   @author    Gabrielle Allen\n   @desc\n   Write information about reduction operators\n   @enddesc\n   @version   $Id$\n@@*/\n\n#include <stdio.h>\n\n#include \"cctk.h\"\n#include \"cctk_Arguments.h\"\n\nstatic const char *rcsid = \"$Header$\";\n\nCCTK_FILEVERSION(CactusExamples_FleshInfo_Reduce_c)\n\nvoid ReduceInfo(CCTK_ARGUMENTS);\n\n /*@@\n   @routine    ReduceInfo\n   @date       Thu Dec 27 2001\n   @author     Gabrielle Allen\n   @desc \n   Write information about reduction operators\n   @enddesc \n   @calls     \n   @calledby   \n   @history \n \n   @endhistory \n@@*/\n\nvoid ReduceInfo(CCTK_ARGUMENTS)\n{\n  DECLARE_CCTK_ARGUMENTS\n\n  const char *name;\n  const char *imp;\n  const char *thorn;\n  int number;\n  int handle;\n\n  number = CCTK_NumReduceOperators();\n\n  printf(\"Reduction Operators\\n\");\n  printf(\"-------------------\\n\\n\");\n  printf(\" There are %d registered reduction operators\\n\\n\",number);\n  \n  if (number > 0)\n  {\n    printf(\" Handle  | Name                           | Thorn           | Implementation\\n\");\n    printf(\" ---------------------------------------------------------------------------\\n\");\n\n    for (handle = 0; handle < number; handle++)\n      {\n        name = CCTK_LocalArrayReduceOperator(handle);\n        if (name)\n        {\n          imp  = CCTK_LocalArrayReduceOperatorImplementation(handle);\n          thorn = CCTK_ImplementationThorn(imp);\n            printf(\" %7d | %-30.30s | %-15.15s | %-15.15s \\n\",handle,name,thorn, imp);\n        }\n      }\n  }\n\n  printf(\"\\n\");\n\n  return;\n\n  printf(\"\\n\");\n\n}\n",
    "make.code.defn": "# Main make.code.defn file for thorn FleshInfo\n# $Header$\n\n# Source files in this directory\nSRCS = Interp.c Reduce.c IO.c Coord.c\n\n# Subdirectories containing source files\nSUBDIRS = \n\n",
    "Coord.c": "/*@@\n   @file      Coord.c\n   @date      Sat Dec 29 2001\n   @author    Gabrielle Allen\n   @desc\n   Write information about coordinate systems\n   @enddesc\n   @version   $Id$\n@@*/\n\n#include <stdio.h>\n\n#include \"cctk.h\"\n#include \"cctk_Arguments.h\"\n\nstatic const char *rcsid = \"$Header$\";\n\nCCTK_FILEVERSION(CactusExamples_FleshInfo_Coord_c)\n\nvoid CoordInfo(CCTK_ARGUMENTS);\n\n /*@@\n   @routine    IOInfo\n   @date       Thu Dec 29 2001\n   @author     Gabrielle Allen\n   @desc \n   Write information about coordinate systems\n   @enddesc \n   @calls     \n   @calledby   \n   @history \n \n   @endhistory \n@@*/\n\nvoid CoordInfo(CCTK_ARGUMENTS)\n{\n  DECLARE_CCTK_ARGUMENTS\n\n  const char *name;\n  const char *imp;\n  const char *thorn;\n  const char *coord;\n  int number;\n  int handle;\n  int dir;\n  int dim;\n  int ierr,iperr;\n  int ilower,iupper;\n  CCTK_REAL lower,upper;\n\n  number = CCTK_NumCoordSystems();\n\n  printf(\"Coordinate Systems\\n\");\n  printf(\"------------------\\n\\n\");\n  printf(\" There are %d registered coordinate systems\\n\\n\",number);\n  \n  if (number > 0)\n  {\n    printf(\" Handle  | Name                      | Dim | Thorn           | Implementation\\n\");\n    printf(\" ---------------------------------------------------------------------------\\n\");\n\n    for (handle = 0; handle < number; handle++)\n      {\n        name = CCTK_CoordSystemName(handle);\n        if (name)\n        {\n          imp  = CCTK_CoordSystemImplementation(handle);\n          thorn = CCTK_ImplementationThorn(imp);\n          dim = CCTK_CoordSystemDim(name);\n          printf(\" %7d | %-25.25s | %1d   | %-15.15s | %-15.15s \\n\",handle,name,dim,thorn, imp);\n        }\n      }\n  }\n\n  if (number > 0)\n  {\n    for (handle = 0; handle < number; handle++)\n    {\n      name = CCTK_CoordSystemName(handle);\n      if (name)\n      {\n        printf(\"\\n\");\n        printf(\"    System: %s\\n\",name);\n        printf(\"    -------\\n\\n\");\n        printf(\"      Direction | Name              | Computational Range | Physical Index Range\\n\");\n        printf(\"      ---------------------------------------------------------------------------\\n\");\n\n        dim = CCTK_CoordSystemDim(name);\n          \n        for (dir = 1; dir <= dim; dir++)\n        {\n          coord = CCTK_CoordName(dir,name);\n          ierr = CCTK_CoordRange(cctkGH,&lower,&upper,dir,NULL,name);\n          iperr = CCTK_CoordRangePhysIndex(cctkGH,&ilower,&iupper,dir,NULL,name);\n          if (coord)\n          {\n            printf(\"      %9d | %-17.17s |\",dir,coord);\n            if (ierr == 0)\n            {\n              printf(\" %-6.5f to %-6.5f |\",lower,upper);\n            }\n            else\n            {\n              printf(\" - N/A -             |\");\n            }\n\n            if (iperr == 0)\n            {\n              printf(\" %5d to %5d\\n\",ilower,iupper);\n            }\n            else\n            {\n              printf(\" - N/A -             \\n\");\n            }\n\n          }\n        }\n      }\n    }\n  }\n\n  printf(\"\\n\");\n\n  return;\n\n}\n",
    "IO.c": "/*@@\n   @file      IO.c\n   @date      Thu Dec 27 2001\n   @author    Gabrielle Allen\n   @desc\n   Write information about reduction operators\n   @enddesc\n@@*/\n\n#include <stdio.h>\n\n#include <cctk.h>\n#include <cctk_Arguments.h>\n\n /*@@\n   @routine    IOInfo\n   @date       Thu Dec 27 2001\n   @author     Gabrielle Allen\n   @desc \n   Write information about reduction operators\n   @enddesc \n   @calls     \n   @calledby   \n   @history \n \n   @endhistory \n@@*/\n\nvoid IOInfo(CCTK_ARGUMENTS)\n{\n  DECLARE_CCTK_ARGUMENTS;\n\n  int number = CCTK_NumIOMethods();\n\n  printf(\"IOMethods\\n\");\n  printf(\"---------\\n\\n\");\n  printf(\" There are %d registered IO methods\\n\\n\", number);\n  \n  if (number > 0)\n  {\n    printf(\" Handle  | Name                           | Thorn           | Implementation\\n\");\n    printf(\" ---------------------------------------------------------------------------\\n\");\n\n    for (int handle = 0; handle < number; handle++)\n    {\n      const struct IOMethod *method = CCTK_IOMethod(handle);\n      if (method)\n      {\n        const char *name = CCTK_IOMethodName(handle);\n        const char *imp  = CCTK_IOMethodImplementation(handle);\n        const char *thorn = CCTK_ImplementationThorn(imp);\n        printf(\" %7d | %-30.30s | %-15.15s | %-15.15s \\n\",\n               handle, name, thorn, imp);\n      }\n    }\n  }\n\n  printf(\"\\n\");\n}\n",
    "Interp.c": "/*@@\n   @file      Interp.c\n   @date      Thu Dec 27 2001\n   @author    Gabrielle Allen\n   @desc\n   Write information about interpolation routines\n   @enddesc\n   @version   $Id$\n@@*/\n\n#include <stdio.h>\n\n#include \"cctk.h\"\n#include \"cctk_Arguments.h\"\n\nstatic const char *rcsid = \"$Header$\";\n\nCCTK_FILEVERSION(CactusExamples_FleshInfo_Interp_c)\n\nvoid InterpInfo(CCTK_ARGUMENTS);\n\n /*@@\n   @routine    InterpInfo\n   @date       Thu Dec 27 2001\n   @author     Gabrielle Allen\n   @desc \n   Write information about interpolation operators\n   @enddesc \n   @calls     \n   @calledby   \n   @history \n \n   @endhistory \n@@*/\n\nvoid InterpInfo(CCTK_ARGUMENTS)\n{\n  DECLARE_CCTK_ARGUMENTS\n\n  const char *name;\n  const char *imp;\n  const char *thorn;\n  int number;\n  int handle;\n\n  number = CCTK_NumInterpOperators();\n\n  printf(\"Interpolation Operators\\n\");\n  printf(\"-----------------------\\n\\n\");\n  printf(\" There are %d registered interpolation operators\\n\\n\",number);\n  \n  if (number > 0)\n  {\n    printf(\" Handle  | Name                           | Thorn           | Implementation\\n\");\n    printf(\" ---------------------------------------------------------------------------\\n\");\n\n    for (handle = 0; handle < number; handle++)\n      {\n        name = CCTK_InterpOperator(handle);\n        if (name)\n        {\n          imp  = CCTK_InterpOperatorImplementation(handle);\n          thorn = CCTK_ImplementationThorn(imp);\n            printf(\" %7d | %-30.30s | %-15.15s | %-15.15s \\n\",handle,name,thorn, imp);\n        }\n      }\n  }\n\n  printf(\"\\n\");\n\n  return;\n\n  printf(\"\\n\");\n\n}\n"
  },
  "test": {},
  "doc": {
    "interface.aux": "\\relax \n\\@setckpt{interface}{\n\\setcounter{page}{3}\n\\setcounter{equation}{0}\n\\setcounter{enumi}{0}\n\\setcounter{enumii}{0}\n\\setcounter{enumiii}{0}\n\\setcounter{enumiv}{0}\n\\setcounter{footnote}{0}\n\\setcounter{mpfootnote}{0}\n\\setcounter{part}{0}\n\\setcounter{section}{5}\n\\setcounter{subsection}{0}\n\\setcounter{subsubsection}{0}\n\\setcounter{paragraph}{0}\n\\setcounter{subparagraph}{0}\n\\setcounter{figure}{0}\n\\setcounter{table}{0}\n}\n",
    "schedule.aux": "\\relax \n\\@setckpt{schedule}{\n\\setcounter{page}{3}\n\\setcounter{equation}{0}\n\\setcounter{enumi}{0}\n\\setcounter{enumii}{0}\n\\setcounter{enumiii}{0}\n\\setcounter{enumiv}{0}\n\\setcounter{footnote}{0}\n\\setcounter{mpfootnote}{0}\n\\setcounter{part}{0}\n\\setcounter{section}{5}\n\\setcounter{subsection}{0}\n\\setcounter{subsubsection}{0}\n\\setcounter{paragraph}{0}\n\\setcounter{subparagraph}{0}\n\\setcounter{figure}{0}\n\\setcounter{table}{0}\n}\n",
    "param.aux": "\\relax \n\\@setckpt{param}{\n\\setcounter{page}{3}\n\\setcounter{equation}{0}\n\\setcounter{enumi}{0}\n\\setcounter{enumii}{0}\n\\setcounter{enumiii}{0}\n\\setcounter{enumiv}{0}\n\\setcounter{footnote}{0}\n\\setcounter{mpfootnote}{0}\n\\setcounter{part}{0}\n\\setcounter{section}{5}\n\\setcounter{subsection}{0}\n\\setcounter{subsubsection}{0}\n\\setcounter{paragraph}{0}\n\\setcounter{subparagraph}{0}\n\\setcounter{figure}{0}\n\\setcounter{table}{0}\n}\n",
    "documentation.tex": "\\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\\title{FleshInfo}\n\\author{Gabrielle Allen}\n\\date{$ $Date$ $}\n\n\\maketitle\n\n% Do not delete next line\n% START CACTUS THORNGUIDE\n\n\\begin{abstract}\nDemonstrates obtaining information about computational infrastructure\nfrom the flesh\n\\end{abstract}\n\n\\section{Purpose}\n\nThis thorn demonstrates using flesh interfaces to obtain information\nabout the computational infrastructure available to a simulation. \nIn this case, the information obtained is simply reported to standard\noutput. This thorn doesn't exhaust all the available information, although\nhopefully it will be expanded to show all the applicable APIs in practise.\nNotable exceptions at the moment include information about parameters, \nscheduled functions and grid variables.\n\n\\section{Reduction Operators}\n\nFleshInfo provides a list or registered reduction operators, along \nwith the thorn and implementation which registered them.\n\n\\section{Interpolation Operators}\n\nFleshInfo provides a list or registered interpolation operators, along \nwith the thorn and implementation which registered them.\n\n\\section{IO Methods}\n\nFleshInfo provides a list or registered IO methods, along \nwith the thorn and implementation which registered them.\n\n\\section{Coordinates}\nFleshInfo reports on\n\\begin{itemize}\n\\item Registered coordinate systems, their dimensions and the thorn\n\tand implementation which registered them\n\\item For each coordinate system, a list of coordinates, their\n\tdirections, the computational range and the physical index range.\n\\end{itemize}\n\n% Do not delete next line\n% END CACTUS THORNGUIDE\n\n\\end{document}\n"
  }
}