\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{Sample (Physical) Boundary Condition}
\author{David Rideout}
\date{$ $Date$ $}

\maketitle

% Do not delete next line
% START CACTUS THORNGUIDE

\begin{abstract}
Provides a simple linear extrapolation boundary condition, to serve as
an example for people who wish to write their own physical boundary conditions.
\end{abstract}


\section{Introduction}

This thorn provides a linear extrapolation boundary condition in three
dimensions.  It is intended as an example for writing physical
boundary conditions.  (See the ThornGuide for
\texttt{CactusBase/Boundary} for details on Cactus boundary
conditions.)  It is registered under the name \texttt{LinearExtrap}.

The code which actually implements the boundary condition is written
in fixed form Fortran 90, in the file \texttt{LinearExtrapBnd.F}.
This code was written by Carsten Gundlach, and is taken directly from
the thorn \texttt{AEIThorns/Exact}.  As such it illustrates a simple
way to properly implement a boundary condition using Fortran code
which was written long before the current boundary implementation
specification.

\section{Obtaining This Thorn}

This thorn is provided within the \texttt{CactusExamples} arrangement,
in the standard Cactus distribution.

\section{Some Details}

The \texttt{LinearExtrap} boundary condition registered by this thorn
only works in three dimensions.  The value on a boundary face is
determined by fitting a straight line through the two points 'inside'
of the boundary point.  For the edges and corners, two points along
the diagonal are used to determine the line.  In this way the thorn
also provides an example of how to handle edges and corners, though
only in a dimension specific way.

\section{Using This Thorn}

To use this thorn, simply activate it in your parameter file, select
some variables for the \texttt{LinearExtrap} boundary condition, and
be sure that \texttt{ApplyBCs} (as e.g. \texttt{MyThorn\_ApplyBCs}) is
scheduled at an appropriate point.

%\section{Numerical Implementation}
%\subsection{Special Behaviour}
%\subsection{Interaction With Other Thorns}
%\subsection{Examples}
%\subsection{Support and Feedback}
%\subsection{Thorn Source Code}
%\subsection{Thorn Documentation}
%\subsection{Acknowledgements}
%\begin{thebibliography}{9}
%\end{thebibliography}
%\section{History}

% Do not delete next line
% END CACTUS THORNGUIDE


% LocalWords:  LinearExtrap LinearExtrapBnd MyThorn

\section{Parameters} 


\parskip = 0pt
\parskip = 10pt 

\section{Interfaces} 


\parskip = 0pt

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

\noindent {\bf Implements}: 

linextrapbnd
\vspace{2mm}

\vspace{5mm}\parskip = 10pt 

\section{Schedule} 


\parskip = 0pt


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

\hspace{5mm} sampleboundary\_registerbcs 

\hspace{5mm}{\it register boundary conditions that this thorn provides } 


\hspace{5mm}

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



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