% *======================================================================*
%  Cactus Thorn template for ThornGuide documentation
%  Author: Ian Kelley
%  Date: Sun Jun 02, 2002
%  $Header: /cactusdevcvs/Cactus/doc/ThornGuide/template.tex,v 1.12 2004/01/07 20:12:39 rideout Exp $
%
%  Thorn documentation in the latex file doc/documentation.tex
%  will be included in ThornGuides built with the Cactus make system.
%  The scripts employed by the make system automatically include
%  pages about variables, parameters and scheduling parsed from the
%  relevant thorn CCL files.
%
%  This template contains guidelines which help to assure that your
%  documentation will be correctly added to ThornGuides. More
%  information is available in the Cactus UsersGuide.
%
%  Guidelines:
%   - Do not change anything before the line
%       % START CACTUS THORNGUIDE",
%     except for filling in the title, author, date, etc. fields.
%        - Each of these fields should only be on ONE line.
%        - Author names should be separated with a \\ or a comma.
%   - You can define your own macros, but they must appear after
%     the START CACTUS THORNGUIDE line, and must not redefine standard
%     latex commands.
%   - To avoid name clashes with other thorns, 'labels', 'citations',
%     'references', and 'image' names should conform to the following
%     convention:
%       ARRANGEMENT_THORN_LABEL
%     For example, an image wave.eps in the arrangement CactusWave and
%     thorn WaveToyC should be renamed to CactusWave_WaveToyC_wave.eps
%   - Graphics should only be included using the graphicx package.
%     More specifically, with the "\includegraphics" command.  Do
%     not specify any graphic file extensions in your .tex file. This
%     will allow us to create a PDF version of the ThornGuide
%     via pdflatex.
%   - References should be included with the latex "\bibitem" command.
%   - Use \begin{abstract}...\end{abstract} instead of \abstract{...}
%   - Do not use \appendix, instead include any appendices you need as
%     standard sections.
%   - For the benefit of our Perl scripts, and for future extensions,
%     please use simple latex.
%
% *======================================================================*
%
% Example of including a graphic image:
%    \begin{figure}[ht]
% 	\begin{center}
%    	   \includegraphics[width=6cm]{/home/runner/work/tests/tests/arrangements/SpacetimeX/Z4c/doc/MyArrangement_MyThorn_MyFigure}
% 	\end{center}
% 	\caption{Illustration of this and that}
% 	\label{MyArrangement_MyThorn_MyLabel}
%    \end{figure}
%
% Example of using a label:
%   \label{MyArrangement_MyThorn_MyLabel}
%
% Example of a citation:
%    \cite{MyArrangement_MyThorn_Author99}
%
% Example of including a reference
%   \bibitem{MyArrangement_MyThorn_Author99}
%   {J. Author, {\em The Title of the Book, Journal, or periodical}, 1 (1999),
%   1--16. {\tt http://www.nowhere.com/}}
%
% *======================================================================*

% If you are using CVS use this line to give version information
% $Header: /cactusdevcvs/Cactus/doc/ThornGuide/template.tex,v 1.12 2004/01/07 20:12:39 rideout Exp $

\documentclass{article}

% Use the Cactus ThornGuide style file
% (Automatically used from Cactus distribution, if you have a
%  thorn without the Cactus Flesh download this from the Cactus
%  homepage at www.cactuscode.org)
\usepackage{../../../../../doc/latex/cactus}

\newlength{\tableWidth} \newlength{\maxVarWidth} \newlength{\paraWidth} \newlength{\descWidth} \begin{document}

% The author of the documentation
\author{Erik Schnetter \textless eschnetter@perimeterinstitute.ca \textgreater}

% The title of the document (not necessarily the name of the Thorn)
\title{Z4c Thorn for use with CarpetX}

% the date your document was last changed, if your document is in CVS,
% please use:
%    \date{$ $Date: 2004/01/07 20:12:39 $ $}
\date{April 26, 2024}

\maketitle

% Do not delete next line
% START CACTUS THORNGUIDE

% Add all definitions used in this documentation here
%   \def\mydef etc

% Add an abstract for this thorn's documentation
\begin{abstract}

This Thorn implements the Z4c formulation of the Einstein Equations~\cite{Hilditch:2012fp}. It also monitors the stability of those equations~\cite{cao2012numerical}.

\end{abstract}

% The following sections are suggestive only.
% Remove them or add your own.

\section{Using This Thorn}

The \texttt{SpacetimeX/Z4c} thorn reads (i.e. in \texttt{Z4c\_Initial1}) and, if the parameter \texttt{Z4c::calc\_ADM\_vars} is set (which is \texttt{true} by default), writes (i.e. in \texttt{Z4c\_ADM}) the ADM variables (i.e. \texttt{CarpetX/ADMBaseX}) automatically.

Derivatives are hard-coded to fourth order. However, should it be desired, second order is also possible by editing the constant \texttt{deriv\_order} in \texttt{derivs.hxx} to the value \texttt{2}.

This thorn integrates with the \texttt{CarpetX/ODESolvers} thorn.

\begin{thebibliography}{9}
@article{Hilditch:2012fp,
      author         = "Hilditch, David and Bernuzzi, Sebastiano and Thierfelder,
                        Marcus and Cao, Zhoujian and Tichy, Wolfgang and
                        Bruegmann, Bernd",
      title          = "{Compact binary evolutions with the Z4c formulation}",
      journal        = "Phys. Rev.",
      volume         = "D88",
      year           = "2013",
      pages          = "084057",
      doi            = "10.1103/PhysRevD.88.084057",
      eprint         = "1212.2901",
      archivePrefix  = "arXiv",
      primaryClass   = "gr-qc",
      SLACcitation   = "%%CITATION = ARXIV:1212.2901;%%"
}

@article{cao2012numerical,
  title={Numerical stability of the Z4c formulation of general relativity},
  author={Cao, Zhoujian and Hilditch, David},
  journal={Physical Review D},
  volume={85},
  number={12},
  pages={124032},
  year={2012},
  publisher={APS}
}

\end{thebibliography}

% Do not delete next line
% END CACTUS THORNGUIDE



\section{Parameters} 


\parskip = 0pt

\setlength{\tableWidth}{160mm}

\setlength{\paraWidth}{\tableWidth}
\setlength{\descWidth}{\tableWidth}
\settowidth{\maxVarWidth}{boundary\_conditions}

\addtolength{\paraWidth}{-\maxVarWidth}
\addtolength{\paraWidth}{-\columnsep}
\addtolength{\paraWidth}{-\columnsep}
\addtolength{\paraWidth}{-\columnsep}

\addtolength{\descWidth}{-\columnsep}
\addtolength{\descWidth}{-\columnsep}
\addtolength{\descWidth}{-\columnsep}
\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{alphag\_floor} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Floor for alphaG}} \\
\hline{\bf Range} & &  {\bf Default:} 1.0e-10 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering (0:*} & \multicolumn{2}{p{\paraWidth}|}{} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{boundary\_conditions} & {\bf Scope:} private & KEYWORD \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em boundary conditions}} \\
\hline{\bf Range} & &  {\bf Default:} CarpetX \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering NewRadX} & \multicolumn{2}{p{\paraWidth}|}{radiative boundary conditions using NewRadX} \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering CarpetX} & \multicolumn{2}{p{\paraWidth}|}{use CarpetX default boundary conditions} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{calc\_adm\_vars} & {\bf Scope:} private & BOOLEAN \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Calculate ADM variables}} \\
\hline & & {\bf Default:} yes \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{calc\_admrhs\_vars} & {\bf Scope:} private & BOOLEAN \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Calculate RHS of ADM variables}} \\
\hline & & {\bf Default:} yes \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{calc\_constraints} & {\bf Scope:} private & BOOLEAN \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Calculate constraints}} \\
\hline & & {\bf Default:} yes \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{chi\_floor} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Floor for chi}} \\
\hline{\bf Range} & &  {\bf Default:} 1.0e-10 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering (0:*} & \multicolumn{2}{p{\paraWidth}|}{} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{epsdiss} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Dissipation coefficient {\textless}arXiv:gr-qc/0610128{\textgreater}}} \\
\hline{\bf Range} & &  {\bf Default:} 0.32 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0.0:*} & \multicolumn{2}{p{\paraWidth}|}{} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{eta} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em eta}} \\
\hline{\bf Range} & &  {\bf Default:} 2.0 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering *:*} & \multicolumn{2}{p{\paraWidth}|}{} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{f\_mu\_l} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em mu\_L = f\_mu\_L / alpha}} \\
\hline{\bf Range} & &  {\bf Default:} 2.0 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering *:*} & \multicolumn{2}{p{\paraWidth}|}{} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{f\_mu\_s} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em mu\_S = f\_mu\_S / alpha\^2}} \\
\hline{\bf Range} & &  {\bf Default:} 1.0 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering *:*} & \multicolumn{2}{p{\paraWidth}|}{} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{kappa1} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em kappa1}} \\
\hline{\bf Range} & &  {\bf Default:} 0.02 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering *:*} & \multicolumn{2}{p{\paraWidth}|}{} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{kappa2} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em kappa2}} \\
\hline{\bf Range} & &  {\bf Default:} 0.0 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering *:*} & \multicolumn{2}{p{\paraWidth}|}{} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{n\_alphag} & {\bf Scope:} private & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em n power of outgoing boundary r\^n fall off rate for alpha}} \\
\hline{\bf Range} & &  {\bf Default:} 1 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:2} & \multicolumn{2}{p{\paraWidth}|}{1 is my guess} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{n\_at} & {\bf Scope:} private & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em n power of outgoing boundary r\^n fall off rate for At\_ij}} \\
\hline{\bf Range} & &  {\bf Default:} 1 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:2} & \multicolumn{2}{p{\paraWidth}|}{Maybe 1?} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{n\_betag} & {\bf Scope:} private & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em n power of outgoing boundary r\^n fall off rate for beta}} \\
\hline{\bf Range} & &  {\bf Default:} 1 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:2} & \multicolumn{2}{p{\paraWidth}|}{1 is my guess} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{n\_chi} & {\bf Scope:} private & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em n power of outgoing boundary r\^n fall off rate for chi}} \\
\hline{\bf Range} & &  {\bf Default:} 1 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:2} & \multicolumn{2}{p{\paraWidth}|}{1 is reasonable} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{n\_gammat} & {\bf Scope:} private & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em n power of outgoing boundary r\^n fall off rate for gammat\_ij}} \\
\hline{\bf Range} & &  {\bf Default:} 1 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:2} & \multicolumn{2}{p{\paraWidth}|}{1 is reasonable} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{n\_gamt} & {\bf Scope:} private & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em n power of outgoing boundary r\^n fall off rate for Gamt\^i}} \\
\hline{\bf Range} & &  {\bf Default:} 1 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:2} & \multicolumn{2}{p{\paraWidth}|}{Maybe 1?} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{n\_kh} & {\bf Scope:} private & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em n power of outgoing boundary r\^n fall off rate for Kh}} \\
\hline{\bf Range} & &  {\bf Default:} 1 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:2} & \multicolumn{2}{p{\paraWidth}|}{Maybe 1?} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{n\_theta} & {\bf Scope:} private & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em n power of outgoing boundary r\^n fall off rate for Theta}} \\
\hline{\bf Range} & &  {\bf Default:} 1 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:2} & \multicolumn{2}{p{\paraWidth}|}{Maybe 1?} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{set\_theta\_zero} & {\bf Scope:} private & BOOLEAN \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em set Theta to zero, which converts Z4c to BSSN}} \\
\hline & & {\bf Default:} no \\\hline
\end{tabular*}

\vspace{0.5cm}\parskip = 10pt 

\section{Interfaces} 


\parskip = 0pt

\vspace{3mm} \subsection*{General}

\noindent {\bf Implements}: 

z4c
\vspace{2mm}

\noindent {\bf Inherits}: 

admbasex

tmunubasex
\vspace{2mm}
\subsection*{Grid Variables}
\vspace{5mm}\subsubsection{PRIVATE GROUPS}

\vspace{5mm}

\begin{tabular*}{150mm}{|c|c@{\extracolsep{\fill}}|rl|} \hline 
~ {\bf Group Names} ~ & ~ {\bf Variable Names} ~  &{\bf Details} ~ & ~\\ 
\hline 
chi & chi & compact & 0 \\ 
 &  & description & chi \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & rhs="chi\_rhs" dependents="ADMBaseX::metric" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
gamma\_tilde &  & compact & 0 \\ 
 & gammatxx & description & gamma-tilde \\ 
 & gammatxy & dimensions & 3 \\ 
 & gammatxz & distribution & DEFAULT \\ 
 & gammatyy & group type & GF \\ 
 & gammatyz & tags & parities=\{+1 +1 +1   -1 -1 +1   -1 +1 -1   +1 +1 +1   +1 -1 -1   +1 +1 +1\} rhs="gamma\_tilde\_rhs" dependents="ADMBaseX::metric" \\ 
 & gammatzz & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
k\_hat &  & compact & 0 \\ 
 & Kh & description & K-hat \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & rhs="K\_hat\_rhs" dependents="ADMBaseX::curv" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
a\_tilde &  & compact & 0 \\ 
 & Atxx & description & A-tilde \\ 
 & Atxy & dimensions & 3 \\ 
 & Atxz & distribution & DEFAULT \\ 
 & Atyy & group type & GF \\ 
 & Atyz & tags & parities=\{+1 +1 +1   -1 -1 +1   -1 +1 -1   +1 +1 +1   +1 -1 -1   +1 +1 +1\} rhs="A\_tilde\_rhs" dependents="ADMBaseX::curv" \\ 
 & Atzz & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
gam\_tilde &  & compact & 0 \\ 
 & Gamtx & description & Gamma-tilde \\ 
 & Gamty & dimensions & 3 \\ 
 & Gamtz & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & parities=\{-1 +1 +1   +1 -1 +1   +1 +1 -1\} rhs="Gam\_tilde\_rhs" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
theta & Theta & compact & 0 \\ 
 &  & description & Theta \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & rhs="Theta\_rhs" dependents="ADMBaseX::curv" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
\end{tabular*} 



\vspace{5mm}
\vspace{5mm}

\begin{tabular*}{150mm}{|c|c@{\extracolsep{\fill}}|rl|} \hline 
~ {\bf Group Names} ~ & ~ {\bf Variable Names} ~  &{\bf Details} ~ & ~ \\ 
\hline 
alphag & alphaG & compact & 0 \\ 
 &  & description & alpha \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & rhs="alphaG\_rhs" dependents="ADMBaseX::lapse ADMBaseX::dtlapse" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
betag &  & compact & 0 \\ 
 & betaGx & description & beta \\ 
 & betaGy & dimensions & 3 \\ 
 & betaGz & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & parities=\{-1 +1 +1   +1 -1 +1   +1 +1 -1\} rhs="betaG\_rhs" dependents="ADMBaseX::shift ADMBaseX::dtshift" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
ztc &  & compact & 0 \\ 
 & ZtCx & description & Z-tilde \\ 
 & ZtCy & dimensions & 3 \\ 
 & ZtCz & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & parities=\{-1 +1 +1   +1 -1 +1   +1 +1 -1\} checkpoint="no" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
hc & HC & compact & 0 \\ 
 &  & description & H \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & checkpoint="no" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
mtc &  & compact & 0 \\ 
 & MtCx & description & M-tilde \\ 
 & MtCy & dimensions & 3 \\ 
 & MtCz & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & parities=\{-1 +1 +1   +1 -1 +1   +1 +1 -1\} checkpoint="no" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
allc & allC & compact & 0 \\ 
 &  & description & constraint monitor \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & checkpoint="no" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
\end{tabular*} 



\vspace{5mm}
\vspace{5mm}

\begin{tabular*}{150mm}{|c|c@{\extracolsep{\fill}}|rl|} \hline 
~ {\bf Group Names} ~ & ~ {\bf Variable Names} ~  &{\bf Details} ~ & ~ \\ 
\hline 
chi\_rhs & chi\_rhs & compact & 0 \\ 
 &  & description & chi \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & checkpoint="no" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
gamma\_tilde\_rhs &  & compact & 0 \\ 
 & gammatxx\_rhs & description & gamma-tilde \\ 
 & gammatxy\_rhs & dimensions & 3 \\ 
 & gammatxz\_rhs & distribution & DEFAULT \\ 
 & gammatyy\_rhs & group type & GF \\ 
 & gammatyz\_rhs & tags & parities=\{+1 +1 +1   -1 -1 +1   -1 +1 -1   +1 +1 +1   +1 -1 -1   +1 +1 +1\} checkpoint="no" \\ 
 & gammatzz\_rhs & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
k\_hat\_rhs &  & compact & 0 \\ 
 & Kh\_rhs & description & K-hat \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & checkpoint="no" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
a\_tilde\_rhs &  & compact & 0 \\ 
 & Atxx\_rhs & description & A-tilde \\ 
 & Atxy\_rhs & dimensions & 3 \\ 
 & Atxz\_rhs & distribution & DEFAULT \\ 
 & Atyy\_rhs & group type & GF \\ 
 & Atyz\_rhs & tags & parities=\{+1 +1 +1   -1 -1 +1   -1 +1 -1   +1 +1 +1   +1 -1 -1   +1 +1 +1\} checkpoint="no" \\ 
 & Atzz\_rhs & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
gam\_tilde\_rhs &  & compact & 0 \\ 
 & Gamtx\_rhs & description & Gamma-tilde \\ 
 & Gamty\_rhs & dimensions & 3 \\ 
 & Gamtz\_rhs & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & parities=\{-1 +1 +1   +1 -1 +1   +1 +1 -1\} checkpoint="no" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
theta\_rhs & Theta\_rhs & compact & 0 \\ 
 &  & description & Theta \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & checkpoint="no" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
\end{tabular*} 



\vspace{5mm}
\vspace{5mm}

\begin{tabular*}{150mm}{|c|c@{\extracolsep{\fill}}|rl|} \hline 
~ {\bf Group Names} ~ & ~ {\bf Variable Names} ~  &{\bf Details} ~ & ~ \\ 
\hline 
alphag\_rhs & alphaG\_rhs & compact & 0 \\ 
 &  & description & alpha \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & checkpoint="no" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
betag\_rhs &  & compact & 0 \\ 
 & betaGx\_rhs & description & beta \\ 
 & betaGy\_rhs & dimensions & 3 \\ 
 & betaGz\_rhs & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & parities=\{-1 +1 +1   +1 -1 +1   +1 +1 -1\} checkpoint="no" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
\end{tabular*} 



\vspace{5mm}

\noindent {\bf Uses header}: 

defs.hxx

div.hxx

dual.hxx

loop\_device.hxx

mat.hxx

simd.hxx

sum.hxx

vec.hxx

vect.hxx

newradx.hxx
\vspace{2mm}\parskip = 10pt 

\section{Schedule} 


\parskip = 0pt


\noindent This section lists all the variables which are assigned storage by thorn SpacetimeX/Z4c.  Storage can either last for the duration of the run ({\bf Always} means that if this thorn is activated storage will be assigned, {\bf Conditional} means that if this thorn is activated storage will be assigned for the duration of the run if some condition is met), or can be turned on for the duration of a schedule function.


\subsection*{Storage}

\hspace{5mm}

 \begin{tabular*}{160mm}{ll} 

{\bf Always:}&  ~ \\ 
 chi & ~\\ 
 gamma\_tilde & ~\\ 
 MtC & ~\\ 
 allC & ~\\ 
 chi\_rhs & ~\\ 
 gamma\_tilde\_rhs & ~\\ 
 K\_hat\_rhs & ~\\ 
 A\_tilde\_rhs & ~\\ 
 Gam\_tilde\_rhs & ~\\ 
 Theta\_rhs & ~\\ 
 alphaG\_rhs & ~\\ 
 betaG\_rhs & ~\\ 
 K\_hat & ~\\ 
 A\_tilde & ~\\ 
 Gam\_tilde & ~\\ 
 Theta & ~\\ 
 alphaG & ~\\ 
 betaG & ~\\ 
 ZtC & ~\\ 
 HC & ~\\ 
~ & ~\\ 
\end{tabular*} 


\subsection*{Scheduled Functions}
\vspace{5mm}

\noindent {\bf CCTK\_INITIAL} 

\hspace{5mm} z4c\_initialgroup 

\hspace{5mm}{\it convert adm to z4c variables } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & admbasex\_postinitial \\ 
~ & Type:  & group \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf CCTK\_INITIAL}   (conditional) 

\hspace{5mm} z4c\_poststepgroup 

\hspace{5mm}{\it post-process z4c variables } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & z4c\_initialgroup \\ 
~ & Before:  & admbasex\_setadmvars \\ 
~ & Type:  & group \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf Z4c\_InitialGroup} 

\hspace{5mm} z4c\_initial1 

\hspace{5mm}{\it convert adm to z4c variables, part 1 } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & Language:  & c \\ 
~ & Reads:  & admbasex::metric(interior) \\ 
~& ~ &admbasex::curv(interior)\\ 
~& ~ &admbasex::lapse(interior)\\ 
~& ~ &admbasex::shift(interior)\\ 
~ & Sync:  & gamma\_tilde \\ 
~ & Type:  & function \\ 
~ & Writes:  & chi(interior) \\ 
~& ~ &gamma\_tilde(interior)\\ 
~& ~ &k\_hat(interior)\\ 
~& ~ &a\_tilde(interior)\\ 
~& ~ &theta(interior)\\ 
~& ~ &alphag(interior)\\ 
~& ~ &betag(interior)\\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf Z4c\_InitialGroup} 

\hspace{5mm} z4c\_initial2 

\hspace{5mm}{\it convert adm to z4c variables, part 2 } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & z4c\_initial1 \\ 
~ & Language:  & c \\ 
~ & Reads:  & gamma\_tilde(everywhere) \\ 
~ & Type:  & function \\ 
~ & Writes:  & gam\_tilde(interior) \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf Z4c\_PostStepGroup} 

\hspace{5mm} z4c\_enforce 

\hspace{5mm}{\it enforce algebraic z4c constraints } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & Language:  & c \\ 
~ & Reads:  & chi(interior) \\ 
~& ~ &gamma\_tilde(interior)\\ 
~& ~ &a\_tilde(interior)\\ 
~& ~ &alphag(interior)\\ 
~ & Sync:  & chi \\ 
~& ~ &gamma\_tilde\\ 
~& ~ &k\_hat\\ 
~& ~ &a\_tilde\\ 
~& ~ &gam\_tilde\\ 
~& ~ &theta\\ 
~& ~ &alphag\\ 
~& ~ &betag\\ 
~ & Type:  & function \\ 
~ & Writes:  & chi(interior) \\ 
~& ~ &gamma\_tilde(interior)\\ 
~& ~ &a\_tilde(interior)\\ 
~& ~ &alphag(interior)\\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf Z4c\_PostStepGroup}   (conditional) 

\hspace{5mm} z4c\_adm 

\hspace{5mm}{\it convert z4c to adm variables } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & z4c\_enforce \\ 
~ & Language:  & c \\ 
~ & Reads:  & chi(everywhere) \\ 
~& ~ &gamma\_tilde(everywhere)\\ 
~& ~ &k\_hat(everywhere)\\ 
~& ~ &a\_tilde(everywhere)\\ 
~& ~ &gam\_tilde(everywhere)\\ 
~& ~ &theta(everywhere)\\ 
~& ~ &alphag(everywhere)\\ 
~& ~ &betag(everywhere)\\ 
~ & Type:  & function \\ 
~ & Writes:  & admbasex::metric(everywhere) \\ 
~& ~ &admbasex::curv(everywhere)\\ 
~& ~ &admbasex::lapse(everywhere)\\ 
~& ~ &admbasex::dtlapse(everywhere)\\ 
~& ~ &admbasex::shift(everywhere)\\ 
~& ~ &admbasex::dtshift(everywhere)\\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf Z4c\_PostStepGroup2}   (conditional) 

\hspace{5mm} z4c\_adm2 

\hspace{5mm}{\it calculate second time derivatives of adm variables } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & Language:  & c \\ 
~ & Reads:  & chi(everywhere) \\ 
~& ~ &gamma\_tilde(everywhere)\\ 
~& ~ &k\_hat(everywhere)\\ 
~& ~ &a\_tilde(everywhere)\\ 
~& ~ &gam\_tilde(everywhere)\\ 
~& ~ &theta(everywhere)\\ 
~& ~ &alphag(everywhere)\\ 
~& ~ &betag(everywhere)\\ 
~& ~ &tmunubasex::ettt(interior)\\ 
~& ~ &tmunubasex::etti(interior)\\ 
~& ~ &tmunubasex::etij(interior)\\ 
~ & Sync:  & admbasex::dtcurv \\ 
~& ~ &admbasex::dt2lapse\\ 
~& ~ &admbasex::dt2shift\\ 
~ & Type:  & function \\ 
~ & Writes:  & admbasex::dtcurv(interior) \\ 
~& ~ &admbasex::dt2lapse(interior)\\ 
~& ~ &admbasex::dt2shift(interior)\\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf Z4c\_AnalysisGroup}   (conditional) 

\hspace{5mm} z4c\_constraints 

\hspace{5mm}{\it calculate z4c constraints } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & Language:  & c \\ 
~ & Reads:  & chi(everywhere) \\ 
~& ~ &gamma\_tilde(everywhere)\\ 
~& ~ &k\_hat(everywhere)\\ 
~& ~ &a\_tilde(everywhere)\\ 
~& ~ &gam\_tilde(everywhere)\\ 
~& ~ &theta(everywhere)\\ 
~& ~ &alphag(everywhere)\\ 
~& ~ &betag(everywhere)\\ 
~& ~ &tmunubasex::ettt(interior)\\ 
~& ~ &tmunubasex::etti(interior)\\ 
~& ~ &tmunubasex::etij(interior)\\ 
~ & Type:  & function \\ 
~ & Writes:  & ztc(interior) \\ 
~& ~ &hc(interior)\\ 
~& ~ &mtc(interior)\\ 
~& ~ &allc(interior)\\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf Z4c\_RHSGroup}   (conditional) 

\hspace{5mm} z4c\_rhs 

\hspace{5mm}{\it calculate z4c rhs } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & Language:  & c \\ 
~ & Reads:  & chi(everywhere) \\ 
~& ~ &gamma\_tilde(everywhere)\\ 
~& ~ &k\_hat(everywhere)\\ 
~& ~ &a\_tilde(everywhere)\\ 
~& ~ &gam\_tilde(everywhere)\\ 
~& ~ &theta(everywhere)\\ 
~& ~ &alphag(everywhere)\\ 
~& ~ &betag(everywhere)\\ 
~& ~ &tmunubasex::ettt(interior)\\ 
~& ~ &tmunubasex::etti(interior)\\ 
~& ~ &tmunubasex::etij(interior)\\ 
~ & Type:  & function \\ 
~ & Writes:  & chi\_rhs(interior) \\ 
~& ~ &gamma\_tilde\_rhs(interior)\\ 
~& ~ &k\_hat\_rhs(interior)\\ 
~& ~ &a\_tilde\_rhs(interior)\\ 
~& ~ &gam\_tilde\_rhs(interior)\\ 
~& ~ &theta\_rhs(interior)\\ 
~& ~ &alphag\_rhs(interior)\\ 
~& ~ &betag\_rhs(interior)\\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf Z4c\_RHSGroup}   (conditional) 

\hspace{5mm} z4c\_apply\_newradx\_boundary\_conditions 

\hspace{5mm}{\it apply radiative boundary conditions to z4c rhs variables using newradx } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & z4c\_rhs \\ 
~ & Language:  & c \\ 
~ & Reads:  & chi(everywhere) \\ 
~& ~ &gamma\_tilde(everywhere)\\ 
~& ~ &k\_hat(everywhere)\\ 
~& ~ &a\_tilde(everywhere)\\ 
~& ~ &gam\_tilde(everywhere)\\ 
~& ~ &theta(everywhere)\\ 
~& ~ &alphag(everywhere)\\ 
~& ~ &betag(everywhere)\\ 
~& ~ &chi\_rhs(interior)\\ 
~& ~ &gamma\_tilde\_rhs(interior)\\ 
~& ~ &k\_hat\_rhs(interior)\\ 
~& ~ &a\_tilde\_rhs(interior)\\ 
~& ~ &gam\_tilde\_rhs(interior)\\ 
~& ~ &theta\_rhs(interior)\\ 
~& ~ &alphag\_rhs(interior)\\ 
~& ~ &betag\_rhs(interior)\\ 
~ & Type:  & function \\ 
~ & Writes:  & chi\_rhs(interior) \\ 
~& ~ &gamma\_tilde\_rhs(interior)\\ 
~& ~ &k\_hat\_rhs(interior)\\ 
~& ~ &a\_tilde\_rhs(interior)\\ 
~& ~ &gam\_tilde\_rhs(interior)\\ 
~& ~ &theta\_rhs(interior)\\ 
~& ~ &alphag\_rhs(interior)\\ 
~& ~ &betag\_rhs(interior)\\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf CCTK\_INITIAL} 

\hspace{5mm} z4c\_poststepgroup2 

\hspace{5mm}{\it post-process z4c variables, part 2 } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & tmunubasex\_settmunuvars \\ 
~& ~ &z4c\_poststepgroup\\ 
~ & Before:  & admbasex\_setadmrhs \\ 
~ & Type:  & group \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf CCTK\_POSTREGRID} 

\hspace{5mm} z4c\_poststepgroup 

\hspace{5mm}{\it post-process z4c variables } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & Before:  & admbasex\_setadmvars \\ 
~ & Type:  & group \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf CCTK\_POSTREGRID} 

\hspace{5mm} z4c\_poststepgroup2 

\hspace{5mm}{\it post-process z4c variables, part 2 } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & tmunubasex\_settmunuvars \\ 
~& ~ &z4c\_poststepgroup\\ 
~ & Before:  & admbasex\_setadmrhs \\ 
~ & Type:  & group \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf CCTK\_ANALYSIS} 

\hspace{5mm} z4c\_analysisgroup 

\hspace{5mm}{\it analyse z4c variables } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & Type:  & group \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf ODESolvers\_PostStep} 

\hspace{5mm} z4c\_poststepgroup 

\hspace{5mm}{\it post-process z4c variables } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & Before:  & admbasex\_setadmvars \\ 
~ & Type:  & group \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf ODESolvers\_PostStep} 

\hspace{5mm} z4c\_poststepgroup2 

\hspace{5mm}{\it post-process z4c variables, part 2 } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & tmunubasex\_settmunuvars \\ 
~& ~ &z4c\_poststepgroup\\ 
~ & Before:  & admbasex\_setadmrhs \\ 
~ & Type:  & group \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf ODESolvers\_RHS} 

\hspace{5mm} z4c\_rhsgroup 

\hspace{5mm}{\it calculate z4c rhs } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & Type:  & group \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf CCTK\_WRAGH} 

\hspace{5mm} z4c\_test 

\hspace{5mm}{\it self-test } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & Language:  & c \\ 
~ & Options:  & meta \\ 
~ & Type:  & function \\ 
\end{tabular*} 



\vspace{5mm}\parskip = 10pt 
\end{document}
