1 \documentclass[pdf]{prosper}
4 \usepackage[german]{babel}
5 \usepackage[latin1]{inputenc}
6 \usepackage[T1]{fontenc}
12 \graphicspath{{./img/}}
15 \title{introduction to computational physics}
16 \subtitle{basic concepts and approaches}
17 \author{frank zirkelbach}
18 \email{frank.zirkelbach@physik.uni-augsburg.de}
19 \institution{experimantal physics {\footnotesize IV} - university of augsburg}
26 \begin{slide}{outline}
29 \item history of computing hardware/software
31 \item computational techniques
37 \begin{slide}{motivation}
41 \includegraphics[width=8cm]{cp_appl_field.eps}
50 \item precise mathematical theory
51 \item often: solving theory's equations ab-initio is not realistic
52 \item only a few models can be solved exactly
55 $\Rightarrow$ study and implementation of numerical algorithms
60 \begin{slide}{history of computing hardware}
61 \begin{minipage}[t]{10cm}
62 \onlySlide*{1}{\begin{center} \includegraphics[height=3cm]{abacus.eps} \end{center}}
63 \onlySlide*{2}{\begin{center} \includegraphics[height=3cm]{eniac.eps} \hspace{1cm} \includegraphics[height=3cm]{tube.eps} \end{center}}
64 \onlySlide*{3}{\begin{center} \includegraphics[height=3cm]{z1.eps} \end{center}}
65 \onlySlide*{4}{\begin{center} \includegraphics[height=3cm]{pdp1.eps} \hspace{1pt} \includegraphics[height=3cm]{transistor.eps} \end{center}}
66 \onlySlide*{5}{\begin{center} \includegraphics[height=3cm]{pdp8.eps} \hspace{1cm} \includegraphics[height=3cm]{ic.eps} \end{center}}
67 %\FromSlide{6}{\begin{center} \includegraphics[height=3cm]{} \end{center}}
69 \begin{minipage}[b]{10cm}
71 \item $3000 \, bc$: abacus - first calculating device
72 \item $1945$: eniac - electrical digital computer
73 \item $1938/41$: z1/3 - featuring memory and programmability
74 \item $1960$: pdp-1 - transistor based computers
75 \item $1964$: pdp-8 - integrated circuit computers
81 \begin{slide}{history of computing hardware}
82 \begin{minipage}[t]{10cm}
83 \onlySlide*{1}{\begin{center} \includegraphics[height=3cm]{4004.eps} \end{center}}
84 \onlySlide*{2}{\begin{center} \includegraphics[height=3cm]{cray2.eps} \hspace{1pt} \includegraphics[height=3cm]{cray2_i.eps} \end{center}}
85 \onlySlide*{3}{\begin{center} \includegraphics[height=3cm]{apple2.eps} \includegraphics[height=3cm]{c64.eps} \end{center}}
86 \onlySlide*{4}{\begin{center} \includegraphics[height=3cm]{intel1.eps} \includegraphics[height=3cm]{intel2.eps} \end{center}}
87 \onlySlide*{5}{\begin{center} \includegraphics[height=3cm]{mips.eps} \hspace{1pt} \includegraphics[height=3cm]{ppc.eps} \end{center}}
88 \onlySlide*{6}{\begin{center} \includegraphics[height=3cm]{cluster1.eps} \hspace{1cm} \includegraphics[height=3cm]{cluster2.eps} \end{center}}
90 \begin{minipage}[b]{10cm}
92 \item $1970$: intel 4004 - first single chip $\mu$-processor
93 \item $1977/85$: cray1/2 - vector supercomputer
94 \item $1977/82/85$: 6502/6510/m68k - first pc
95 \item $1978/82/85 $: 8086/80286/80386
96 \item $1985$: mips - first risc design
97 \item $1990/2000$: massive parallel computing
103 \begin{slide}{history of computing software}
105 \item $1946$: plankalk"ul - high-level programming language
106 \item $1950$: assembler - translating instruction mnemonics
107 \item $1954$: fortran - {\scriptsize formula translation}
108 \item $1963$: basic - {\scriptsize beginner's all purpose symbolic instruction code}
109 \item $1964$: os/360 - batch processing operating system
110 \item $1969$: unix - multics port to pdp-8, pdp-11/20
111 \item $1972$: c programming language - thompson, ritchie
112 \item $1978/84/85$: apple os/atari, amiga os/mac os
113 \item $1981/85/92/95$: ms-dos/windows 1.0/3.x/95
114 \item $1983$: gnu project - unix-like free software development
115 \item $1991$: linux - open-source kernel
120 \begin{slide}{warning - machine accuracy $\epsilon_m$}
122 \item numerical precision of 64-bit floating point \\
123 ieee floating point format: $v = -1^s 2^{-e} m$
126 s: & \textrm{signe} & \textrm{1 bit} \\
127 m: & \textrm{mantissa} & \textrm{52 bit} \\
128 e: & \textrm{exponent} & \textrm{11 bit} \\
131 \item $\epsilon_m$: smallest floating point with $1 + \epsilon_m \neq 1$ \\
132 $\epsilon_m \approx 2 \times 10^{-18}$ \hspace{2pt} (roundoff error)
133 \item $N$ arithmetic operations $\Rightarrow$ error of order $N \epsilon_m$
134 \item subtraction of very nearly equal numbers\\
135 (difference in few significant low-order bits)
140 \begin{slide}{warning - truncation error}
142 \item discrete approximation of continuous quantity
143 \item truncation error $\equiv$ discrepancy between true answer and practical calculation
144 \item persists even on hypothetical perfect computer ($\epsilon_m = 0$)
145 \item machine independent, characteristic of used algorithm
146 \item numerical analysis: minimizing truncation error
147 \item unstable method: roundoff error interacting at early stage
152 \begin{slide}{warning - recursive functions}
154 \item avoid recursive functions!
155 \verbatiminput{fak1.c}
157 \verbatiminput{fak2.c}
161 \begin{slide}{computational techniques}
162 techniques discussed in the talk:
164 \item rough discretization
165 \item solution of linear algebraic equations
166 \item interpolation and extrapolation
167 \item integration of functions
168 %\item evaluation of (special) functions
169 \item monte carlo methods
171 \item spectral applications
172 %\item modeling of data
173 %\item ordinary differential equations
174 %\item two point boundary value problems
175 %\item partial differential equations
179 \begin{slide}{computational techniques}
180 techniques \textcolor{red}{not yet} discussed in the talk:\footnote{if time is available this will be completed. updates at:\\http://www.physik.uni-augsburg.de/\~{}zirkelfr/download/cp/cp.pdf\\read more at: http://www.nr.com}
182 %\item rough discretization
183 %\item solution of linear algebraic equations
184 %\item interpolation and extrapolation
185 %\item integration of functions
186 \item evaluation of (special) functions
187 %\item monte carlo methods
189 %\item spectral applications
190 \item modeling of data
191 \item ordinary differential equations
192 \item two point boundary value problems
193 \item partial differential equations
199 \begin{slide}{rough discretization}
201 \item example: homogenous field of force $\vec{F} = (0,-mg)$ \\
203 equation of motion: & $\vec{F} = m \vec{a} = m \frac{d^2 \vec{r}}{dt^2}$ \\
204 initial condition: & $\vec{r}(t=0) = \vec{r_0} = (x_0,y_0)$ \\
205 & $\frac{d \vec{r}}{dt}|_{t=0} = (v_{x_0},v_{y_0})$ \\
207 \item algorithm using discretized time ($T_{total} = N \tau$):
209 $x^1 = x_0;$ & $y^1 = y_0;$ & \\
210 $v^1_x = v_{x_0};$ & $v^1_y = v_{y_0};$ & \\
211 loop: & $x^2 = x^1 + \tau v^1_x;$ & $y^2 = y^1 + \tau v^1_y;$ \\
212 & $v^2_x = v^1_x;$ & $v^2_y = v^1_y + (-mg) \tau;$ \\
213 & $x^1 = x^2;$ & $y^1 = y^2$ \\
214 & $v^1_x = v^2_x;$ & $v^1_y = v^2_y;$ \\