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

\title{IDScalarWave}
\author{Gabrielle Allen \\ Horst Beyer}
\date{$ $Date$ $}

\maketitle

% Do not delete next line
% START CACTUS THORNGUIDE

\begin{abstract}
Initial Data for the 3D Scalar Wave Equation
\end{abstract}

\section{Purpose}

This thorn provides different initial data for the 3D scalar wave
equation. 

\section{Spherically Symmetric Solutions}

The general spherically symmetric solution can be written
\begin{equation}
\Psi(r,t) = \frac{1}{r}\left(f(r+t)+g(r-t)\right)
\end{equation}
where the functions $f$ and $g$ can be freely chosen. 

Making the additional requirement of time symmetry at $t=0$, forces
\begin{equation}
f(r)=g(r)
\end{equation}
Thus if the solution at t=0 is given by $\phi(r)$, the general solution
will be
\begin{equation}
\Psi(r,t) = \frac{1}{2r}\left( (r+t)\phi(r+t)+(r-t)\phi(r-t) \right)
\end{equation}

\section{Gaussian}

The gaussian solution is {\it spherically symmetric} about the 
origin of the Cartesian coordinate system, and is {\it time symmetric}.
The initial profile is
\begin{equation}
\phi(r) = A \exp (- r^2/\sigma)
\end{equation}
with the solution at the origin being
\begin{equation}
\Psi(r=0,t) = \left(1-2\frac{t^2}{\sigma}\right)\exp(-t^2/\sigma)
\end{equation}

The Gaussian solution is set with the parameters
\begin{itemize}

\item {\tt amplitude} = $A$

\item {\tt sigma} = $\sigma$

\end{itemize}


% Do not delete next line
% END CACTUS THORNGUIDE



\section{Parameters} 


\parskip = 0pt

\setlength{\tableWidth}{160mm}

\setlength{\paraWidth}{\tableWidth}
\setlength{\descWidth}{\tableWidth}
\settowidth{\maxVarWidth}{initial\_data}

\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}}{amplitude} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em The amplitude of the waves}} \\
\hline{\bf Range} & &  {\bf Default:} 1.0 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering *:*} & \multicolumn{2}{p{\paraWidth}|}{No restriction} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{kx} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em The wave number in the x-direction}} \\
\hline{\bf Range} & &  {\bf Default:} 4.0 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering *:*} & \multicolumn{2}{p{\paraWidth}|}{No restriction} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{ky} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em The wave number in the y-direction}} \\
\hline{\bf Range} & &  {\bf Default:} 0.0 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering *:*} & \multicolumn{2}{p{\paraWidth}|}{No restriction} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{kz} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em The wave number in the z-direction}} \\
\hline{\bf Range} & &  {\bf Default:} 0.0 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering *:*} & \multicolumn{2}{p{\paraWidth}|}{No restriction} \\\hline
\end{tabular*}

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

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{sigma} & {\bf Scope:} private & REAL \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em The sigma for the gaussian wave}} \\
\hline{\bf Range} & &  {\bf Default:} 0.1 \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering 0:*} & \multicolumn{2}{p{\paraWidth}|}{Positive} \\\hline
\end{tabular*}

\vspace{0.5cm}\noindent \begin{tabular*}{\tableWidth}{|c|l@{\extracolsep{\fill}}r|}
\hline
\multicolumn{1}{|p{\maxVarWidth}}{initial\_data} & {\bf Scope:} restricted & KEYWORD \\\hline
\multicolumn{3}{|p{\descWidth}|}{{\bf Description:}   {\em Type of initial data}} \\
\hline{\bf Range} & &  {\bf Default:} gaussian \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering plane} & \multicolumn{2}{p{\paraWidth}|}{Plane wave} \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering gaussian} & \multicolumn{2}{p{\paraWidth}|}{Gaussian wave} \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering box} & \multicolumn{2}{p{\paraWidth}|}{Box wave} \\\multicolumn{1}{|p{\maxVarWidth}|}{\centering none} & \multicolumn{2}{p{\paraWidth}|}{No initial data, zero phi} \\\hline
\end{tabular*}

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

\vspace{0.5cm}\parskip = 10pt 

\section{Interfaces} 


\parskip = 0pt

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

\noindent {\bf Implements}: 

idscalarwave
\vspace{2mm}

\noindent {\bf Inherits}: 

wavetoy

grid
\vspace{2mm}

\vspace{5mm}\parskip = 10pt 

\section{Schedule} 


\parskip = 0pt


\noindent This section lists all the variables which are assigned storage by thorn CactusWave/IDScalarWave.  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\_PARAMCHECK} 

\hspace{5mm} idscalarwave\_checkparameters 

\hspace{5mm}{\it check parameters } 


\hspace{5mm}

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


\vspace{5mm}

\noindent {\bf CCTK\_INITIAL} 

\hspace{5mm} wavetoy\_initialdata 

\hspace{5mm}{\it execute initial data for wavetoy } 


\hspace{5mm}

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


\vspace{5mm}

\noindent {\bf WaveToy\_InitialData} 

\hspace{5mm} idscalarwave\_initialdata 

\hspace{5mm}{\it initial data for 3d wave equation } 


\hspace{5mm}

 \begin{tabular*}{160mm}{cll} 
~ & Language:  & fortran \\ 
~ & Storage:  & wavetoy::scalarevolve[3] \\ 
~ & Type:  & function \\ 
\end{tabular*} 



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