Newer
Older
%%% DOCUMENTCLASS
%%%-------------------------------------------------------------------------------
\documentclass[
a4paper, % Stock and paper size.
11pt, % Type size.
% article,
% oneside,
onecolumn, % Only one column of text on a page.
% openright, % Each chapter will start on a recto page.
% openleft, % Each chapter will start on a verso page.
openany, % A chapter may start on either a recto or verso page.
]{memoir}
%%% PACKAGES
%%%------------------------------------------------------------------------------
\usepackage[utf8]{inputenc} % If utf8 encoding
% \usepackage[lantin1]{inputenc} % If not utf8 encoding, then this is probably the way to go
\usepackage[T1]{fontenc} %
\usepackage{lmodern}
\usepackage[english]{babel} % English please
\usepackage[final]{microtype} % Less badboxes
% \usepackage{kpfonts} %Font
\usepackage{amsmath,amssymb,mathtools} % Math
\usepackage{pifont}% http://ctan.org/pkg/pifont
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{\ding{55}}%
\usepackage{graphicx} % Include figures
\usepackage{makeidx}
%%% PAGE LAYOUT
%%%-----------------------------------------------------------------------------
\setlrmarginsandblock{0.15\paperwidth}{*}{1} % Left and right margin
\setulmarginsandblock{0.2\paperwidth}{*}{1} % Upper and lower margin
\checkandfixthelayout
\newlength\forceindent
\setlength{\forceindent}{\parindent}
\setlength{\parindent}{0cm}
\renewcommand{\indent}{\hspace*{\forceindent}}
\setlength{\parskip}{1em}
%%% SECTIONAL DIVISIONS
%%%------------------------------------------------------------------------------
\maxsecnumdepth{paragraph} % Subsections (and higher) are numbered
\setsecnumdepth{paragraph}
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
\makeatletter %
\makechapterstyle{standard}{
\setlength{\beforechapskip}{0\baselineskip}
\setlength{\midchapskip}{1\baselineskip}
\setlength{\afterchapskip}{8\baselineskip}
\renewcommand{\chapterheadstart}{\vspace*{\beforechapskip}}
\renewcommand{\chapnamefont}{\centering\normalfont\Large}
\renewcommand{\printchaptername}{\chapnamefont \@chapapp}
\renewcommand{\chapternamenum}{\space}
\renewcommand{\chapnumfont}{\normalfont\Large}
\renewcommand{\printchapternum}{\chapnumfont \thechapter}
\renewcommand{\afterchapternum}{\par\nobreak\vskip \midchapskip}
\renewcommand{\printchapternonum}{\vspace*{\midchapskip}\vspace*{5mm}}
\renewcommand{\chaptitlefont}{\centering\bfseries\LARGE}
% \renewcommand{\printchaptertitle}[1]{\chaptitlefont ##1}
\renewcommand{\afterchaptertitle}{\par\nobreak\vskip \afterchapskip}
}
\makeatother
%\chapterstyle{standard}
\chapterstyle{madsen}
\setsecheadstyle{\normalfont\large\bfseries}
\setsubsecheadstyle{\normalfont\normalsize\bfseries}
\setparaheadstyle{\normalfont\normalsize\bfseries}
\setparaindent{0pt}\setafterparaskip{0pt}
%%% FLOATS AND CAPTIONS
%%%------------------------------------------------------------------------------
\makeatletter % You do not need to write [htpb] all the time
\renewcommand\fps@figure{htbp} %
\renewcommand\fps@table{htbp} %
\makeatother %
\captiondelim{\space } % A space between caption name and text
\captionnamefont{\small\bfseries} % Font of the caption name
\captiontitlefont{\small\normalfont} % Font of the caption text
\changecaptionwidth % Change the width of the caption
\captionwidth{1\textwidth} %
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
%%% ABSTRACT
%%%------------------------------------------------------------------------------
\renewcommand{\abstractnamefont}{\normalfont\small\bfseries} % Font of abstract title
\setlength{\absleftindent}{0.1\textwidth} % Width of abstract
\setlength{\absrightindent}{\absleftindent}
%%% HEADER AND FOOTER
%%%------------------------------------------------------------------------------
\makepagestyle{standard} % Make standard pagestyle
\makeatletter % Define standard pagestyle
\makeevenfoot{standard}{}{}{} %
\makeoddfoot{standard}{}{}{} %
\makeevenhead{standard}{\bfseries\thepage\normalfont\qquad\small\leftmark}{}{}
\makeoddhead{standard}{}{}{\small\rightmark\qquad\bfseries\thepage}
% \makeheadrule{standard}{\textwidth}{\normalrulethickness}
\makeatother %
\makeatletter
\makepsmarks{standard}{
\createmark{chapter}{both}{shownumber}{\@chapapp\ }{ \quad }
\createmark{section}{right}{shownumber}{}{ \quad }
\createplainmark{toc}{both}{\contentsname}
\createplainmark{lof}{both}{\listfigurename}
\createplainmark{lot}{both}{\listtablename}
\createplainmark{bib}{both}{\bibname}
\createplainmark{index}{both}{\indexname}
\createplainmark{glossary}{both}{\glossaryname}
}
\makeatother %
\makepagestyle{chap} % Make new chapter pagestyle
\makeatletter
\makeevenfoot{chap}{}{\small\bfseries\thepage}{} % Define new chapter pagestyle
\makeoddfoot{chap}{}{\small\bfseries\thepage}{} %
\makeevenhead{chap}{}{}{} %
\makeoddhead{chap}{}{}{} %
% \makeheadrule{chap}{\textwidth}{\normalrulethickness}
\makeatother
\nouppercaseheads
\pagestyle{standard} % Choosing pagestyle and chapter pagestyle
\aliaspagestyle{chapter}{chap} %
%%% NEW COMMANDS
%%%-----------------------------------------------------------------------------
% Nektar++ version
\usepackage{xspace}
\newcommand{\nekver} {\input{VERSION}\unskip}
\newcommand{\p}{\partial} %Partial
% Or what ever you want
%%% CODE SNIPPETS, COMMANDS, ETC
%%%-----------------------------------------------------------------------------
\usepackage{xcolor}
\usepackage{listings} % Display code / shell commands
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
%\newcommand{\shellcommand}[1]{\begin{lstlisting} \#1 \end{lstlisting}
\lstdefinestyle{BashInputStyle}{
language=bash,
basicstyle=\small\sffamily,
% numbers=left,
% numberstyle=\tiny,
% numbersep=3pt,
frame=,
columns=fullflexible,
backgroundcolor=\color{black!05},
linewidth=0.9\linewidth,
xleftmargin=0.1\linewidth
}
\definecolor{gray}{rgb}{0.4,0.4,0.4}
\definecolor{darkblue}{rgb}{0.0,0.0,0.6}
\definecolor{cyan}{rgb}{0.0,0.6,0.6}
\definecolor{maroon}{rgb}{0.5,0.0,0.0}
\lstdefinelanguage{XML}
{
basicstyle=\ttfamily\footnotesize,
morestring=[b]",
moredelim=[s][\bfseries\color{maroon}]{<}{\ },
moredelim=[s][\bfseries\color{maroon}]{</}{>},
moredelim=[l][\bfseries\color{maroon}]{/>},
moredelim=[l][\bfseries\color{maroon}]{>},
morecomment=[s]{<?}{?>},
morecomment=[s]{<!--}{-->},
commentstyle=\color{gray},
stringstyle=\color{orange},
identifierstyle=\color{darkblue}
}
\lstdefinestyle{XMLStyle}{
language=XML,
basicstyle=\sffamily\footnotesize,
numbers=left,
numberstyle=\tiny,
numbersep=3pt,
frame=,
columns=fullflexible,
backgroundcolor=\color{black!05},
linewidth=0.9\linewidth,
xleftmargin=0.1\linewidth
}
\lstdefinestyle{C++Style}{
language=C++,
basicstyle=\sffamily\footnotesize,
numbers=left,
numberstyle=\tiny,
numbersep=3pt,
frame=,
columns=fullflexible,
backgroundcolor=\color{black!05},
linewidth=0.9\linewidth,
xleftmargin=0.1\linewidth,
showspaces=false,
showstringspaces=false
\ifdefined\HCode
\newcommand{\inltt}[1]{\texttt{#1}}
\newcommand{\inlsh}[1]{\texttt{#1}}
\else
\newcommand{\inltt}[1]{\tikz[anchor=base,baseline]\node[inner sep=3pt,
rounded corners,outer sep=0,draw=black!30,fill=black!05]{\small\texttt{#1}};}
\newcommand{\inlsh}[1]{\tikz[anchor=base,baseline]\node[inner sep=2pt,
outer sep=0,fill=black!05]{\texttt{#1}};}
\newcommand{\nekpp}{{\em Nektar++}\xspace}
% Highlight box
\usepackage{environ}
\usepackage[tikz]{bclogo}
\usetikzlibrary{calc}
% Only use fancy boxes for PDF
\ifdefined\HCode
\NewEnviron{notebox}{\textbf{Note:} \BODY}
\NewEnviron{warningbox}{\textbf{Warning:} \BODY}
\NewEnviron{tipbox}{\textbf{Tip:} \BODY}
\NewEnviron{custombox}[3]{\textbf{#1} \BODY}
\else
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
\NewEnviron{notebox}
{\par\medskip\noindent
\begin{tikzpicture}
\node[inner sep=5pt,fill=black!10,draw=black!30] (box)
{\parbox[t]{.99\linewidth}{%
\begin{minipage}{.1\linewidth}
\centering\tikz[scale=1]\node[scale=1.5]{\bcinfo};
\end{minipage}%
\begin{minipage}{.9\linewidth}
\textbf{Note}\par\smallskip
\BODY
\end{minipage}\hfill}%
};
\end{tikzpicture}\par\medskip%
}
\NewEnviron{warningbox}
{\par\medskip\noindent
\begin{tikzpicture}
\node[inner sep=5pt,fill=red!10,draw=black!30] (box)
{\parbox[t]{.99\linewidth}{%
\begin{minipage}{.1\linewidth}
\centering\tikz[scale=1]\node[scale=1.5]{\bcdanger};
\end{minipage}%
\begin{minipage}{.9\linewidth}
\textbf{Warning}\par\smallskip
\BODY
\end{minipage}\hfill}%
};
\end{tikzpicture}\par\medskip%
}
\NewEnviron{tipbox}
{\par\medskip\noindent
\begin{tikzpicture}
\node[inner sep=5pt,fill=green!10,draw=black!30] (box)
{\parbox[t]{.99\linewidth}{%
\begin{minipage}{.1\linewidth}
\centering\tikz[scale=1]\node[scale=1.5]{\bclampe};
\end{minipage}%
\begin{minipage}{.9\linewidth}
\textbf{Tip}\par\smallskip
\BODY
\end{minipage}\hfill}%
};
\end{tikzpicture}\par\medskip%
}
\NewEnviron{custombox}[3]
{\par\medskip\noindent
\begin{tikzpicture}
\node[inner sep=5pt,fill=#3!10,draw=black!30] (box)
{\parbox[t]{.99\linewidth}{%
\begin{minipage}{.1\linewidth}
\centering\tikz[scale=1]\node[scale=1.5]{#2};
\end{minipage}%
\begin{minipage}{.9\linewidth}
\textbf{#1}\par\smallskip
\BODY
\end{minipage}\hfill}%
};
\end{tikzpicture}\par\medskip%
}
%%% TABLE OF CONTENTS AND INDEX
%%%-----------------------------------------------------------------------------
\maxtocdepth{subsection} % Only parts, chapters and sections in the table of contents
\settocdepth{subsection}
\makeindex
%\AtEndDocument{\addtocontents{toc}{\par}} % Add a \par to the end of the TOC
%%% INTERNAL HYPERLINKS
%%%-----------------------------------------------------------------------------
\usepackage[linktoc=all,hyperfootnotes=false]{hyperref} % Internal hyperlinks
\hypersetup{
colorlinks,
citecolor=darkblue,
filecolor=darkblue,
linkcolor=darkblue,
urlcolor=darkblue,
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
pdfborder={0 0 0}, % No borders around internal hyperlinks
pdfauthor={I am the Author} % author
}
\usepackage{memhfixc} %
%%% PRETTY TITLE PAGE FOR PDF DOC
%%%-----------------------------------------------------------------------------
\makeatletter
\newlength\drop
\newcommand{\br}{\hfill\break}
\newcommand*{\titlepage}{%
\thispagestyle{empty}
\begingroup% Gentle Madness
\drop = 0.1\textheight
\vspace*{\baselineskip}
\vfill
\hbox{%
\hspace*{0.1\textwidth}%
\rule{1pt}{\dimexpr\textheight-28pt\relax}%
\hspace*{0.05\textwidth}%
\parbox[b]{0.85\textwidth}{%
\vbox{%
\vspace{\drop}
{\Huge\bfseries\raggedright\@title\par}
\vskip2.37\baselineskip
\vskip4\baselineskip
{\huge\bfseries \textcolor{darkblue}{Developer Guide}\par}
\vskip1.0\baselineskip
{\large\bfseries\@date\par}
\vspace{0.3\textheight}
{\small\noindent\@author}\\[\baselineskip]
}% end of vbox
}% end of parbox
}% end of hbox
\vfill
\null
\endgroup}
\makeatother
%%% THE DOCUMENT
%%% Where all the important stuff is included!
%%%-------------------------------------------------------------------------------
\author{Department of Aeronautics, Imperial College London, UK\newline
Scientific Computing and Imaging Institute, University of Utah, USA}
\title{Nektar++: Spectral/hp Element Framework}
\date{\today}
\begin{document}
\frontmatter
% Render pretty title page if not building HTML
\ifdefined\HCode
\maketitle
\begin{center}
\huge{Developers Guide - Version \nekver}
\end{center}
\else
\titlepage
\fi
\clearpage
\ifx\HCode\undefined
\tableofcontents*
\fi
\clearpage
\chapter{Introduction}
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
Nektar++ \cite{CaMoCoBoRo15} is a tensor product based finite element package
designed to allow one to construct efficient classical low polynomial order
$h$-type solvers (where $h$ is the size of the finite element) as well as higher
$p$-order piecewise polynomial order solvers. The framework currently has the
following capabilities:
\begin{itemize}
\item Representation of one, two and three-dimensional fields as a collection of
piecewise continuous or discontinuous polynomial domains.
\item Segment, plane and volume domains are permissible, as well as domains
representing curves and surfaces (dimensionally-embedded domains).
\item Hybrid shaped elements, i.e triangles and quadrilaterals or tetrahedra,
prisms and hexahedra.
\item Both hierarchical and nodal expansion bases.
\item Continuous or discontinuous Galerkin operators.
\item Cross platform support for Linux, Mac OS X and Windows.
\end{itemize}
The framework comes with a number of solvers and also allows one to construct a
variety of new solvers.
Our current goals are to develop:
\begin{itemize}
\item Automatic auto-tuning of optimal operator implementations based upon not
only $h$ and $p$ but also hardware considerations and mesh connectivity.
\item Temporal and spatial adaption.
\item Features enabling evaluation of high-order meshing techniques.
\end{itemize}
This document provides implementation details for the design of the libraries,
Nektar++-specific data structures and algorithms and other development
information.
\begin{warningbox}
This document is still under development and may be incomplete in parts.
\end{warningbox}
For further information and to download the software, visit the Nektar++ website
at \url{http://www.nektar.info}.
\mainmatter
\import{core-concepts/}{core-concepts.tex}
\import{library-design/}{library-design.tex}
\import{data-structures-algorithms/}{data-structures-algorithms.tex}
\import{coding-standard/}{coding-standard.tex}
%\appendix
\backmatter
%%% BIBLIOGRAPHY
%%% -------------------------------------------------------------
\bibliographystyle{plain}
\bibliography{../refs}
\printindex
\end{document}