aboutsummaryrefslogtreecommitdiff
path: root/doc/documentation.tex
blob: 676418cf21a256a5c0d7e0e79ceba995a7536c5a (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
% *======================================================================*
%  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]{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}

\begin{document}

% The author of the documentation
\author{Peter Diener \textless diener@cct.lsu.edu\textgreater}

% The title of the document (not necessarily the name of the Thorn)
\title{Summation By Parts}

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

\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}
Calculate first derivates of grid functions using finite difference stencils
that satisfy summation by parts.
\end{abstract}

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

\section{Introduction}
Given a discretization $x_0\ldots x_N$ of a computational domain $x\in[a,b]$
with gridspacing $h$ a one dimensional finite difference operator
approximation to a first derivative, $D$, is said to satisfy summation by
parts (SBP) with respect to a scalar product (defined by its
coefficients $\sigma_{ij}$)
\begin{equation}
\langle u, v\rangle_h = h \sum_{i=0}^{N} u_i v_j \sigma_{ij}
\end{equation}
if the property
\begin{equation}
\langle u, Dv\rangle_h +\langle Du, v\rangle_h = \left . (uv)\right|^b_a
\end{equation}
is satisfied for all possible gridfunctions $u$ and $v$. 

At a given finite difference order, there are several different ways of doing
this depending on the structure of the scalar product. The three commonly
considered cases are the diagonal norm, the restricted full norm and the full
norm (see figure~\ref{fig:norm} for the structure).
\begin{figure}[t]
\[
\sigma = \left ( \begin{array}{cccccc}
           x &   &   &   &   & \\
             & x &   &   &   & \\
             &   & x &   &   & \\
             &   &   & x &   & \\
             &   &   &   & 1 & \\
             &   &   &   &   & \ddots
         \end{array} \right ),\mbox{\hspace{0.2em}}
\sigma = \left ( \begin{array}{ccccccc}
           x &   &   &   &   &   & \\
             & x & x & x & x &   & \\
             & x & x & x & x &   & \\
             & x & x & x & x &   & \\
             & x & x & x & x &   & \\
             &   &   &   &   & 1 & \\
             &   &   &   &   &   & \ddots
        \end{array} \right ),\mbox{\hspace{0.2em}}
\sigma = \left ( \begin{array}{cccccc}
           x & x & x & x &   & \\
           x & x & x & x &   & \\
           x & x & x & x &   & \\
           x & x & x & x &   & \\
             &   &   &   & 1 & \\
             &   &   &   &   & \ddots
        \end{array} \right )
\]
\caption{The structure of the scalar product matrix in the diagonal case
(left), the restricted full case (middle) and the full case (right) for the
4th order interior operators. Only non-zero elements are shown.}
\label{fig:norm}
\end{figure}

In the following we denote the order of accuracy at the boundary by $\tau$, 
the order in the interior by $s$ and the width of the boundary 
region\footnote{The width of the region where standard centered finite
differences are not used.} by $r$.

For the diagonal norm case it turns out that with $r=2\tau$ it is possible
to find SBP operators with $s=2\tau$ (at least when $\tau\le 4$), i.e.\ the
order of accuracy at the boundary is half the order in the interior. For the
restricted full norm case $\tau = s-1$ when $r=\tau +2$ and for the full norm
case $\tau = s-1$ when $r=\tau + 1$.

The operators are named after their norm and their interior and boundary
orders. Thus, for example, we talk about diagonal norm 6-3 operators and
restricted full norm 4-3 operators.

In the diagonal case the 2-1 and 4-3 operators are unique whereas the 6-3
and 8-4 operators have 1 and 3 free parameters, respectively. In the restricted
full norm case the 4-3 operators have 3 free parameters and the 6-5 operators
have 4, while in the full norm case the number of free parameters are 1 less
than the restricted full case.
\section{Numerical Implementation}
Currently this thorn implements only diagonal and restricted full norm SBP
operators. The diagonal norm 2-1, 4-2 and 6-3 and the restricted full norm
4-3 are the ones listed in \cite{strand93} where in the presence of free
parameters the set of parameters giving a minimal bandwidth have been chosen.
For the diagonal norm 8-4 case the minimal bandwidth choice are to restrictive
with respect to the Courant factor and in this case parameters are chosen
so as to maximize the Courant factor\footnote{This is done by choosing
parameters that minimizes the largest eigenvalue of the amplification matrix
for a simple 1D advection equation with a penalty method implementation of
periodic boundary conditions as suggested in \cite{lrt05}.}. In addition the
restricted full norm 6-5 operator has been implemented. This was calculated
using a Mathematica script kindly provided by Jos\'{e} M.
Mart\'{\i}n-Garc\'{\i}a.

\section{Using This Thorn}

\subsection{Obtaining This Thorn}

\subsection{Basic Usage}

\subsection{Special Behaviour}

\subsection{Interaction With Other Thorns}

\subsection{Examples}

\subsection{Support and Feedback}

\section{History}

\subsection{Thorn Source Code}

\subsection{Thorn Documentation}

\subsection{Acknowledgements}


\begin{thebibliography}{9}
\bibitem{strand93} Bo Strand, 1994, Journal of Computational Physics, 110, 47-67
\bibitem{lrt05} Luis Lehner, Oscar Reula and Manuel Tiglio, in preparation.

\end{thebibliography}

% Do not delete next line
% END CACTUS THORNGUIDE

\end{document}