Commit fbbbc4c2 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Add chapter c++ basics

parent 1dacbe89
This diff is collapsed.
......@@ -22,7 +22,7 @@ all: lecture.pdf
# MAIN LATEXMK RULE
lecture.pdf: lecture.tex declarations.tex $(CHAPTER_TEX)
lecture.pdf: lecture.tex declarations.tex cover.tex $(CHAPTER_TEX)
latexmk -pdf -latexoption="--shell-escape" -use-make $<
clean:
......
\begin{tikzpicture}[
background rectangle/.style={fill=red!80!black}, show background rectangle,
xshift=-2cm,
overlay,remember picture]
\node at (current page.center)
{\includegraphics[width=\paperwidth,height=\paperheight]{images/cover}};
% \path[fill=white!50!black] ([yshift=-3cm]current page.west) --
% ([yshift=-10cm]current page.east) --
% (current page.south east) --
% (current page.south west);
% \node[fill=white!80!yellow,fill opacity=0.5,text opacity=1,font=\bfseries\sffamily,align=left,inner sep=8mm,anchor=north] at
% ([yshift=-2cm]current page.north)
\node[xscale=1.8,yscale=2,text opacity=.8,font=\sffamily\normalsize,color=white,anchor=north west,align=left]
(author) at ([yshift=-2.5cm,xshift=2cm]current page.north west)
{Christian Engwer, Simon Praetorius};
\node[xscale=1.8,yscale=2,font=\bfseries\sffamily\LARGE,color=white,anchor=north west,align=left]
(title)
at ([yshift=-1cm]author.south west) {Scientific Programming\\{\Large Advanced Concepts}};
\end{tikzpicture}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "oop-sc"
%%% TeX-command-extra-options: "-shell-escape"
%%% End:
......@@ -8,11 +8,13 @@
\usepackage{xcolor}
\usepackage{paralist}
\usepackage{amsthm} % pushQED, popQED
\usepackage{hyperref}
\usepackage{hyperref}\usepackage{tikz}
\usetikzlibrary{backgrounds}
\usetikzlibrary{matrix,positioning}
\usepackage{qtree}
\usepackage{tabularx}
\usepackage{minted}
\usepackage{lipsum}
%\usepackage{lipsum}
\usepackage{todo}
%\usepackage{dingbat}
\usepackage{mdframed}
......@@ -21,6 +23,7 @@
\usepackage[noend]{algpseudocode}
\usepackage{tcolorbox}
\usepackage[automark]{scrpage2}
\setlength{\parindent}{0pt}
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="cover.svg"
inkscape:version="1.0rc1 (09960d6f05, 2020-04-09)"
id="svg8"
version="1.1"
viewBox="0 0 210 297"
height="297mm"
width="210mm">
<defs
id="defs2">
<linearGradient
id="linearGradient820-3"
inkscape:collect="always">
<stop
id="stop816"
offset="0"
style="stop-color:#969696;stop-opacity:1" />
<stop
style="stop-color:#969696;stop-opacity:1"
offset="0.55072224"
id="stop824" />
<stop
id="stop826"
offset="0.55072224"
style="stop-color:#8c8c8c;stop-opacity:1" />
<stop
style="stop-color:#8c8c8c;stop-opacity:1"
offset="0.79465473"
id="stop828" />
<stop
id="stop830"
offset="0.79465473"
style="stop-color:#828282;stop-opacity:1" />
<stop
id="stop818"
offset="1"
style="stop-color:#828282;stop-opacity:1" />
</linearGradient>
<linearGradient
gradientUnits="userSpaceOnUse"
y2="211.07152"
x2="224.71353"
y1="279.86319"
x1="-13.809151"
id="linearGradient822"
xlink:href="#linearGradient820-3"
inkscape:collect="always" />
</defs>
<sodipodi:namedview
inkscape:document-rotation="0"
inkscape:window-maximized="1"
inkscape:window-y="-3"
inkscape:window-x="0"
inkscape:window-height="1406"
inkscape:window-width="2560"
showgrid="false"
inkscape:current-layer="layer1"
inkscape:document-units="mm"
inkscape:cy="606.81125"
inkscape:cx="444.26524"
inkscape:zoom="0.7"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#d20000"
id="base" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Ebene 1">
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path2090"
d="M 214.45939,68.227426 223.76189,235.38987 78.932651,178.66878 Z"
style="fill:#aa0000;stroke:none;stroke-width:0.26458333;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.30000001;font-variation-settings:normal;opacity:1;vector-effect:none;fill-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000;stop-opacity:1" />
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="rect837"
d="M -13.607142,143.91963 223.76189,235.38987 215.8244,302.66963 -3.779761,300.0238 Z"
style="opacity:1;vector-effect:none;fill:url(#linearGradient822);fill-opacity:1;stroke:#999999;stroke-width:5;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<g
style="fill:#e6e6e6;stroke:#000000;stroke-opacity:0.2"
transform="matrix(2.5035318,-0.39740553,0.39740553,2.5035318,-195.35676,-249.05302)"
id="g2069">
<g
style="fill:#e6e6e6;stroke:#000000;stroke-opacity:0.2"
id="g847"
transform="matrix(0.26458333,0,0,0.26458333,40.438539,137.67858)">
<path
style="fill:#e6e6e6;stroke:#000000;stroke-opacity:0.2"
id="path845"
d="m 153,274.175 c -56.243,0 -102,-45.757 -102,-102 0,-56.243 45.757,-102 102,-102 36.292,0 70.139,19.53 88.331,50.968 l -44.143,25.544 C 188.083,130.951 171.15,121.175 153,121.175 c -28.122,0 -51,22.878 -51,51 0,28.121 22.878,51 51,51 18.152,0 35.085,-9.776 44.191,-25.515 l 44.143,25.543 c -18.192,31.441 -52.04,50.972 -88.334,50.972 z"
fill="#FFFFFF"
inkscape:connector-curvature="0" />
</g>
<g
style="fill:#e6e6e6;stroke:#000000;stroke-opacity:0.2"
id="g851"
transform="matrix(0.26458333,0,0,0.26458333,40.438539,137.67858)">
<polygon
style="fill:#e6e6e6;stroke:#000000;stroke-opacity:0.2"
id="polygon849"
points="255,177.841 255,166.508 243.666,166.508 243.666,155.175 232.334,155.175 232.334,166.508 221,166.508 221,177.841 232.334,177.841 232.334,189.175 243.666,189.175 243.666,177.841 "
fill="#ffffff" />
</g>
<g
style="fill:#e6e6e6;stroke:#000000;stroke-opacity:0.2"
id="g855"
transform="matrix(0.26458333,0,0,0.26458333,40.438539,137.67858)">
<polygon
style="fill:#e6e6e6;stroke:#000000;stroke-opacity:0.2"
id="polygon853"
points="297.5,177.841 297.5,166.508 286.166,166.508 286.166,155.175 274.834,155.175 274.834,166.508 263.5,166.508 263.5,177.841 274.834,177.841 274.834,189.175 286.166,189.175 286.166,177.841 "
fill="#ffffff" />
</g>
</g>
</g>
</svg>
\documentclass[10pt,a4paper]{report}
\usepackage[left=1.5cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\documentclass[10pt,a4paper,
english,
titlepage=firstiscover,
titlepage=true,
%chapterprefix=true,
BCOR=2cm,
DIV=12]{scrbook}
%\usepackage[left=1.5cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\input{declarations}
\author{Dr. Simon Praetorius}
\author{Christian Engwer, Simon Praetorius}
\title{Scientific Programming with C++}
\subtitle{Advanced Concepts}
\addtokomafont{title}{\raggedleft}
\addtokomafont{author}{\setlength{\tabcolsep}{0pt}\raggedleft\sffamily}
\addtokomafont{date}{\raggedleft\sffamily}
%\addtokomafont{publisher}{\raggedleft\sffamily}
\addtokomafont{subject}{\raggedleft\sffamily\color{black!50!white}}
\begin{document}
\extratitle{\input{cover}}
\subject{\textcolor{gray!50}{\rule{12cm}{2mm}}}
\date{\rule{0pt}{13cm}Summer term 2021}
\uppertitleback{
Prof. Dr. Christian Engwer\\
Westfälische Wilhelms-Universität Münster\\
Orleansring 10\\
48149 Münster
\\[2ex]
Dr. Simon Praetorius\\
Technische Universität Dresden\\
Willersbau B219\\
Zellescher Weg 12--14\\
01069 Dresden
}
\lowertitleback{
These lecture notes are based on lectures held at TU Dresden and WWU
Münster.\\[1ex]
It is continuously developed since the initial
lecture in So2014. This is \textit{work in progress} and may contain
typos and errors that need to be corrected in future releases of the
notes.\\[1ex]
You are welcome to submit any correction.}
\maketitle
\begin{abstract}
The focus of this module lies on aspects of software development like programming on high-performance computers,
object-oriented software design, generic (template-based) programming, and the efficient implementation of
numerical algorithms. Additionally experience in analysis, application and extension of software and software
libraries is developed. This module in the winter term especially focuses on software development with the
programming language C++.
\section*{Preface}
The focus of this module lies on aspects of software development like programming on high-performance computers, object-oriented software design, generic (template-based) programming, and the efficient implementation of numerical algorithms. Additionally experience in analysis, application and extension of software and software libraries is developed. This module in the summer term especially focuses on software development with the programming language C++.
Three main learning goals can be formulated:
\begin{enumerate}
\item You know how to program with modern C++, using generic programming and advanced techniques, like meta
programming, expression templates, and concepts.
\item You know how to use programming tools and you can apply these tools to debug, benchmark, and manage your
code. The list of tools include compilers, build systems, version control, debuggers, and profilers.
\item You can read, understand, and utilize (scientific) software libraries, like BLAS (Basic Linear Algebra
Subroutines), LAPACK (Linear Algebra Package), STL (Standard template library), Dune (framework for the
discretization of partial differential equations), MTL4 (Matrix Template Library), Boost (portable C++ library).
\item You know how to program with modern C++, using generic programming and advanced techniques, like meta programming, expression templates, and concepts.
\item You know how to use programming tools and you can apply these tools to debug, benchmark, and manage your code. The list of tools include compilers, build systems, version control, debuggers, and profilers.
\item You can read, understand, and utilize (scientific) software libraries, like BLAS (Basic Linear Algebra Subroutines), LAPACK (Linear Algebra Package), STL (Standard template library), Dune (framework for the discretization of partial differential equations), MTL4 (Matrix Template Library), Boost (portable C++ library).
\end{enumerate}
There are exercises every week to practice the C++ programming. During the semester programming projects in groups
are assigned.
There are exercises every week to practice the C++ programming. During the semester programming projects in groups are assigned. Important parts of the exercises are reviews of C++ code. You will get reviews for your own written code and have to perform reviews of the code of others in the course.
These lecture notes are partially based on a bool manuscript by Peter Gottschling \cite{gottschling2016}, The book
``C++ kurz \& gut'' \cite{loudon2013}, and ``Die C++-Programmiersprache'' \cite{stroustrup2000}. It is continuously
developed since the initial lecture in So2014. This is \textit{work in progress} and may contain typos and errors
that need to be corrected in future releases of the notes. You are welcome to submit any correction.
\end{abstract}
\begin{description}
\item[Prerequisites]
Basic experience with at least one programming language (e.g. Fortran, python, C, Java, ...), No prior knowledge about C++ is required.
Basics knowledge of numerical mathematics.
\item[Target group]
This course is for master and PhD students of Mathematics, Technomathematics, and Mathematics in Business and Economics as well as for students in the masters programs ``Computational Modeling and Simulation'' (CMS) especially for the specialization in Computational Mathematics.
\item[Language]
The course will be taught in English.
\item[Teaching concept]
The lecture will be taught remotely via BigBlueButton, in the (a)synchronous format 2+2 (2h lectures + 2h tutorial). Lectures are recorded, while the tutorials are more interactive and not recorded. There will be weekly exercises. Some of those are marked as homework projects that get reviewed, others are group projects to be worked on during the tutorials. A third type of exercises is peer-review of the code submissions (this will be explained in the tutorial).
\end{description}
\tableofcontents
\input{01_introduction}
%\input{02_basics}
\input{02_basics}
%\input{03_operators}
%\input{04_functions}
%\input{05_references}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment