Skip to content

Commit a183f32

Browse files
committed
Update the path and remove the output
1 parent 613b0ff commit a183f32

8 files changed

+45
-45
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ timetable.pdf: timetable/timetable.tex timetable/content.csv
1616
lectures=$(ls *.tex)
1717

1818
lectures: ${lectures}
19-
git submodule update --init --remote ParallelComputationMathExamples/
19+
git submodule foreach git pull origin main
2020
@for f in $(shell ls *.tex); do name=$$(basename $${f} .tex); latexmk -pdflatex="lualatex --shell-escape %O %S" --jobname=$${name}-slides -pdf $${f}; done
2121
@for f in $(shell ls *.tex); do name=$$(basename $${f} .tex); latexmk -pdflatex="lualatex -shell-escape --synctex=1 %O '\def\classoption{12.pt,handout}\input{%S}'" --jobname=$${name}-handout -pdf $${f}; done
2222
find -maxdepth 1 -name "*.pdf" -exec cp "{}" webpage ";"

ParallelComputationMathExamples

lecture1.tex

+8-8
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,15 @@ \section{Getting started}
152152

153153
\begin{frame}{A small C++ program}
154154

155-
\lstinputlisting{chapter2/lecture1-main.cpp}
155+
\lstinputlisting{cpp/lecture1-main.cpp}
156156

157157
\begin{block}{Compile}
158-
\lstinputlisting[language=bash,firstline=2, lastline=2]{chapter2/lecture1-main.sh}
158+
\lstinputlisting[language=bash,firstline=2, lastline=2]{cpp/lecture1-main.sh}
159159
\end{block}
160160

161161

162162
\begin{block}{Run}
163-
\lstinputlisting[language=bash,firstline=3, lastline=3]{chapter2/lecture1-main.sh}
163+
\lstinputlisting[language=bash,firstline=3, lastline=3]{cpp/lecture1-main.sh}
164164
\end{block}
165165

166166

@@ -169,7 +169,7 @@ \section{Getting started}
169169

170170
\begin{frame}{Structure of a C++ program}
171171

172-
\lstinputlisting{chapter2/lecture1-main.cpp}
172+
\lstinputlisting{cpp/lecture1-main.cpp}
173173

174174
\only<1>{
175175
\begin{block}{Comments~\cite{kernighan1974elements}}
@@ -363,11 +363,11 @@ \section{Working with strings}
363363

364364
\begin{frame}{Reading strings}
365365
\only<1>{
366-
\lstinputlisting{chapter2/lecture1-string-io.cpp}
366+
\lstinputlisting{cpp/lecture1-string-io.cpp}
367367
}
368368
\only<2>{
369-
\lstinputlisting[firstline=3, lastline=3]{chapter2/lecture1-string-io.cpp}
370-
\lstinputlisting[firstline=9, lastline=9]{chapter2/lecture1-string-io.cpp}
369+
\lstinputlisting[firstline=3, lastline=3]{cpp/lecture1-string-io.cpp}
370+
\lstinputlisting[firstline=9, lastline=9]{cpp/lecture1-string-io.cpp}
371371
\begin{block}{Variables: Definition}
372372
\begin{itemize}
373373
\item Variables have a name (name) and a type (\lstinline|std::string|)
@@ -377,7 +377,7 @@ \section{Working with strings}
377377
\end{block}
378378
}
379379
\only<3>{
380-
\lstinputlisting[firstline=10, lastline=10]{chapter2/lecture1-string-io.cpp}
380+
\lstinputlisting[firstline=10, lastline=10]{cpp/lecture1-string-io.cpp}
381381
\begin{block}{Variables: Initialization}
382382
\begin{itemize}
383383
\item Now we initialize the string by reading from \lstinline|std::cin| and assigning the value to it

lecture2.tex

+26-26
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,13 @@ \section{Monte Carlo methods}
195195

196196
\begin{frame}{Random numbers\footnote{\tiny\url{https://en.cppreference.com/w/cpp/numeric/random/srand}}}
197197

198-
\lstinputlisting{chapter2/lecture2-random.cpp}
198+
\lstinputlisting{cpp/lecture2-random.cpp}
199199
More details: Section~3.2~\cite{knuth1997art2} and \cite{matsumoto1998mersenne}
200200
\end{frame}
201201

202202
\begin{frame}{Uniform distributed random numbers\footnote{\tiny\url{https://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution}} \footnote{\tiny\url{https://en.cppreference.com/w/cpp/numeric/random/uniform_real_distribution}}}
203203

204-
\lstinputlisting{chapter2/lecture2-distrandom.cpp}
204+
\lstinputlisting{cpp/lecture2-distrandom.cpp}
205205

206206
\end{frame}
207207

@@ -220,13 +220,13 @@ \section{Monte Carlo methods}
220220
\draw[->] (0,0) -- (1.1*\radius,0);
221221
\draw[->] (0,0) -- (0,1.1*\radius);
222222
\foreach \i in {1,2,...,10}{%
223-
\typeout{Point \i}%
223+
%\typeout{Point \i}%
224224
\pgfmathsetmacro\x{\radius*rnd}%
225-
\typeout{X \x}%
225+
%\typeout{X \x}%
226226
\pgfmathsetmacro\y{\radius*rnd}%
227-
\typeout{Y \y}%
227+
%\typeout{Y \y}%
228228
\pgfmathsetmacro\k{(pow(\x,2)+pow(\y,2)) <pow(\radius,2)}%
229-
\typeout{im Kreis?: \k}%
229+
%\typeout{im Kreis?: \k}%
230230
\pgfmathparse{ifthenelse(\k==1,"awesome","azure")}%
231231
\fill[\pgfmathresult] (\x,\y)circle(0.75pt);%
232232
}
@@ -248,13 +248,13 @@ \section{Monte Carlo methods}
248248
\draw[->] (0,0) -- (1.1*\radius,0);
249249
\draw[->] (0,0) -- (0,1.1*\radius);
250250
\foreach \i in {1,2,...,100}{%
251-
\typeout{Point \i}%
251+
%\typeout{Point \i}%
252252
\pgfmathsetmacro\x{\radius*rnd}%
253-
\typeout{X \x}%
253+
%\typeout{X \x}%
254254
\pgfmathsetmacro\y{\radius*rnd}%
255-
\typeout{Y \y}%
255+
%\typeout{Y \y}%
256256
\pgfmathsetmacro\k{(pow(\x,2)+pow(\y,2)) <pow(\radius,2)}%
257-
\typeout{im Kreis?: \k}%
257+
%\typeout{im Kreis?: \k}%
258258
\pgfmathparse{ifthenelse(\k==1,"awesome","azure")}%
259259
\fill[\pgfmathresult] (\x,\y)circle(0.75pt);%
260260
}
@@ -275,13 +275,13 @@ \section{Monte Carlo methods}
275275
\draw[->] (0,0) -- (1.1*\radius,0);
276276
\draw[->] (0,0) -- (0,1.1*\radius);
277277
\foreach \i in {1,2,...,1000}{%
278-
\typeout{Point \i}%
278+
%\typeout{Point \i}%
279279
\pgfmathsetmacro\x{\radius*rnd}%
280-
\typeout{X \x}%
280+
%\typeout{X \x}%
281281
\pgfmathsetmacro\y{\radius*rnd}%
282-
\typeout{Y \y}%
282+
%\typeout{Y \y}%
283283
\pgfmathsetmacro\k{(pow(\x,2)+pow(\y,2)) <pow(\radius,2)}%
284-
\typeout{im Kreis?: \k}%
284+
%\typeout{im Kreis?: \k}%
285285
\pgfmathparse{ifthenelse(\k==1,"awesome","azure")}%
286286
\fill[\pgfmathresult] (\x,\y)circle(0.75pt);%
287287
}
@@ -305,24 +305,24 @@ \section{Monte Carlo methods}
305305
\def\e{0}
306306
\def\radius{0.5}
307307
\foreach \i in {1,2,...,#1}{%
308-
\typeout{Point \i}%
308+
%\typeout{Point \i}%
309309
\pgfmathsetmacro\x{abs(\radius*rnd)}%
310-
\typeout{X \x}%
310+
%\typeout{X \x}%
311311
\pgfmathsetmacro\y{abs(\radius*rnd)}%
312-
\typeout{Y \y}%
312+
%\typeout{Y \y}%
313313
\pgfmathsetmacro\k{(pow(\x,2)+pow(\y,2)) <pow(\radius,2)}%
314-
\typeout{im Kreis?: \k}%
314+
%\typeout{im Kreis?: \k}%
315315
\pgfmathparse{ifthenelse(\k==1,1,0)}%
316316
\pgfmathparse{\n+\pgfmathresult}
317317
\xdef\n{\pgfmathresult}
318-
\typeout{N \n}
318+
%\typeout{N \n}
319319
}
320320
\pgfmathparse{4*\n/#1}
321321
\xdef\r{\pgfmathresult}
322-
\typeout{R \r}
322+
%\typeout{R \r}
323323
\pgfmathparse{(\r-\pi)/\pi*100}
324324
\xdef\e{abs(\pgfmathresult)}
325-
\typeout{E \e}
325+
%\typeout{E \e}
326326
\addplot [only marks,mark=*] coordinates { (#2,\e) };
327327
}
328328
\begin{frame}{How many random numbers are needed?}
@@ -352,7 +352,7 @@ \section{Containers \& Algorithms}
352352
\begin{frame}{Computation of the average\footnote{\tiny\url{https://en.cppreference.com/w/cpp/io/manip/setprecision}}}
353353

354354

355-
\lstinputlisting{chapter2/lecture2-average.cpp}
355+
\lstinputlisting{cpp/lecture2-average.cpp}
356356

357357
\end{frame}
358358

@@ -363,7 +363,7 @@ \section{Containers \& Algorithms}
363363
\end{block}
364364

365365
\begin{block}{Reading multiple values}
366-
\lstinputlisting[firstline=7, lastline=13]{chapter2/lecture2-average.cpp}
366+
\lstinputlisting[firstline=7, lastline=13]{cpp/lecture2-average.cpp}
367367
\end{block}
368368

369369
Note that the \lstinline|while| loops stops by inserting \lstinline|\\n|
@@ -394,7 +394,7 @@ \section{Containers \& Algorithms}
394394

395395
\begin{frame}{Advanced computing of the average}
396396

397-
\lstinputlisting{chapter2/lecture2-averageContainers.cpp}
397+
\lstinputlisting{cpp/lecture2-averageContainers.cpp}
398398

399399
\end{frame}
400400

@@ -495,7 +495,7 @@ \section{Containers \& Algorithms}
495495

496496
\begin{frame}{Recall: Advanced computing of the average}
497497

498-
\lstinputlisting{chapter2/lecture2-averageContainers.cpp}
498+
\lstinputlisting{cpp/lecture2-averageContainers.cpp}
499499

500500
\end{frame}
501501

@@ -526,7 +526,7 @@ \section{Containers \& Algorithms}
526526

527527
\begin{frame}{Advanced computing of the median}
528528

529-
\lstinputlisting{chapter2/lecture2-median.cpp}
529+
\lstinputlisting{cpp/lecture2-median.cpp}
530530

531531
\end{frame}
532532

lecture20.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ \section{Command line arguments}
293293

294294
\begin{frame}[fragile]{Example}
295295

296-
\lstinputlisting{chapter2/lecture20-argument.cpp}
296+
\lstinputlisting{cpp/lecture20-argument.cpp}
297297

298298
\end{frame}
299299

lecture3.tex

+4-4
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ \section{Lists \lstinline|\#include<list>|}
208208

209209
\begin{frame}{Example lists\footnote{\tiny\url{https://en.cppreference.com/w/cpp/container/list}}}
210210

211-
\lstinputlisting{chapter2/lecture3-averageList.cpp}
211+
\lstinputlisting{cpp/lecture3-averageList.cpp}
212212

213213
\end{frame}
214214

@@ -430,7 +430,7 @@ \section{Library algorithms \lstinline|\#include<algorithm>|}
430430

431431
\begin{frame}{Partition}
432432

433-
\lstinputlisting[firstline=3, lastline=20]{chapter2/lecture3-partition.cpp}
433+
\lstinputlisting[firstline=3, lastline=20]{cpp/lecture3-partition.cpp}
434434

435435
\end{frame}
436436

@@ -440,7 +440,7 @@ \section{Numeric limits \lstinline|\#include<limits>|}
440440

441441
\begin{frame}{Limits}
442442

443-
\lstinputlisting{chapter2/lecture3-limits.cpp}
443+
\lstinputlisting{cpp/lecture3-limits.cpp}
444444

445445
\begin{itemize}
446446
\item \lstinline|::min| returns the smallest finite value of the given type
@@ -452,7 +452,7 @@ \section{Numeric limits \lstinline|\#include<limits>|}
452452

453453
\begin{frame}{Limits\footnote{\tiny\url{https://en.cppreference.com/w/cpp/types/numeric_limits}}}
454454

455-
\lstinputlisting{chapter2/lecture3-limits2.cpp}
455+
\lstinputlisting{cpp/lecture3-limits2.cpp}
456456

457457
\begin{itemize}
458458
\item \lstinline|::round_error| returns the maximum rounding error of the given floating-point type

lecture8.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ \section{Classical continuum mechanics}
126126
\draw [arrow, bend angle=45, bend left] (1.95,1.25) to (5.8,1);
127127
\end{tikzpicture}
128128
\caption[The continuum in the reference configuration $\Omega_0$ and after the deformation $\phi : \Omega_0 \rightarrow \R^3$ in the current configuration $\Omega(t)$ at time $t$.]{The continuum in the reference configuration $\Omega_0$ and after the deformation $\phi : \Omega_0 \rightarrow \R^3$ with $\det(\text{grad}\;\phi) > 0$ in the current configuration $\Omega(t)$ at time $t$.}
129-
\label{fig::chapter2:01}
129+
\label{fig::cpp:01}
130130
\end{figure}
131131

132132
\begin{block}{Prerequisites}
@@ -206,7 +206,7 @@ \section{Peridyanmics}
206206
\draw (-0.5,0.0) circle (2pt);
207207
\end{tikzpicture}
208208
\caption{The continuum in the reference configuration $\Omega_0$ and the interaction zone $B_\delta(X)$ for material point $X$ with the horizon $\delta$.}
209-
\label{fig::chapter2:02}
209+
\label{fig::cpp:02}
210210
\end{figure}
211211

212212
\end{frame}
@@ -218,7 +218,7 @@ \section{Peridyanmics}
218218
\begin{align*}
219219
\rho(X)a(t,X)&:= \\
220220
&\int\limits_{B_\delta(X)} f\left(t,x(t,X')-x(t,X), X'-X\right)dX' + b(t,X)\,\text{,}
221-
\label{eq::chapter2:01}
221+
\label{eq::cpp:01}
222222
\end{align*}
223223
\end{block}
224224
where $f:[0,T]\times\R^3\times\R^3\rightarrow\R^3$ denotes a \index{pair-wise force function}{pair-wise force function}, $\rho(X)$ is the mass density and $b:[0,T]\times\mathbb{R}^3\rightarrow\mathbb{R}^3$ the external force.

template/packages.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@
6464
\usepackage{xfrac}
6565

6666
\usepackage{tikz}
67-
\usepackage{pgfplots}
67+
\usepackage{pgfplots}

0 commit comments

Comments
 (0)