\begin{cactuspart}{4}{FunctionReference}{$RCSfile$}{$Revision$}
\renewcommand{\thepage}{\Alph{part}\arabic{page}}


%\begin{CCTKFunc}{}{}
%\function{int}{CCTK\_INT}{storage}
%\subroutine{int}{CCTK\_INT}{storage}
%\argument{cGH *}{CCTK\_INT}{GH}
%\argument{const char *}{CCTK\_STRING}{group}
%\showargs
%\begin{params}
%\parameter{}{}
%\end{params}
%\begin{discussion}
%\end{discussion}
%\begin{examples}
%\begin{tabular}{@{}p{3cm}cp{11cm}}
%\hfill {\bf C} && storage = {\t CCTK\_EnableGroupStorage(GH,``imp::group'')};
%\\
%\hfill {\bf Fortran} && call {\t CCTK\_ENABLEGROUPSTORAGE(istorage,GH,``imp::gro
%up'')};
%\\
%\end{tabular}
%\end{examples}
%\begin{errorcodes}
%\errorcode{FIXME:CCTK\_NOSUCHVARIABLE}{The variable doesn't exist}
%\end{errorcodes}
%\end{CCTKFunc}


% Coord.c
\begin{CCTKFunc}{CCTK\_RegisterCoordI}{Register a grid function index as identifying a coordinate with a given coordinate name and direction.}
\subroutine{int}{integer}{handle}
\argument{int}{integer}{direction}
\argument{int}{integer}{index}
\argument{const char *}{character*(*)}{name}
\showargs
\begin{params}
\parameter{handle}{On success returns zero or a positive registration handle. Error codes have negative values.}
\parameter{direction}{The coordinate cartesian direction}
\parameter{index}{The index of the grid function representing the coordinate}
\parameter{name}{The name of the coordinate}
\end{params}
\begin{discussion}
The coordinate name is independent of the grid function name. The direction should be given 
as zero for a non-cartesian index. Currently only CCTK\_REAL grid functions can be registered 
as coordinates.
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && index = CCTK\_VarIndex(``MyImp::MyGF''); \\
               && handle = {\t CCTK\_RegisterCoordI(1,index,`xdir')};
\\
\hfill {\bf Fortran} && call {\t CCTK\_REGISTERCOORDI(handle,0,14,`radius')};
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}


% Coord.c
\begin{CCTKFunc}{CCTK\_RegisterCoord}{Register a grid function name as identifying a coordinate with a given coordinate name and direction.}
\subroutine{int}{integer}{handle}
\argument{int}{integer}{direction}
\argument{const char *}{character*(*)}{gfname}
\argument{const char *}{character*(*)}{coordname}
\showargs
\begin{params}
\parameter{handle}{On success returns zero or a positive registration handle. Error codes have negative values.}
\parameter{direction}{The coordinate cartesian direction}
\parameter{gfname}{The full name of the grid function representing the coordinate}
\parameter{coordname}{The name of the coordinate}
\end{params}
\begin{discussion}
The coordinate name is independent of the grid function name. The direction should be given 
as zero for a non-cartesian index. Currently only CCTK\_REAL grid functions can be registered 
as coordinates.
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && handle = {\t CCTK\_RegisterCoord(1,`MyImp::MyGF',`xdir')};
\\
\hfill {\bf Fortran} && call {\t CCTK\_REGISTERCOORD(handle,0,`MyImp::MyGF',`radius')};
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}




% Coord.c
\begin{CCTKFunc}{CCTK\_CoordIndex}{Give the GF index for a given coordinate name.}
\subroutine{int}{integer}{index}
\argument{const char *}{character*(*)}{coordname}
\showargs
\begin{params}
\parameter{index}{The coordinates associated GF index}
\parameter{coordname}{The name assigned to this coordinate}
\end{params}
\begin{discussion}
The coordinate name is independent of the grid function name. 
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && index = {\t CCTK\_CoordIndex(`xdir')};
\\
\hfill {\bf Fortran} && call {\t CCTK\_COORDINDEX(`radius')};
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% Coord.c
\begin{CCTKFunc}{CCTK\_CoordRange}{Return the global upper and lower bounds for a given coordinate name}
\subroutine{int}{integer}{ierr}
\argument{CCTK\_REAL}{CCTK\_REAL}{lower}
\argument{CCTK\_REAL}{CCTK\_REAL}{upper}
\argument{const char *}{character*(*)}{coordname}
\showargs
\begin{params}
\parameter{ierr}{Error code}
\parameter{lower}{Global lower bound of the coordinate}
\parameter{upper}{Global upper bound of the coordinate}
\parameter{coordname}{Coordinate name}
\end{params}
\begin{discussion}
The coordinate name is independent of the grid function name. The coordinate range
is registered by {\t CCTK\_RegisterCoordRange}.
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && ierr = {\t CCTK\_CoordRange(xmin,xmax,`xdir') };
\\
\hfill {\bf Fortran} && call {\t CCTK\_COORDRANGE(ierr,Rmin,Rmax,`radius')};
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}




% Coord.c
\begin{CCTKFunc}{CCTK\_RegisterCoordRange}{Saves the global upper and lower bounds for a given coordinate name}
\subroutine{int}{integer}{ierr}
\argument{CCTK\_REAL}{CCTK\_REAL}{lower}
\argument{CCTK\_REAL}{CCTK\_REAL}{upper}
\argument{const char *}{character*(*)}{coordname}
\showargs
\begin{params}
\parameter{ierr}{Error code}
\parameter{lower}{Global lower bound of the coordinate}
\parameter{upper}{Global upper bound of the coordinate}
\parameter{coordname}{Coordinate name}
\end{params}
\begin{discussion}
The coordinate name is independent of the grid function name. There must already
be a coordinate registered with the given name, with {\t CCTK\_RegisterCoord}. 
The coordinate range
can be accessed by {\t CCTK\_CoordRange}. 
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && ierr = {\t CCTK\_RegisterCoordRange(xmin,xmax,`xdir') };
\\
\hfill {\bf Fortran} && call {\t CCTK\_REGISTERCOORDRANGE(ierr,Rmin,Rmax,`radius')};
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}






% WarnLevel.c
\begin{CCTKFunc}{CCTK\_WARN}{Prints a warning message and possibly stops the code}
\subroutine{}{}{}
\argument{int}{integer}{level}
\argument{const char *}{character*(*)}{warning}
\showargs
\begin{params}
\parameter{level}{The warning level, lower numbers are the severest warnings}
\parameter{warning}{The warning message}
\end{params}
\begin{discussion}
By default Cactus stops on a level 0 warning, and prints any level 1 warnings.
This behavious can be changed on the command line.
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t CCTK\_WARN(1,`This is not a good idea') };
\\
\hfill {\bf Fortran} && call {\t CCTK\_WARN(0,`Divide by zero')};
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% WarnLevel.c
\begin{CCTKFunc}{CCTK\_INFO}{Prints an information message}
\subroutine{}{}{}
\argument{const char *}{character*(*)}{message}
\showargs
\begin{params}
\parameter{message}{The information message}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t CCTK\_INFO(`Entering interpolator') };
\\
\hfill {\bf Fortran} && call {\t CCTK\_INFO(`Inside interpolator')};
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}




% WarnLevel.c
\begin{CCTKFunc}{CCTK\_PARAMWARN}{Prints a warning from parameter checking, and possibly stops the code}
\subroutine{}{}{}
\argument{const char *}{character*(*)}{message}
\showargs
\begin{params}
\parameter{message}{The warning message}
\end{params}
\begin{discussion}
The call should be used in routines registered at the RFR point {\t CCTK\_PARAMCHECK}
to indicate that there is parameter error or conflict and the code should 
terminate. The code will terminate only after all the parameters have been 
checked.
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t CCTK\_PARAMWARN(`Mass cannot be negative') };
\\
\hfill {\bf Fortran} && call {\t CCTK\_PARAMWARN(`Inside interpolator')};
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% Groups.c
\begin{CCTKFunc}{CCTK\_GroupIndex}{Get the index number for a group name}
\subroutine{int}{integer}{index}
\argument{const char *}{character*(*)}{groupname}
\showargs
\begin{params}
\parameter{groupname}{The name of the group}
\end{params}
\begin{discussion}
The group name should be given in the form {\t <implementation>::<group>}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t index = CCTK\_GroupIndex(`evolve::scalars') };
\\
\hfill {\bf Fortran} && call {\t CCTK\_GroupIndex(index,`evolve::scalars')};
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}




% Groups.c
\begin{CCTKFunc}{CCTK\_VarIndex}{Get the index for a variable}
\subroutine{int}{integer}{index}
\argument{const char *}{character*(*)}{varname}
\showargs
\begin{params}
\parameter{varname}{The name of the variable}
\end{params}
\begin{discussion}
The variable name should be given in the form {\t <implementation>::<variable>}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t index = CCTK\_VarIndex(`evolve::phi') };
\\
\hfill {\bf Fortran} && call {\t CCTK\_VarIndex(index,`evolve::phi')};
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}




% Groups.c
\begin{CCTKFunc}{CCTK\_MaxDim}{Get the maximum dimension of any grid variable }
\subroutine{int}{integer}{dim}
\showargs
\begin{params}
\parameter{dim}{The maximum dimension}
\end{params}
\begin{discussion}
Note that the maximum dimension will depend on the compiled thorn list,
and not the active thorn list.
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t dim = CCTK\_MaxDim() };
\\
\hfill {\bf Fortran} && call {\t CCTK\_MaxDim(dim)};
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}




% Groups.c
\begin{CCTKFunc}{CCTK\_NumGroups}{Get the number of groups of variables compiled in the code}
\subroutine{int}{integer}{number}
\showargs
\begin{params}
\parameter{number}{The number of groups compiled from the thorns {\t interface.ccl} files}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t number = CCTK\_NumGroups() };
\\
\hfill {\bf Fortran} && call {\t CCTK\_NumGroups(number)};
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}






% Groups.c
\begin{CCTKFunc}{CCTK\_GroupNameFromVarI}{Given a variable index, return the name of the associated group}
\subroutine{char *}{character*(*)}{group}
\argument{int}{integer}{varindex}
\showargs
\begin{params}
\parameter{group}{The name of the group}
\parameter{varindex}{The index of the variable}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t index = CCTK\_VarIndex(`evolve::phi');} \\
               && {\t group = CCTK\_GroupNameFromVarI(index) ;}
\\
\hfill {\bf Fortran} && call {\t CCTK\_GROUPNAMEFROMVARI(FIXME)};
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% Groups.c
\begin{CCTKFunc}{CCTK\_GroupIndexFromVarI}{Given a variable index, returns the index of the associated group}
\subroutine{int}{integer}{groupindex}
\argument{int}{integer}{varindex}
\showargs
\begin{params}
\parameter{groupindex}{The index of the group}
\parameter{varindex}{The index of the variable}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t index = CCTK\_VarIndex(`evolve::phi');} \\
               && {\t groupindex = CCTK\_GroupIndexFromVarI(index) ;}
\\
\hfill {\bf Fortran} && {\t call CCTK\_VARINDEX(`evolve::phi')}\\
                     &&call {\t CCTK\_GROUPINDEXFROMVARI(groupindex,index)};
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% Groups.c
\begin{CCTKFunc}{CCTK\_GroupIndexFromVar}{Given a variable name, returns the index of the associated group}
\subroutine{int}{integer}{groupindex}
\argument{const char *}{character*(*)}{name}
\showargs
\begin{params}
\parameter{groupindex}{The index of the group}
\parameter{name}{The full name of the variable}
\end{params}
\begin{discussion}
The variable name should be in the form {\t <implementation>::<variable>}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t groupindex = CCTK\_GroupIndexFromVar(`evolve::phi') ;}
\\
\hfill {\bf Fortran} && {\t call CCTK\_GROUPINDEXFROMVAR(groupindex,`evolve::phi')};
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}




% Groups.c
\begin{CCTKFunc}{CCTK\_ImpFromVarI}{Given a variable index, returns the implementation name}
\subroutine{char *}{integer}{implementation}
\argument{int}{integer}{index}
\showargs
\begin{params}
\parameter{implementation}{The implementation name}
\parameter{index}{The variable index}
\end{params}
\begin{discussion}
No Fortran routine exists at the moment
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t index = CCTK\_VarIndex(`evolve::phi')}\\
               &&{\t implementation = CCTK\_ImpFromVarI(index) ;}
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}




% Groups.c
\begin{CCTKFunc}{CCTK\_FullName}{Given a variable index, returns the full name of the variable}
\subroutine{char *}{integer}{fullname}
\argument{int}{integer}{index}
\showargs
\begin{params}
\parameter{implementation}{The full variable name}
\parameter{index}{The variable index}
\end{params}
\begin{discussion}
No Fortran routine exists at the moment. The full variable name is in
the form {\t <implementation>::<variable>}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t index = CCTK\_VarIndex(`evolve::phi')}\\
               &&{\t fullname = CCTK\_FullName(index) ;}
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}





% Groups.c
\begin{CCTKFunc}{CCTK\_GroupData}{Given a group index, returns information about the variables held in the group.}
\subroutine{int}{integer}{istat}
\argument{int}{integer}{group}
\argument{int *}{integer}{gtype}
\argument{int *}{integer}{vtype}
\argument{int *}{integer}{dim}
\argument{int *}{integer}{nvars}
\argument{int *}{integer}{ntimelevels}
\showargs
\begin{params}
\parameter{istat}{Returns one if a group with the given index was found, and zero otherwise}
\parameter{group}{The group index}
\parameter{gtype}{The group type}
\parameter{vtype}{The type of variables in the group}
\parameter{dim}{The dimension of variables in the group}
\parameter{nvars}{The number of variables in the group}
\parameter{ntimelevels}{The number of timelevels for variables in the group}
\end{params}
\begin{discussion}
No Fortran routine exists at the moment. 
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t index = CCTK\_GroupIndex(`evolve::scalars')}\\
               &&{\t istat = CCTK\_GroupData(index,gtype,vtype,dim,nvars,ntimelevels);}
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}




% Groups.c
\begin{CCTKFunc}{CCTK\_VarName}{Given a variable index, returns the variable name}
\subroutine{char *}{integer}{name}
\argument{int}{integer}{index}
\showargs
\begin{params}
\parameter{name}{The  variable name}
\parameter{index}{The variable index}
\end{params}
\begin{discussion}
No Fortran routine exists at the moment. 
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t index = CCTK\_VarIndex(`evolve::phi')}\\
               &&{\t name = CCTK\_VarName(index) ;}
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}





% Groups.c
\begin{CCTKFunc}{CCTK\_GroupName}{Given a group index, returns the group name}
\subroutine{char *}{integer}{name}
\argument{int}{integer}{index}
\showargs
\begin{params}
\parameter{name}{The group name}
\parameter{index}{The group index}
\end{params}
\begin{discussion}
No Fortran routine exists at the moment. 
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t index = CCTK\_GroupIndex(`evolve::scalars')}\\
               &&{\t name = CCTK\_GroupName(index) ;}
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}





% Groups.c
\begin{CCTKFunc}{CCTK\_DecomposeName}{Given the full name of a variable/group, separates the name returning both the implementation and the variable/group}
\subroutine{int}{integer}{istat}
\argument{char *}{}{fullname}
\argument{char **}{}{imp}
\argument{char **}{}{name}
\showargs
\begin{params}
\parameter{istat}{Status flag returned by routine}
\parameter{fullname}{The full name of the group/variable}
\parameter{imp}{The implementation name}
\parameter{name}{The group/variable name}
\end{params}
\begin{discussion}
No Fortran routine exists at the moment. 
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t istat = CCTK\_DecomposeName(`evolve::scalars',imp,name)}\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}





% Groups.c
\begin{CCTKFunc}{CCTK\_FirstVarIndexI}{Given a group index returns the first variable index in the group}
\subroutine{int}{integer}{firstvar}
\argument{int}{integer}{group}
\showargs
\begin{params}
\parameter{firstvar}{The the first variable index in the given group}
\parameter{group}{The group index}
\end{params}
\begin{discussion}

\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t index = CCTK\_GroupIndex(`evolve::scalars')}\\
               &&{\t firstvar = CCTK\_FirstVarIndexI(index) ;}
\\
\hfill {\bf Fortran} && {\t call CCTK\_GroupIndex(index,3)}\\
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}





% Groups.c
\begin{CCTKFunc}{CCTK\_NumVarsInGroupI}{Provides the number of variables in a group from the group index}
\subroutine{int}{integer}{num}
\argument{int}{integer}{index}
\showargs
\begin{params}
\parameter{num}{The number of variables in the group}
\parameter{group}{The group index}
\end{params}
\begin{discussion}

\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t index = CCTK\_GroupIndex(`evolve::scalars')}\\
               &&{\t firstvar = CCTK\_NumVarsInGroupI(index) ;}
\\
\hfill {\bf Fortran} && {\t call CCTK\_NUMVARSINGROUPI(firstvar,3)}\\
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}




% Groups.c
\begin{CCTKFunc}{CCTK\_NumVarsInGroup}{Provides the number of variables in a group from the group name}
\subroutine{int}{integer}{num}
\argument{const char *}{character*(*)}{name}
\showargs
\begin{params}
\parameter{num}{The number of variables in the group}
\parameter{group}{The full group name}
\end{params}
\begin{discussion}
The group name should be given in the form {\t <implementation>::<group>}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t numvars = CCTK\_NumVarsInGroup(`evolve::scalars') ;}
\\
\hfill {\bf Fortran} && {\t call CCTK\_NUMVARSINGROUP(numvars,`evolve::scalars')}\\
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% Groups.c
\begin{CCTKFunc}{CCTK\_GroupTypeFromVarI}{Provides group type index from the group index}
\subroutine{int}{integer}{type}
\argument{int}{integer}{index}
\showargs
\begin{params}
\parameter{type}{The group type index}
\parameter{group}{The group index}
\end{params}
\begin{discussion}
The group type index indicates the type of variables in the group. 
Either scalars, grid functions or arrays. The group type can be checked
with the Cactus provided macros for {\t GROUP\_SCALAR}, {\t GROUP\_GF}, {\t GROUP\_ARRAY}.
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t index = CCTK\_GroupIndex(`evolve::scalars')}\\
               &&{\t array = (GROUP\_ARRAY == CCTK\_GroupTypeFromVarI(index)) ;}
\\
\hfill {\bf Fortran} && {\t call CCTK\_GROUPTYPEFROMVARI(type,3)}\\
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% Groups.c
\begin{CCTKFunc}{CCTK\_VarTypeI}{Provides variable type index from the variable index}
\subroutine{int}{integer}{type}
\argument{int}{integer}{index}
\showargs
\begin{params}
\parameter{type}{The variable type index}
\parameter{group}{The variable index}
\end{params}
\begin{discussion}
The variable type index indicates the type of the variable. 
Either character, int, complex or real. The group type can be checked
with the Cactus provided macros for {\t CCTK\_VARIABLE\_INT}, {\t CCTK\_VARIABLE\_REAL}, {\t CCTK\_VARIABLE\_COMPLEX} or {\t CCTK\_VARIABLE\_CHAR}.
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t index = CCTK\_VarIndex(`evolve::phi')}\\
               &&{\t real = (CCTK\_VARIABLE\_REAL == CCTK\_VarTypeI(index)) ;}
\\
\hfill {\bf Fortran} && {\t call CCTK\_VARTYPEI(type,3)}\\
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}





% Groups.c
\begin{CCTKFunc}{CCTK\_NumTimeLevelsFromVarI}{Gives the number of timelevels for a variable}
\subroutine{int}{integer}{numlevels}
\argument{int}{integer}{index}
\showargs
\begin{params}
\parameter{numlevels}{The number of timelevels}
\parameter{index}{The variable index}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t index = CCTK\_VarIndex(`evolve::phi')}\\
               &&{\t numlevels = CCTK\_NumTimeLevelsFromVarI(index) ;}
\\
\hfill {\bf Fortran} && {\t call CCTK\_NUMTIMELEVELSFROMVARI(numlevels,3)}\\
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}




% Groups.c
\begin{CCTKFunc}{CCTK\_NumTimeLevelsFromVar}{Gives the number of timelevels for a variable}
\subroutine{int}{integer}{numlevels}
\argument{const char *}{character*(*)}{name}
\showargs
\begin{params}
\parameter{name}{The full variable name}
\parameter{numlevels}{The number of timelevels}
\end{params}
\begin{discussion}
The variable name should be in the form {\t <implementation>::<variable>}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t numlevels = CCTK\_NumTimeLevelsFromVar(`evolve::phi') ;}
\\
\hfill {\bf Fortran} && {\t call CCTK\_NUMTIMELEVELSFROMVAR(numlevels,`evolve::phi')}\\
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}




% Groups.c
\begin{CCTKFunc}{CCTK\_PrintGroup}{Prints a group name from its index}
\subroutine{}{}{}
\argument{int}{integer}{index}
\showargs
\begin{params}
\parameter{index}{The group index}
\end{params}
\begin{discussion}
This routine is for debugging purposes for Fortran programmers.
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t CCTK\_PrintGroup(1) ;}
\\
\hfill {\bf Fortran} && {\t call CCTK\_PRINTGROUP(1)}\\
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}




% Groups.c
\begin{CCTKFunc}{CCTK\_PrintVar}{Prints a variable name from its index}
\subroutine{}{}{}
\argument{int}{integer}{index}
\showargs
\begin{params}
\parameter{index}{The variable index}
\end{params}
\begin{discussion}
This routine is for debugging purposes for Fortran programmers.
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\hfill {\bf C} && {\t CCTK\_PrintVar(1) ;}
\\
\hfill {\bf Fortran} && {\t call CCTK\_PRINTVAR(1)}\\
\\
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% CommOverloadables.c
\begin{CCTKFunc}{CCTK\_EnableGroupStorage}{}
\subroutine{int}{integer}{istat}
\argument{cGH}{CCTK\_POINTER}{cctkGH}
\argument{const char}{character*(*)}{group}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}


% CommOverloadables.c
\begin{CCTKFunc}{CCTK\_DisableGroupStorage}{}
\subroutine{int}{integer}{istat}
\argument{cGH}{CCTK\_POINTER}{cctkGH}
\argument{const char}{character*(*)}{group}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}


% CommOverloadables.c
\begin{CCTKFunc}{CCTK\_SyncGroup}{}
\subroutine{int}{integer}{istat}
\argument{cGH}{CCTK\_POINTER}{cctkGH}
\argument{const char}{character*(*)}{group}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% CommOverloadables.c
\begin{CCTKFunc}{CCTK\_EnableGroupComm}{}
\subroutine{int}{integer}{istat}
\argument{cGH}{CCTK\_POINTER}{cctkGH}
\argument{const char}{character*(*)}{group}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}


% CommOverloadables.c
\begin{CCTKFunc}{CCTK\_DisableGroupComm}{}
\subroutine{int}{integer}{istat}
\argument{cGH}{CCTK\_POINTER}{cctkGH}
\argument{const char}{character*(*)}{group}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% CommOverloadables.c
\begin{CCTKFunc}{CCTK\_Barrier}{}
\subroutine{int}{integer}{istat}
\argument{cGH}{CCTK\_POINTER}{cctkGH}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}


% CommOverloadables.c
\begin{CCTKFunc}{CCTK\_nProcs}{}
\function{int}{integer}{nprocs}
\argument{cGH}{CCTK\_POINTER}{cctkGH}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}


% CommOverloadables.c
\begin{CCTKFunc}{CCTK\_MyProc}{}
\function{int}{integer}{myproc}
\argument{cGH}{CCTK\_POINTER}{cctkGH}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% CommOverloadables.c
\begin{CCTKFunc}{CCTK\_ParallelInit}{}
\subroutine{int}{integer}{istat}
\argument{cGH}{CCTK\_POINTER}{cctkGH}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% CommOverloadables.c
\begin{CCTKFunc}{CCTK\_Exit}{}
\subroutine{int}{integer}{istat}
\argument{cGH}{CCTK\_POINTER}{cctkGH}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% CommOverloadables.c
\begin{CCTKFunc}{CCTK\_Abort}{}
\subroutine{int}{integer}{istat}
\argument{cGH}{CCTK\_POINTER}{cctkGH}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}


% CommOverloadables.c
\begin{CCTKFunc}{CCTK\_SetupGH}{}
\subroutine{cGH}{}{GH}
\argument{tFleshConfig}{}{config}
\argument{int}{}{convlevel}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}

% CommOverloadables.c
\begin{CCTKFunc}{CCTK\_ArrayGroupSizeB}{}
\subroutine{int *}{}{size}
\argument{cGH}{}{GH}
\argument{int}{}{groupindex}
\argument{int}{}{dir}
\argument{const char *}{}{groupname}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% CommOverloadables.h
\begin{CCTKFunc}{CCTK\_QueryGroupStorageB}{}
\subroutine{int}{}{storage}
\argument{cGH}{}{GH}
\argument{int}{}{groupindex}
\argument{int}{}{groupname}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% Comm.h
\begin{CCTKFunc}{CCTK\_ArrayGroupSize}{}
\subroutine{int *}{}{size}
\argument{cGH}{}{GH}
\argument{int}{}{groupindex}
\argument{int}{}{dir}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% Comm.h
\begin{CCTKFunc}{CCTK\_QueryGroupStorageI}{}
\subroutine{int}{}{storage}
\argument{cGH}{}{GH}
\argument{int}{}{groupindex}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}


% Comm.h
\begin{CCTKFunc}{CCTK\_ArrayGroupSize}{}
\subroutine{int *}{}{size}
\argument{cGH}{}{GH}
\argument{const char *}{}{groupname}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% Comm.h
\begin{CCTKFunc}{CCTK\_QueryGroupStorage}{}
\subroutine{int}{}{storage}
\argument{cGH}{}{GH}
\argument{int}{}{groupname}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}


% IOOverloadables.h
\begin{CCTKFunc}{CCTK\_OutputVarAsByMethod}{}
\subroutine{int}{}{istat}
\argument{cGH}{}{GH}
\argument{const char *}{character*(*)}{variable}
\argument{const char *}{character*(*)}{method}
\argument{const char *}{character*(*)}{alias}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}


% IOOverloadables.h
\begin{CCTKFunc}{CCTK\_OutputGH}{}
\subroutine{int}{integer}{istat}
\argument{cGH}{CCTK\_POINTER}{GH}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% IOMethods.h
\begin{CCTKFunc}{CCTK\_RegisterIOMethod}{}
\function{int}{integer}{istat}
\argument{const char *}{}{name}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}


% IOMethods.h
\begin{CCTKFunc}{CCTK\_RegisterIOMethodOutputGH}{}
\function{int}{integer}{istat}
\argument{int}{}{handle}
\argument{int}{}{(* func)(cGH *)}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% IOMethods.h
\begin{CCTKFunc}{CCTK\_RegisterIOMethodTimeToOutput}{}
\function{int}{integer}{istat}
\argument{int}{}{handle}
\argument{int}{}{(* func)(cGH *,int)}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}


% IOMethods.h
\begin{CCTKFunc}{CCTK\_RegisterIOMethodTriggerOutput}{}
\function{int}{integer}{istat}
\argument{int}{}{handle}
\argument{int}{}{(* func)(cGH *,int)}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}


% IOMethods.h
\begin{CCTKFunc}{CCTK\_RegisterIOMethodOutputVarAs}{}
\function{int}{integer}{istat}
\argument{int}{}{handle}
\argument{int}{}{(* func)(cGH *,const char*, const char *)}
\showargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}



% GHExtensions.h
\begin{CCTKFunc}{CCTK\_RegisterGHExtension}{}
\function{int}{}{istat}
\argument{const char *}{}{name}
\showcargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}

% GHExtensions.h
\begin{CCTKFunc}{CCTK\_RegisterGHExtensionSetupGH}{}
\function{int}{}{istat}
\argument{int}{}{handle}
\argument{void *}{}{(*func)(tFleshConfig *, int, cGH *)}
\showcargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}

% GHExtensions.h
\begin{CCTKFunc}{CCTK\_RegisterGHExtensionInitGH}{}
\function{int}{}{istat}
\argument{int}{}{handle}
\argument{void *}{}{(*func)(cGH *)}
\showcargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}

% GHExtensions.h
\begin{CCTKFunc}{CCTK\_RegisterGHExtensionrfrTraverseGH}{}
\function{int}{}{istat}
\argument{int}{}{handle}
\argument{void *}{}{(*func)(cGH *,int)}
\showcargs
\begin{params}
\end{params}
\begin{discussion}
\end{discussion}
\begin{examples}
\begin{tabular}{@{}p{3cm}cp{11cm}}
\end{tabular}
\end{examples}
\begin{errorcodes}
\end{errorcodes}
\end{CCTKFunc}






\end{cactuspart}
