% *======================================================================*
%  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
%       % BEGIN CACTUS THORNGUIDE",
%     except for filling in the title, author, date etc. fields.
%   - You can define your own macros are OK, but they must appear after
%     the BEGIN 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.  
%   - 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]{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/ThornGuide/cactus}

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% The author of the documentation
\author{Thomas Radke} 

% The title of the document (not necessarily the name of the Thorn)
\title{Thorn Guide for the {\bf LocalInterp} Thorn}

% the date your document was last changed, if your document is in CVS, 
% please us:
%    \date{$ $Date$ $}
\date{$ $Date$ $}

\maketitle

% Do not delete next line
% START CACTUS THORNGUIDE

% Add all definitions used in this documentation here 
%   \def\mydef etc
\setlength{\unitlength}{1mm}	% length unit for latex picture environment
\def\csmash#1{\hbox to 0em{\hss{#1}\hss}}

\def\defn#1{{\bf #1}}
\def\thorn#1{{\bf #1}}

\def\Cplusplus{\hbox{C\hspace{-.05em}\raisebox{.4ex}{\tiny\bf ++}}}
\def\cf{cf.\hbox{}}
\def\Ie{I.e.\hbox{}}
\def\ie{i.e.\hbox{}}
\def\eg{e.g.\hbox{}}

% Add an abstract for this thorn's documentation
\begin{abstract}
This thorn does processor-local interpolation of N-dimensional data
arrays.  In general there may be many input arrays (all defined on the
same uniform Cartesian grid) all being interpolated to the same set
of interpolation points.  At present this thorn only supports the
\verb|CCTK_InterpLocal()| API, but in the near future it will probably be
enhanced to support the newer \verb|CCTK_InterpLocalUniform()| API.
\end{abstract}

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Introduction}

This thorn provides processor-local interpolation, using the interpolation
operators
\begin{verbatim}
  "first-order uniform cartesian"
  "second-order uniform cartesian"
  "third-order uniform cartesian"
\end{verbatim}

It supports 1, 2, and 3-dimensional interpolation.
At present this thorn only supports the \verb|CCTK_InterpLocal()| API,
but in the near future it will probably be enhanced to support the
newer \verb|CCTK_InterpLocalUniform()| API.

Although the \verb|CCTK_InterpLocal()| API supports both uniform
and nonuniform grids for the input data, the present implementation
assumes a uniform grid (and silently gives wrong results for a
nonuniform grid).

See the Cactus User's Guide ``Full Description of Functions''
appendix for a full description of the \verb|CCTK_InterpLocal()|
API, and some examples of how to use it.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{History}

This interpolator was written by Thomas Radke in early 2001 (drawing
on older code by Paul Walker).  It originally lived in the PUGHInterp
thorn, but it turned to have very little to do with PUGH, so was moved
here in winter 2001-2002.

From winter 2001-2002 to July 2003 this thorn also contained another
interpolator written by Jonathan Thornburg, but in July~2003 that
interpolator was moved to {\bf AEIThorns/AEILocalInterp/} because it
was (is) GPL and Cactus policies forbids GPL code in this arrangement.

Because CVS can't delete directories, this thorn still contains a lot
of empty-except-for-CVS-directories directory trees left over from
Jonathan Thornburg's interpolator.  You can/should ignore these.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Implementation}

Internally, this interpolator always does 3-D interpolation, inserting
zero coordinates as appropriate for lower dimensionalities.  The
interpolation is done by successive 1-D interpolations along each
axis.%%%
\footnote{%%%
	 Note that this means that different axes are treated
	 slightly differently by the interpolator.  In other
	 words, at the level of finite differencing errors,
	 interpolation does {\em not\/} commute with permuting
	 the axes.  However, in practice the differences are
	 likely to be small, at least for smooth input data.
	 }%%%
{}  See the \verb|README| file in the source code directory
\verb|LocalInterp/src/UniformCartesian/| for further details.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Do not delete next line
% END CACTUS THORNGUIDE

\end{document}
