aboutsummaryrefslogtreecommitdiff
path: root/doc/documentation.tex
blob: d2d0d8bf6a62923e68f163113ee76ebe92817f4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
\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}

\title{PUGHInterp}
\author{Paul Walker, Thomas Radke, Erik Schnetter}
\date{$ $Date$ $}

\maketitle

% Do not delete next line
% START CACTUS THORNGUIDE

\begin{abstract}
Thorn PUGHInterp provides interpolation of arrays at arbitrary points.
\end{abstract}

\section{Purpose}
Thorn PUGHInterp implements interpolation operators for CCTK grid
variables (grid functions and arrays distributed over all processors).%%%
\footnote{%%%
	 See the LocalInterp thorn for interpolation
	 of processor-local arrays.
	 }%%%

The interpolation operators are invoked via the flesh interpolation API
{\tt CCTK\_InterpGV()}.  They are registered with the flesh under the
name {\tt "uniform cartesian"} prepended by the interpolation order,
i.e.\ {\tt "second-order uniform cartesian"}).  Currently there are
first, second, and third-order interpolation implemented.

\section{Implementation Notes}
The interpolation operators registered for different orders are mapped
via wrappers (in {\tt Startup.c}) onto a single routine (in {\tt Operator.c})
just passing the order as an additional argument.

The routine for distributed arrays will then map all points to interpolate
at to the processors which own those points, and communicate the points'
coordinates and corresponding input arrays ({\tt MPI\_Alltoall()} is used
for this).

Then the interpolation takes place in parallel on every processor, calling
a core interpolation routine (located in {\tt Interpolate.c}). This one
takes a list of input arrays and points and interpolates these to a
list of output arrays (one output value per interpolation point).
Again, for distributed arrays, the interpolation results for remote points
are sent back to the requesting processors.

\section{Implementation Restrictions}
Current limitations of the core interpolation routine's implementation are:
\begin{itemize}
  \item arrays up to three ({\bf MAXDIM}) dimensions only can be handled
  \item interpolation orders up to three ({\bf MAXORDER}) only are supported
  \item coordinates must be given as {\bf CCTK\_REAL} types
  \item input and output array types must be the same
        (no type casting of interpolation results supported)
\end{itemize}

Despite of these limitations, the code it was programmed almost generic
in that it can easily be extended to support higher-dimensional arrays
or more interpolation orders.  Please see the NOTES in this source file
for details.

\section{Comments}
For more information on how to invoke interpolation operators please refer
to the flesh documentation.

% Do not delete next line
% END CACTUS THORNGUIDE

\end{document}