-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbook.tex
283 lines (200 loc) · 13.9 KB
/
book.tex
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
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
%Book
%Copyright (C) 2019 Patrick Diehl
% 2020 Christoph Larson
%
%This program is free software: you can redistribute it and/or modify
%it under the terms of the GNU General Public License as published by
%the Free Software Foundation, either version 3 of the License, or
%(at your option) any later version.
%This program is distributed in the hope that it will be useful,
%but WITHOUT ANY WARRANTY; without even the implied warranty of
%MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%GNU General Public License for more details.
%You should have received a copy of the GNU General Public License
%along with this program. If not, see <http://www.gnu.org/licenses/>.
% The template of the book is based on the The Legrand Orange Book
% LaTeX Template
% Version 2.4 (26/09/2018)
% Original author:
% Mathias Legrand (legrand.mathias@gmail.com) with modifications by:
% Vel (vel@latextemplates.com)
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\documentclass[11pt,fleqn]{book} % Default font size and left-justified equations
\input{structure.tex} % Insert the commands.tex file which contains the majority of the structure behind the template
\hypersetup{pdftitle={Parallel Computational Mathematics},pdfauthor={Patrick Diehl, PhD}} % Uncomment and fill out to include PDF metadata for the author and title of the book
%----------------------------------------------------------------------------------------
\begin{document}
%----------------------------------------------------------------------------------------
% TITLE PAGE
%----------------------------------------------------------------------------------------
\begingroup
\thispagestyle{empty} % Suppress headers and footers on the title page
\begin{tikzpicture}[remember picture,overlay]
%\node[inner sep=0pt] (background) at (current page.center) {\includegraphics[width=\paperwidth]{background.pdf}};
\draw (current page.center) node [fill=azure!30!white,fill opacity=0.6,text opacity=1,inner sep=1cm]{\Huge\centering\bfseries\sffamily\parbox[c][][t]{\paperwidth}{\centering Parallel Computational Mathematics\\[15pt] % Book title
{\Large Fall \the\year{}}\\[20pt] % Subtitle
{\huge Dr. Patrick Diehl}}}; % Author name
\end{tikzpicture}
\vfill
\endgroup
%----------------------------------------------------------------------------------------
% COPYRIGHT PAGE
%----------------------------------------------------------------------------------------
\newpage
~\vfill
\thispagestyle{empty}
\noindent Copyright \copyright\ \the\year{} Patrick Diehl\orcid{0000-0003-3922-8419}\\ % Copyright notice
%\noindent \textsc{Published by Publisher}\\ % Publisher
\noindent \url{https://www.cct.lsu.edu/~pdiehl/teaching/2021/4997/}\\ % URL
\noindent \doclicenseThis
\noindent \textit{Edition, Fall \the\year{} \tiny{(git commit \input{{.git/refs/heads/main}}})} % Printing/edition date
%----------------------------------------------------------------------------------------
% TABLE OF CONTENTS
%----------------------------------------------------------------------------------------
%\usechapterimagefalse % If you don't want to include a chapter image, use this to toggle images off - it can be enabled later with \usechapterimagetrue
%\chapterimage{chapter_head_1.pdf} % Table of contents heading image
\pagestyle{empty} % Disable headers and footers for the following pages
\tableofcontents % Print the table of contents itself
\cleardoublepage % Forces the first chapter to start on an odd page so it's on the right side of the book
\pagestyle{fancy} % Enable headers and footers again
\chapter*{Forward}
%----------------------------------------------------------------------------------------
\part{Introduction: C++ and the C++ standard template library}
%----------------------------------------------------------------------------------------
\include{chapters/chapter_introduction}
%----------------------------------------------------------------------------------------
\part{HPX}
\label{sec:hpx}
%----------------------------------------------------------------------------------------
\include{chapters/chapter_hpx}
%----------------------------------------------------------------------------------------
\part{Parallel and distributed computing}
%----------------------------------------------------------------------------------------
\include{chapters/chapter_parallel_distributed}
%----------------------------------------------------------------------------------------
\part{Linear algebra and solvers}
%----------------------------------------------------------------------------------------
\include{chapters/chapter_linear_algebra}
%----------------------------------------------------------------------------------------
\part{Numerical examples}
\label{part:numerical:examples}
%----------------------------------------------------------------------------------------
\include{chapters/chapter_numerical_examples}
%----------------------------------------------------------------------------------------
\part{Linked list}
\index{list}
%----------------------------------------------------------------------------------------
\include{chapters/chapter_lists}
%----------------------------------------------------------------------------------------
\part{Appendix}
%----------------------------------------------------------------------------------------
\chapter*{Acknowledgments}
First, I like to thank the Louisiana State University's mathematics department for the opportunity to offer this course to a diverse set of students. Second, I would like to thank Dr. Steven R. Brandt for the support with the C++\ Explorer to use the Jupyter notebooks to teach C++. Third, I would like thank all the students for providing feedback which helped me to improve the course's materials each semester. Lastly, I would like to thank the following students who contributed to this work: Christoph Larson.
%----------------------------------------------------------------------------------------
\chapter*{Jupyter notebooks and GitHub classroom}
\addcontentsline{toc}{chapter}{\textcolor{azure}{Jupyter notebooks and GitHub classroom}}
%----------------------------------------------------------------------------------------
%----------------------------------------------------------------------------------------
\section*{Jupyter notebooks}
%----------------------------------------------------------------------------------------
Some examples for the usage of the Jupyter notebooks are provided here\link{https://github.com/diehlpk/gateways2020} and more details are available here~\cite{diehl2020gateways}.
%----------------------------------------------------------------------------------------
\section*{GitHub classroom}
%----------------------------------------------------------------------------------------
We use GitHub classroom\link{https://classroom.github.com} to submit the assignments. In this section, we go through the steps to submit the code to GitHub using git\link{https://git-scm.com/}. For a brief overview of the most common git commands, we refer to this cheat sheet\link{https://education.github.com/git-cheat-sheet-education.pdf} and for more details to~\cite{silverman2013git,laster2016professional}. The first step to submit the assignments is to get your GitHub\link{https://github.com/} account. We recommend to use a user name reflecting your name. If you want to use your local computer to submit the assignments, you have to install git on your computer to follow the following instructions. Note that git is installed on the course's web server, so we recommend to submit from there. Open a terminal on the course's web server and type \bash{git config --global user.name Surname Name} to set your Surname and Name, so one can see who submitted the assignment. Optional you can set your e-mail address using \bash{git config --global user.email you@provider.com}. \\
If you do not want to enter your password every time to use git, you can generate a ssh key\link{https://www.ssh.com/ssh/key/} as shown in Listing~\ref{git:ssh:key}. We use the command \bash{ssh-keygen} to generate the public and private key. It is common practice that the ssh-key is related to your e-mail address. We save the private key as \texttt{~/.ssh/id-rsa-github} and the public key as \texttt{~/.ssh/id-rsa-github.pub}. To avoid entering the password each time we do a commit to the assignment, we type \bash{ssh-add ~/.ssh/id-rsa-github} to add the key to our key ring. Note that you have to add the content of your public key to GitHub by clicking on Profile -> SSH keys and GPG keys -> New SSH key. \\
\begin{lstlisting}[language=bash,caption={Setting up a ssh key\label{git:ssh:key}},float,floatplacement=tb]
ssh-keygen -t rsa -C "you@provider.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/diehlpk/.ssh/id-rsa): ~/.ssh/id-rsa-github
ssh-add ~/.ssh/id-rsa-github
\end{lstlisting}
For each assignment, you will get an e-mail and should click on the link there, see Figure~\ref{fig::github:invitation}, and accept the assignment, see Figure~\ref{fig::github:assignment}. After accepting the assignment you see a link which will be used to submit your assignment. Listing~\ref{git:push} shows how to submit your code to this assignment. Note that you will get a new invitation for each assignment. First, you use \bash{git clone} to clone the repository and after that you change the directory using the command \bash{cd}. For each file, you like to submit you run the command \bash{git add}. Note that you have to do this only once. Using the command \bash{git commit -a} you commit all files and with the command \bash{git push} you send them to the server, so the instructor can see and grade them.
\begin{figure}[bt]
\centering
\begin{subfigure}{.75\textwidth}
\centering
\includegraphics[width=\textwidth]{images/2019-05-17-github-assingment}
\caption{Invitation for the assignment on GitHub.}
\label{fig::github:invitation}
\end{subfigure}
\begin{subfigure}{.75\textwidth}
\centering
\includegraphics[width=\textwidth]{images/2019-05-17-github-assingment}
\caption{Confirmation of the acceptance and the link to submit your assignment.}
\label{fig::github:assignment}
\end{subfigure}
\caption{Accepting assignments on GitHub classroom.}
\end{figure}
\begin{lstlisting}[language=bash,caption={Setting up a ssh key\label{git:push}},float,floatplacement=tb]
git clone https://github.com/diehlpkteaching/test-diehlpk.git
cd test-diehlpk
touch exercise.cpp
git add exercise.cpp
# Work on your exercise
git commit -a
git push
\end{lstlisting}
\newpage
\printendnotes
%----------------------------------------------------------------------------------------
% BIBLIOGRAPHY
%----------------------------------------------------------------------------------------
\chapter*{Bibliography}
\addcontentsline{toc}{chapter}{\textcolor{azure}{Bibliography}} % Add a Bibliography heading to the table of contents
%------------------------------------------------
\section*{Articles}
\addcontentsline{toc}{section}{Articles}
\printbibliography[heading=bibempty,type=article]
%------------------------------------------------
\section*{Books}
\addcontentsline{toc}{section}{Books}
\printbibliography[heading=bibempty,type=book]
%------------------------------------------------
\section*{In proceedings}
\addcontentsline{toc}{section}{In proceedings}
\printbibliography[heading=bibempty,type=inproceedings]
%----------------------------------------------------------------------------------------
% INDEX
%----------------------------------------------------------------------------------------
\cleardoublepage % Make sure the index starts on an odd (right side) page
\phantomsection
\setlength{\columnsep}{0.75cm} % Space between the 2 columns of the index
\addcontentsline{toc}{chapter}{\textcolor{azure}{Index}} % Add an Index heading to the table of contents
\printindex % Output the index
%----------------------------------------------------------------------------------------
% List of Listings
%----------------------------------------------------------------------------------------
\cleardoublepage % Make sure the index starts on an odd (right side) page
\phantomsection
\addcontentsline{toc}{chapter}{\textcolor{azure}{List of Listings}}
\lstlistoflistings
%----------------------------------------------------------------------------------------
% List of Figures
%----------------------------------------------------------------------------------------
\cleardoublepage % Make sure the index starts on an odd (right side) page
\phantomsection
\addcontentsline{toc}{chapter}{\textcolor{azure}{List of Figures}}
\listoffigures
%----------------------------------------------------------------------------------------
% List of Video lectures
%----------------------------------------------------------------------------------------
\chapter*{List of video lectures}
\addcontentsline{toc}{chapter}{\textcolor{azure}{Video lectures}}
\begin{itemize}
\item \href{https://www.youtube.com/watch?v=asGZTCR53KY&list=PL7vEgTL3FalY2eBxud1wsfz8OKvE9sd_z}{C++ Lecture 1 - The Standard Template Library}
\item \href{https://www.youtube.com/watch?v=iU3wsiJ5mts}{C++ Lecture 2 - Template Programming }
\item \href{https://www.youtube.com/watch?v=6PWUByLZO0g}{C++ Lecture 4 - Template Meta Programming}
\item \href{https://www.youtube.com/watch?v=Vck6kzWjY88}{The C++17 Parallel Algorithms Library and
Beyond}
\item \href{https://youtu.be/5vr7ItjyIH8}{Modern CUDA and C++}
\item \href{https://www.youtube.com/watch?v=Vck6kzWjY88}{The C++17 Parallel Algorithms Library and
Beyond}
\item \href{https://www.youtube.com/watch?v=js-e8xAMd1s}{The Asynchronous C++ Parallel Programming Model}
\item \href{https://www.youtube.com/watch?v=_Uv-_K3KTek&t=32s}{Nonlocality in Peridynamics}
\end{itemize}
\end{document}