\documentclass{article}
%\usepackage{../../../../doc/ThornGuide/cactus}
\usepackage{../../../../../doc/latex/cactus}
\newlength{\tableWidth} \newlength{\maxVarWidth} \newlength{\paraWidth} \newlength{\descWidth} \begin{document}

% The title of the document (not necessarily the name of the Thorn)
\title{{\tt Convert\_to\_HydroBase}: A Module for Converting {\tt GiRaFFE} variables into {\tt HydroBase} variables, for Analysis}

% The author of the documentation - on one line, otherwise it does not work
\author{Original author: Zachariah B. Etienne. }

% the date your document was last changed, if your document is in CVS, 
% please use:
\date{$ $Date: 2015-10-12 12:00:00 -0600 (Mon, 12 Oct 2015) $ $}
\maketitle

% *======================================================================*
%  Cactus Thorn template for ThornGuide documentation
%  Author: Ian Kelley
%  Date: Sun Jun 02, 2002
%  $Header$                                                             
%
%  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 
%  relevent 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 sparated with a \\ or a comma
%   - You can define your own macros are OK, but they must appear after
%     the START CACTUS THORNGUIDE line, and do 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 graphix package. 
%     More specifically, with the "includegraphics" command. Do
%     not specify any graphic file extensions in your .tex file. This 
%     will allow us (later) 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{...}
%   - 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/WVUThorns/GiRaFFE_to_HydroBase/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$

% 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)

% Do not delete next line
% START CACTUS THORNGUIDE

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

%\newcommand{\eqref}[1]{(\ref{#1})}

% Add an abstract for this thorn's documentation
\begin{abstract}
{\tt GiRaFFE} and {\tt HydroBase} variables are incompatible;
The former uses 3-velocity defined as $v^i = u^i/u^0$, and
the latter uses the Valencia formalism definition of $v^i$.

Define the Valencia formalism's definition of $v^i$ to be 
"$W^i$", and {\tt GiRaFFE}'s definition "$v^i$"
Then
\begin{equation}
W^i = (v^i + \beta^i) / (\alpha),
\end{equation}
which comes from Eq 11 in the {\tt GiRaFFE} code announcement
paper:\\ \url{http://arxiv.org/pdf/1501.07276.pdf}.

Similarly,
\begin{equation}
v_i = (\alpha) W^i  - \beta^i
\end{equation}

In addition, {\tt GiRaFFE} needs the A-fields to be 
defined on {\it staggered} grids, and {\tt HydroBase} does not yet
support this option. The staggerings are defined in 
Table 1 of the {\tt GiRaFFE} code announcement paper:
\\ \url{http://arxiv.org/pdf/1501.07276.pdf} (page 15).

The long-term goal should be to adjust {\tt HydroBase} and {\tt
  GiRaFFE} so that this thorn is no longer necessary.
\end{abstract}

% Do not delete next line
% END CACTUS THORNGUIDE



\section{Parameters} 


\parskip = 0pt

\setlength{\tableWidth}{160mm}

\setlength{\paraWidth}{\tableWidth}
\setlength{\descWidth}{\tableWidth}
\settowidth{\maxVarWidth}{convert\_giraffe\_to\_hydrobase\_every}

\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}}{convert\_giraffe\_to\_hydrobase\_every} & {\bf Scope:} private & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em How often to convert GiRaFFE primitive variables to HydroBase (Valencia formulation) primitive variables? Needed for some ET-based diagnostics. NOT needed for pure GiRaFFE runs.}} \\
\hline{\bf Range} & &  {\bf Default:} (none) \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:*} & \multicolumn{2}{p{\paraWidth}|}{zero (disable) or positive (every N iterations)} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{timelevels} & {\bf Scope:} shared from HYDROBASE & INT \\\hline
\end{tabular*}

\vspace{0.5cm}\parskip = 10pt 

\section{Interfaces} 


\parskip = 0pt

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

\noindent {\bf Implements}: 

giraffe\_to\_hydrobase
\vspace{2mm}

\noindent {\bf Inherits}: 

grid

hydrobase

admbase

giraffe
\vspace{2mm}

\vspace{5mm}

\noindent {\bf Uses header}: 

GiRaFFE\_headers.h
\vspace{2mm}\parskip = 10pt 

\section{Schedule} 


\parskip = 0pt


\noindent This section lists all the variables which are assigned storage by thorn WVUThorns/GiRaFFE\_to\_HydroBase.  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}NONE
\subsection*{Scheduled Functions}
\vspace{5mm}

\noindent {\bf CCTK\_INITIAL} 

\hspace{5mm} convert\_giraffe\_to\_hydrobase 

\hspace{5mm}{\it convert giraffe-native variables to hydrobase } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & giraffe\_id\_converter \\ 
~ & Language:  & c \\ 
~ & Type:  & function \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf CCTK\_ANALYSIS} 

\hspace{5mm} convert\_giraffe\_to\_hydrobase 

\hspace{5mm}{\it convert giraffe-native variables to hydrobase } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & ml\_bssn\_evolcalcgroup \\ 
~ & Before:  & compute\_bi\_b2\_poyn\_fluxet \\ 
~& ~ &particle\_traceret\\ 
~& ~ &volumeintegralgroup\\ 
~& ~ &convert\_to\_mhd\_3velocity\\ 
~ & Language:  & c \\ 
~ & Options:  & global-early \\ 
~& ~ &loop-local\\ 
~ & Type:  & function \\ 
\end{tabular*} 



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