% *======================================================================*
%  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
%  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/Lean/LeanBSSNMoL/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$

\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{Miguel~Zilhão and Helvi~Witek}

% The title of the document (not necessarily the name of the Thorn)
\title{\texttt{LeanBSSNMoL}: An Einstein Toolkit thorn for evolving Einstein's equations in the BSSN formalism with the \texttt{MoL} thorn}

% the date your document was last changed, if your document is in CVS,
% please use:
%    \date{$ $Date$ $}
% when using git instead record the commit ID:
%    \date{\gitrevision{<path-to-your-.git-directory>}}
\date{June 30, 2023}

\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}
\texttt{LeanBSSNMoL} solves Einstein's equations in the BSSN formalism with up
to 6th order accurate finite-difference stencils. It relies on the
\texttt{MoL} thorn for the time integration.
\end{abstract}

\section{\texttt{LeanBSSNMoL}}

The \texttt{Lean} code was first introduced in~\cite{Sperhake:2006cy}, to evolve vacuum spacetimes with the BSSN formalism.
%
It has since been modified to run with the \texttt{MoL} thorn for the time integration and generalized to include matter terms through the \texttt{TmunuBase}
thorn. It was made publicly available through the \texttt{Canuda} numerical relativity library~\cite{Canuda}, and has since been distributed also as a part of the Einstein Toolkit.

The bulk of the code is written in Fortran~90 and should be simple to follow -- emphasis has been given to readability. The main part of the code, where the right-hand side of the evolution equations is computed, can be found in the file \texttt{calc\_bssn\_rhs.F90}.
%
For the conformal factor the code uses the ``W'' version, i.e.\ $W=\gamma^{-1/6}$, and it employs the usual ``1+log'' and ``Gamma-driver'' gauge conditions.


\section{Obtaining this thorn}

\texttt{LeanBSSNMoL} is included with the Einstein Toolkit and can also be obtained through the \texttt{Canuda} numerical relativity library~\cite{Canuda}.


\begin{thebibliography}{9}

%\cite{Sperhake:2006cy}
\bibitem{Sperhake:2006cy}
U.~Sperhake,
``Binary black-hole evolutions of excision and puncture data,''
Phys. Rev. D \textbf{76} (2007), 104015
doi:10.1103/PhysRevD.76.104015
[arXiv:gr-qc/0606079 [gr-qc]].

\bibitem{Canuda}
H.~Witek, M.~Zilhao, G.~Bozzola, C.-H.~Cheng, A.~Dima, M.~Elley, G.~Ficarra, T.~Ikeda, R.~Luna, C.~Richards, N.~Sanchis-Gual, H.~Okada~da~Silva.
``Canuda: a public numerical relativity library to probe fundamental physics,''
Zenodo (2023)
doi: 10.5281/zenodo.3565474

\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}{impose\_conf\_fac\_floor\_at\_initial}

\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}}{beta\_alp} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Exponent for lapse in front of the Gamma\^i term in the shift}} \\
\hline{\bf Range} & &  {\bf Default:} 0.0 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering *:*} & \multicolumn{2}{p{\paraWidth}|}{Anything possible, default is zero} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{beta\_f\_delta1} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em delta1 coefficient for the shift condition of 1702.01755}} \\
\hline{\bf Range} & &  {\bf Default:} 0.0125 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:*} & \multicolumn{2}{p{\paraWidth}|}{non-negative} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{beta\_f\_delta2} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em delta2 coefficient for the shift condition of 1702.01755}} \\
\hline{\bf Range} & &  {\bf Default:} 0.0005 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:*} & \multicolumn{2}{p{\paraWidth}|}{non-negative} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{beta\_gamma} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Coefficient in front of the Gamma\^i term in the shift}} \\
\hline{\bf Range} & &  {\bf Default:} 0.75 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering *:*} & \multicolumn{2}{p{\paraWidth}|}{Anything possible} \\\hline
\end{tabular*}

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

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{calculate\_constraints\_every} & {\bf Scope:} private & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Calculate the BSSN constraints every N iterations}} \\
\hline{\bf Range} & &  {\bf Default:} 1 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering *:*} & \multicolumn{2}{p{\paraWidth}|}{0 or a negative value means never compute them} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{chi\_gamma} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em adding Yo-term to the gamma equation}} \\
\hline{\bf Range} & &  {\bf Default:} 0.0 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering *:*} & \multicolumn{2}{p{\paraWidth}|}{2/3 is a good value; the sign must be the same as betak,k} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{compute\_rhs\_at\_initial} & {\bf Scope:} private & BOOLEAN \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Compute RHS after the initial data?}} \\
\hline & & {\bf Default:} no \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{conf\_fac\_floor} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Minimal value of conformal factor}} \\
\hline{\bf Range} & &  {\bf Default:} 1.0d-04 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering *:*} & \multicolumn{2}{p{\paraWidth}|}{Any value possible} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{derivs\_order} & {\bf Scope:} private & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Order for derivatives}} \\
\hline{\bf Range} & &  {\bf Default:} 4 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 4} & \multicolumn{2}{p{\paraWidth}|}{4th order stencils} \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 6} & \multicolumn{2}{p{\paraWidth}|}{6th order stencils} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{eps\_r} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Minimal value of radius for eta\_transition}} \\
\hline{\bf Range} & &  {\bf Default:} 1.0d-06 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:*} & \multicolumn{2}{p{\paraWidth}|}{Any value possible} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{eta\_beta} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Damping parameter in live shift}} \\
\hline{\bf Range} & &  {\bf Default:} 1 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:*} & \multicolumn{2}{p{\paraWidth}|}{non-negative} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{eta\_transition} & {\bf Scope:} private & BOOLEAN \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Use an r-dependent eta?}} \\
\hline & & {\bf Default:} no \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{eta\_transition\_r} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Damping parameter in live shift}} \\
\hline{\bf Range} & &  {\bf Default:} 1 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:*} & \multicolumn{2}{p{\paraWidth}|}{non-negative} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{impose\_conf\_fac\_floor\_at\_initial} & {\bf Scope:} private & BOOLEAN \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Use floor value on initial data?}} \\
\hline & & {\bf Default:} no \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{make\_aa\_tracefree} & {\bf Scope:} private & BOOLEAN \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Remove trace of aij after each timestep?}} \\
\hline & & {\bf Default:} yes \\\hline
\end{tabular*}

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

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{n\_alpha} & {\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\_beta} & {\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\_conf\_fac} & {\bf Scope:} private & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em n power of outgoing boundary r\^n fall off rate for conf\_fac}} \\
\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 Gamma\^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\_hij} & {\bf Scope:} private & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em n power of outgoing boundary r\^n fall off rate for h\_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\_trk} & {\bf Scope:} private & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em n power of outgoing boundary r\^n fall off rate for A\_ij}} \\
\hline{\bf Range} & &  {\bf Default:} 2 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:2} & \multicolumn{2}{p{\paraWidth}|}{2 is reasonable} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{precollapsed\_lapse} & {\bf Scope:} private & BOOLEAN \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Initialize lapse as alp*psi\^\{-2\} ?}} \\
\hline & & {\bf Default:} no \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{rescale\_shift\_initial} & {\bf Scope:} private & BOOLEAN \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Initialize shift as psi\^\{-2\} beta ?}} \\
\hline & & {\bf Default:} no \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{reset\_dethh} & {\bf Scope:} private & BOOLEAN \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Reset determinant of conformal metric?}} \\
\hline & & {\bf Default:} no \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{use\_advection\_stencils} & {\bf Scope:} private & BOOLEAN \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Use lop-sided stencils for advection derivs}} \\
\hline & & {\bf Default:} yes \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{z\_is\_radial} & {\bf Scope:} private & BOOLEAN \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em use with multipatch}} \\
\hline & & {\bf Default:} no \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{zeta\_alpha} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Coefficient in front of the ad1\_alpha term in slicing}} \\
\hline{\bf Range} & &  {\bf Default:} 1 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering *:*} & \multicolumn{2}{p{\paraWidth}|}{Anything possible} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{zeta\_beta} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Factor in front of ad1\_beta in the live shift}} \\
\hline{\bf Range} & &  {\bf Default:} 1 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:*} & \multicolumn{2}{p{\paraWidth}|}{non-negative} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{leanbssn\_maxnumconstrainedvars} & {\bf Scope:} restricted & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em The maximum number of constrained variables used by LeanBSSNMoL}} \\
\hline{\bf Range} & &  {\bf Default:} 16 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 16:16} & \multicolumn{2}{p{\paraWidth}|}{metric(6), extrinsic curvature(6), dtlapse(1) and dtshift(3)} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{leanbssn\_maxnumevolvedvars} & {\bf Scope:} restricted & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em The maximum number of evolved variables used by LeanBSSNMoL}} \\
\hline{\bf Range} & &  {\bf Default:} 21 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 21:21} & \multicolumn{2}{p{\paraWidth}|}{lapse (1), shift(3), hmetric (6), hcurv(6), trK (1), conf\_fac(1), Gamma (3)} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{leanbssn\_maxnumsandrvars} & {\bf Scope:} restricted & INT \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em The maximum number of save and restore variables used by LeanBSSNMoL}} \\
\hline{\bf Range} & &  {\bf Default:} (none) \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:0} & \multicolumn{2}{p{\paraWidth}|}{none} \\\hline
\end{tabular*}

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

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

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

\vspace{0.5cm}\parskip = 10pt 

\section{Interfaces} 


\parskip = 0pt

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

\noindent {\bf Implements}: 

leanbssnmol
\vspace{2mm}

\noindent {\bf Inherits}: 

admbase

tmunubase

boundary

coordgauge
\vspace{2mm}
\subsection*{Grid Variables}
\vspace{5mm}\subsubsection{PUBLIC GROUPS}

\vspace{5mm}

\begin{tabular*}{150mm}{|c|c@{\extracolsep{\fill}}|rl|} \hline 
~ {\bf Group Names} ~ & ~ {\bf Variable Names} ~  &{\bf Details} ~ & ~\\ 
\hline 
conf\_fac & conf\_fac & compact & 0 \\ 
 &  & description & conformal factor \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & tensortypealias="Scalar" tensorweight=-0.33333333333333333333 \\ 
 &  & timelevels & 3 \\ 
 &  & variable type & REAL \\ 
\hline 
rhs\_conf\_fac & rhs\_conf\_fac & compact & 0 \\ 
 &  & description & conformal factor \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & tensortypealias="Scalar" tensorweight=-0.33333333333333333333 prolongation="none" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
hmetric &  & compact & 0 \\ 
 & hxx & description & {\textbackslash}tilde gamma\_ij \\ 
 & hxy & dimensions & 3 \\ 
 & hxz & distribution & DEFAULT \\ 
 & hyy & group type & GF \\ 
 & hyz & tags & tensortypealias="DD\_sym" tensorweight=-0.66666666666666666667 \\ 
 & hzz & timelevels & 3 \\ 
 &  & variable type & REAL \\ 
\hline 
rhs\_hmetric &  & compact & 0 \\ 
 & rhs\_hxx & description & {\textbackslash}tilde gamma\_ij \\ 
 & rhs\_hxy & dimensions & 3 \\ 
 & rhs\_hxz & distribution & DEFAULT \\ 
 & rhs\_hyy & group type & GF \\ 
 & rhs\_hyz & tags & tensortypealias="DD\_sym" tensorweight=-0.66666666666666666667 prolongation="none" \\ 
 & rhs\_hzz & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
hcurv &  & compact & 0 \\ 
 & axx & description & {\textbackslash}tilde a\_ij \\ 
 & axy & dimensions & 3 \\ 
 & axz & distribution & DEFAULT \\ 
 & ayy & group type & GF \\ 
 & ayz & tags & tensortypealias="DD\_sym" tensorweight=-0.66666666666666666667 \\ 
 & azz & timelevels & 3 \\ 
 &  & variable type & REAL \\ 
\hline 
rhs\_hcurv &  & compact & 0 \\ 
 & rhs\_axx & description & {\textbackslash}tilde a\_ij \\ 
 & rhs\_axy & dimensions & 3 \\ 
 & rhs\_axz & distribution & DEFAULT \\ 
 & rhs\_ayy & group type & GF \\ 
 & rhs\_ayz & tags & tensortypealias="DD\_sym" tensorweight=-0.66666666666666666667 prolongation="none" \\ 
 & rhs\_azz & 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 
trk &  & compact & 0 \\ 
 & tracek & description & Tr(K) \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & tensortypealias="Scalar" tensorweight=0 \\ 
 &  & timelevels & 3 \\ 
 &  & variable type & REAL \\ 
\hline 
rhs\_trk &  & compact & 0 \\ 
 & rhs\_tracek & description & Tr(K) \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & tensortypealias="Scalar" tensorweight=0 prolongation="none" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
gammat &  & compact & 0 \\ 
 & gammatx & description & {\textbackslash}tilde {\textbackslash}Gamma\^i \\ 
 & gammaty & dimensions & 3 \\ 
 & gammatz & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & tensortypealias="U" tensorweight=0.66666666666666666667 tensorspecial="Gamma" \\ 
 &  & timelevels & 3 \\ 
 &  & variable type & REAL \\ 
\hline 
rhs\_gammat &  & compact & 0 \\ 
 & rhs\_gammatx & description & {\textbackslash}tilde {\textbackslash}Gamma\^i \\ 
 & rhs\_gammaty & dimensions & 3 \\ 
 & rhs\_gammatz & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & tensortypealias="U" tensorweight=0.66666666666666666667 tensorspecial="Gamma" prolongation="none" \\ 
 &  & timelevels & 3 \\ 
 &  & variable type & REAL \\ 
\hline 
rhs\_lapse &  & compact & 0 \\ 
 & rhs\_alp & description & lapse function \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & tensortypealias="Scalar" prolongation="none" \\ 
 &  & timelevels & 1 \\ 
 &  & variable type & REAL \\ 
\hline 
rhs\_shift &  & compact & 0 \\ 
 & rhs\_betax & description & shift vector \\ 
 & rhs\_betay & dimensions & 3 \\ 
 & rhs\_betaz & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & tensortypealias="U" prolongation="none" \\ 
 &  & 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 
ham &  & compact & 0 \\ 
 & hc & description & Hamiltonian constraint \\ 
 &  & dimensions & 3 \\ 
 &  & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & tensortypealias="Scalar" tensorweight=0 \\ 
 &  & timelevels & 3 \\ 
 &  & variable type & REAL \\ 
\hline 
mom &  & compact & 0 \\ 
 & mcx & description & momentum constraints \\ 
 & mcy & dimensions & 3 \\ 
 & mcz & distribution & DEFAULT \\ 
 &  & group type & GF \\ 
 &  & tags & tensortypealias="D" tensorweight=0 \\ 
 &  & timelevels & 3 \\ 
 &  & variable type & REAL \\ 
\hline 
\end{tabular*} 



\vspace{5mm}

\noindent {\bf Uses header}: 

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

\section{Schedule} 


\parskip = 0pt


\noindent This section lists all the variables which are assigned storage by thorn Lean/LeanBSSNMoL.  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 Conditional:} \\ 
~ &  conf\_fac[3] rhs\_conf\_fac[1]\\ 
~ &  hmetric[3] rhs\_hmetric[1]\\ 
~ &  hcurv[3] rhs\_hcurv[1]\\ 
~ &  trk[3] rhs\_trk[1]\\ 
~ &  gammat[3] rhs\_gammat[1]\\ 
~ &  rhs\_lapse[1]\\ 
~ &  rhs\_shift[1]\\ 
~ &  ham[3]\\ 
~ &  mom[3]\\ 
~ & ~\\ 
\end{tabular*} 


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

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

\hspace{5mm} lean\_paramcheck 

\hspace{5mm}{\it check lean parameters for consistency } 


\hspace{5mm}

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


\vspace{5mm}

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

\hspace{5mm} leanbssn\_registerslicing 

\hspace{5mm}{\it register slicing } 


\hspace{5mm}

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


\vspace{5mm}

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

\hspace{5mm} leanbssn\_calc\_bssn\_rhs\_bdry 

\hspace{5mm}{\it mol boundary rhs calculation } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & leanbssn\_calcrhs \\ 
~ & Language:  & fortran \\ 
~ & Type:  & function \\ 
\end{tabular*} 


\vspace{5mm}

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

\hspace{5mm} leanbssn\_calc\_bssn\_rhs\_bdry\_sph 

\hspace{5mm}{\it mol boundary rhs calculation in spherical coordinates } 


\hspace{5mm}

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


\vspace{5mm}

\noindent {\bf MoL\_CalcRHS}   (conditional) 

\hspace{5mm} leanbssn\_calc\_bssn\_rhs\_bdry 

\hspace{5mm}{\it mol boundary rhs calculation } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & leanbssn\_calcrhs \\ 
~ & Language:  & fortran \\ 
~ & Type:  & function \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf MoL\_RHSBoundaries}   (conditional) 

\hspace{5mm} leanbssn\_calc\_bssn\_rhs\_bdry\_sph 

\hspace{5mm}{\it mol boundary rhs calculation in spherical coordinates } 


\hspace{5mm}

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


\vspace{5mm}

\noindent {\bf MoL\_PostStep}   (conditional) 

\hspace{5mm} leanbssn\_reset\_detmetric 

\hspace{5mm}{\it reset dethh = 1 } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & Before:  & leanbssn\_boundaries \\ 
~ & Language:  & fortran \\ 
~ & Type:  & function \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf MoL\_PostStep}   (conditional) 

\hspace{5mm} leanbssn\_remove\_tra 

\hspace{5mm}{\it remove trace of a } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & reset\_detmetric \\ 
~ & Before:  & leanbssn\_boundaries \\ 
~ & Language:  & fortran \\ 
~ & Type:  & function \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf MoL\_PostStep}   (conditional) 

\hspace{5mm} leanbssn\_impose\_conf\_fac\_floor 

\hspace{5mm}{\it make sure conformal factor does not drop below specified value } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & Before:  & leanbssn\_boundaries \\ 
~ & Language:  & fortran \\ 
~ & Type:  & function \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf MoL\_PostStep}   (conditional) 

\hspace{5mm} leanbssn\_boundaries 

\hspace{5mm}{\it mol boundary enforcement } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & Language:  & fortran \\ 
~ & Options:  & level \\ 
~ & Sync:  & admbase::lapse \\ 
~& ~ &admbase::shift\\ 
~& ~ &leanbssnmol::conf\_fac\\ 
~& ~ &leanbssnmol::hmetric\\ 
~& ~ &leanbssnmol::hcurv\\ 
~& ~ &leanbssnmol::trk\\ 
~& ~ &leanbssnmol::gammat\\ 
~ & Type:  & function \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf MoL\_PostStep}   (conditional) 

\hspace{5mm} applybcs 

\hspace{5mm}{\it apply boundary conditions } 


\hspace{5mm}

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


\vspace{5mm}

\noindent {\bf MoL\_PostStep}   (conditional) 

\hspace{5mm} leanbssn\_bssn2adm 

\hspace{5mm}{\it convert variables back to the adm ones } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & leanbssn\_applybcs \\ 
~ & Before:  & admbase\_setadmvars \\ 
~ & Language:  & fortran \\ 
~ & Options:  & local \\ 
~ & Type:  & function \\ 
\end{tabular*} 


\vspace{5mm}

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

\hspace{5mm} leanbssn\_symmetries 

\hspace{5mm}{\it register symmetries of the bssn grid functions } 


\hspace{5mm}

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


\vspace{5mm}

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

\hspace{5mm} leanbssn\_constraints 

\hspace{5mm}{\it compute constraints } 


\hspace{5mm}

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


\vspace{5mm}

\noindent {\bf LeanBSSN\_constraints}   (conditional) 

\hspace{5mm} leanbssn\_bssn\_constraints 

\hspace{5mm}{\it compute constraints } 


\hspace{5mm}

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


\vspace{5mm}

\noindent {\bf LeanBSSN\_constraints}   (conditional) 

\hspace{5mm} leanbssn\_constraints\_boundaries 

\hspace{5mm}{\it enforce symmetry bcs in constraint computation } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & leanbssn\_bssn\_constraints \\ 
~ & Language:  & fortran \\ 
~ & Options:  & level \\ 
~ & Sync:  & leanbssnmol::ham \\ 
~& ~ &leanbssnmol::mom\\ 
~ & Type:  & function \\ 
\end{tabular*} 


\vspace{5mm}

\noindent {\bf LeanBSSN\_constraints}   (conditional) 

\hspace{5mm} applybcs 

\hspace{5mm}{\it apply boundary conditions } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & leanbssn\_constraints\_boundaries \\ 
~ & Type:  & group \\ 
\end{tabular*} 


\vspace{5mm}

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

\hspace{5mm} leanbssn\_zero\_rhs 

\hspace{5mm}{\it set all rhs functions to zero to prevent spurious nans } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & leanbssn\_symmetries \\ 
~ & Language:  & fortran \\ 
~ & Type:  & function \\ 
\end{tabular*} 


\vspace{5mm}

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

\hspace{5mm} leanbssn\_adm2bssn 

\hspace{5mm}{\it convert initial data into bssn variables } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & admbase\_postinitial \\ 
~ & Language:  & fortran \\ 
~ & Options:  & local \\ 
~ & Type:  & function \\ 
\end{tabular*} 


\vspace{5mm}

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

\hspace{5mm} leanbssn\_boundaries 

\hspace{5mm}{\it boundary enforcement } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & After:  & leanbssn\_adm2bssn \\ 
~ & Language:  & fortran \\ 
~ & Options:  & level \\ 
~ & Sync:  & leanbssnmol::gammat \\ 
~ & Type:  & function \\ 
\end{tabular*} 


\vspace{5mm}

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

\hspace{5mm} applybcs 

\hspace{5mm}{\it apply boundary conditions } 


\hspace{5mm}

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


\vspace{5mm}

\noindent {\bf MoL\_Register}   (conditional) 

\hspace{5mm} leanbssn\_registervars 

\hspace{5mm}{\it register variables for mol } 


\hspace{5mm}

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


\vspace{5mm}

\noindent {\bf MoL\_CalcRHS}   (conditional) 

\hspace{5mm} leanbssn\_calc\_bssn\_rhs 

\hspace{5mm}{\it mol rhs calculation } 


\hspace{5mm}

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


\vspace{5mm}

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

\hspace{5mm} leanbssn\_calc\_bssn\_rhs 

\hspace{5mm}{\it mol rhs calculation } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & Before:  & leanbssn\_boundaries \\ 
~ & Language:  & fortran \\ 
~ & Type:  & function \\ 
\end{tabular*} 


\subsection*{Aliased Functions}

\hspace{5mm}

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

{\bf Alias Name:} ~~~~~~~ & {\bf Function Name:} \\ 
ApplyBCs & LeanBSSN\_ApplyBCs \\ 
LeanBSSN\_calc\_bssn\_rhs & LeanBSSN\_CalcRHS \\ 
LeanBSSN\_calc\_bssn\_rhs\_bdry & LeanBSSN\_CalcRHS\_Bdry \\ 
LeanBSSN\_calc\_bssn\_rhs\_bdry\_sph & LeanBSSN\_CalcRHS\_Bdry\_Sph \\ 
\end{tabular*} 



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