diff --git a/Lectures_my/MC_2016/Lecture10/mchrzasz.aux b/Lectures_my/MC_2016/Lecture10/mchrzasz.aux index fd25708..2fc5bfa 100644 --- a/Lectures_my/MC_2016/Lecture10/mchrzasz.aux +++ b/Lectures_my/MC_2016/Lecture10/mchrzasz.aux @@ -136,8 +136,26 @@ \@writefile{nav}{\headcommand {\beamer@framepages {18}{18}}} \pgfsyspdfmark {pgfid63}{0}{0} \pgfsyspdfmark {pgfid64}{0}{0} -\@writefile{nav}{\headcommand {\beamer@partpages {1}{18}}} -\@writefile{nav}{\headcommand {\beamer@subsectionpages {1}{18}}} -\@writefile{nav}{\headcommand {\beamer@sectionpages {1}{18}}} -\@writefile{nav}{\headcommand {\beamer@documentpages {18}}} -\@writefile{nav}{\headcommand {\def \inserttotalframenumber {16}}} +\HyPL@Entry{18<>} +\pgfsyspdfmark {pgfid65}{23867907}{17900937} +\@writefile{nav}{\headcommand {\slideentry {0}{0}{18}{19/19}{}{0}}} +\@writefile{nav}{\headcommand {\beamer@framepages {19}{19}}} +\pgfsyspdfmark {pgfid66}{0}{0} +\pgfsyspdfmark {pgfid67}{0}{0} +\HyPL@Entry{19<>} +\pgfsyspdfmark {pgfid68}{23867907}{17900937} +\@writefile{nav}{\headcommand {\slideentry {0}{0}{19}{20/20}{}{0}}} +\@writefile{nav}{\headcommand {\beamer@framepages {20}{20}}} +\pgfsyspdfmark {pgfid69}{0}{0} +\pgfsyspdfmark {pgfid70}{0}{0} +\HyPL@Entry{20<>} +\pgfsyspdfmark {pgfid71}{23867907}{17900937} +\@writefile{nav}{\headcommand {\slideentry {0}{0}{20}{21/21}{}{0}}} +\@writefile{nav}{\headcommand {\beamer@framepages {21}{21}}} +\pgfsyspdfmark {pgfid72}{0}{0} +\pgfsyspdfmark {pgfid73}{0}{0} +\@writefile{nav}{\headcommand {\beamer@partpages {1}{21}}} +\@writefile{nav}{\headcommand {\beamer@subsectionpages {1}{21}}} +\@writefile{nav}{\headcommand {\beamer@sectionpages {1}{21}}} +\@writefile{nav}{\headcommand {\beamer@documentpages {21}}} +\@writefile{nav}{\headcommand {\def \inserttotalframenumber {19}}} diff --git a/Lectures_my/MC_2016/Lecture10/mchrzasz.log b/Lectures_my/MC_2016/Lecture10/mchrzasz.log index b8f23a5..81f1303 100644 --- a/Lectures_my/MC_2016/Lecture10/mchrzasz.log +++ b/Lectures_my/MC_2016/Lecture10/mchrzasz.log @@ -1,4 +1,4 @@ -This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/Debian) (format=xelatex 2015.4.1) 9 MAY 2016 01:19 +This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/Debian) (format=xelatex 2015.4.1) 11 MAY 2016 19:45 entering extended mode restricted \write18 enabled. %&-line parsing enabled. @@ -3022,8 +3022,12 @@ [12 ] +Overfull \hbox (15.79105pt too wide) in paragraph at lines 593--593 +[][] + [] + File: images/BG_lower.png Graphic file (type QTm) - + Overfull \vbox (19.18185pt too high) has occurred while \output is active [] ................................................. @@ -3043,12 +3047,12 @@ [13 ] -Overfull \hbox (16.57283pt too wide) in paragraph at lines 611--611 +Overfull \hbox (16.57283pt too wide) in paragraph at lines 624--624 [] [] -Overfull \hbox (16.57283pt too wide) in paragraph at lines 611--611 +Overfull \hbox (16.57283pt too wide) in paragraph at lines 624--624 []$[]$ [] @@ -3136,7 +3140,6 @@ [17 ] -\c@framenumberappendix=\count453 File: images/BG_lower.png Graphic file (type QTm) Overfull \vbox (19.18185pt too high) has occurred while \output is active [] @@ -3158,6 +3161,75 @@ [18 ] +File: images/boundary.png Graphic file (type QTm) + +Overfull \vbox (4.31161pt too high) detected at line 761 + [] + +File: images/BG_lower.png Graphic file (type QTm) + +Overfull \vbox (19.18185pt too high) has occurred while \output is active [] + +................................................. +. fontspec info: "no-scripts" +. +. Font Trebuchet MS does not contain any OpenType `Script' information. +................................................. +................................................. +. fontspec info: "defining-font" +. +. Font family 'TrebuchetMS(0)' created for font 'Trebuchet MS' with options +. [Mapping=tex-text,]. +. +. This font family consists of the following shapes: +................................................. + +[19 + +] +File: images/BG_lower.png Graphic file (type QTm) + +Overfull \vbox (19.18185pt too high) has occurred while \output is active [] + +................................................. +. fontspec info: "no-scripts" +. +. Font Trebuchet MS does not contain any OpenType `Script' information. +................................................. +................................................. +. fontspec info: "defining-font" +. +. Font family 'TrebuchetMS(0)' created for font 'Trebuchet MS' with options +. [Mapping=tex-text,]. +. +. This font family consists of the following shapes: +................................................. + +[20 + +] +\c@framenumberappendix=\count453 +File: images/BG_lower.png Graphic file (type QTm) + +Overfull \vbox (19.18185pt too high) has occurred while \output is active [] + +................................................. +. fontspec info: "no-scripts" +. +. Font Trebuchet MS does not contain any OpenType `Script' information. +................................................. +................................................. +. fontspec info: "defining-font" +. +. Font family 'TrebuchetMS(0)' created for font 'Trebuchet MS' with options +. [Mapping=tex-text,]. +. +. This font family consists of the following shapes: +................................................. + +[21 + +] \tf@nav=\write11 \openout11 = `mchrzasz.nav'. @@ -3167,23 +3239,23 @@ \tf@snm=\write13 \openout13 = `mchrzasz.snm'. -Package atveryend Info: Empty hook `BeforeClearDocument' on input line 691. -Package atveryend Info: Empty hook `AfterLastShipout' on input line 691. +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 797. +Package atveryend Info: Empty hook `AfterLastShipout' on input line 797. (./mchrzasz.aux) -Package atveryend Info: Empty hook `AtVeryEndDocument' on input line 691. -Package atveryend Info: Empty hook `AtEndAfterFileList' on input line 691. +Package atveryend Info: Empty hook `AtVeryEndDocument' on input line 797. +Package atveryend Info: Empty hook `AtEndAfterFileList' on input line 797. Package logreq Info: Writing requests to 'mchrzasz.run.xml'. \openout1 = `mchrzasz.run.xml'. -Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 691. +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 797. ) Here is how much of TeX's memory you used: - 50410 strings out of 493918 - 988923 string characters out of 6150564 - 1348133 words of memory out of 5000000 - 52673 multiletter control sequences out of 15000+600000 + 50454 strings out of 493918 + 990095 string characters out of 6150564 + 1348134 words of memory out of 5000000 + 52716 multiletter control sequences out of 15000+600000 37200 words of font info for 150 fonts, out of 8000000 for 9000 1144 hyphenation exceptions out of 8191 - 55i,23n,77p,10405b,1471s stack positions out of 5000i,500n,10000p,200000b,80000s + 55i,23n,77p,10405b,1480s stack positions out of 5000i,500n,10000p,200000b,80000s -Output written on mchrzasz.pdf (18 pages). +Output written on mchrzasz.pdf (21 pages). diff --git a/Lectures_my/MC_2016/Lecture10/mchrzasz.nav b/Lectures_my/MC_2016/Lecture10/mchrzasz.nav index 1ee06ef..cad9c51 100644 --- a/Lectures_my/MC_2016/Lecture10/mchrzasz.nav +++ b/Lectures_my/MC_2016/Lecture10/mchrzasz.nav @@ -34,8 +34,14 @@ \headcommand {\beamer@framepages {16}{17}} \headcommand {\slideentry {0}{0}{17}{18/18}{}{0}} \headcommand {\beamer@framepages {18}{18}} -\headcommand {\beamer@partpages {1}{18}} -\headcommand {\beamer@subsectionpages {1}{18}} -\headcommand {\beamer@sectionpages {1}{18}} -\headcommand {\beamer@documentpages {18}} -\headcommand {\def \inserttotalframenumber {16}} +\headcommand {\slideentry {0}{0}{18}{19/19}{}{0}} +\headcommand {\beamer@framepages {19}{19}} +\headcommand {\slideentry {0}{0}{19}{20/20}{}{0}} +\headcommand {\beamer@framepages {20}{20}} +\headcommand {\slideentry {0}{0}{20}{21/21}{}{0}} +\headcommand {\beamer@framepages {21}{21}} +\headcommand {\beamer@partpages {1}{21}} +\headcommand {\beamer@subsectionpages {1}{21}} +\headcommand {\beamer@sectionpages {1}{21}} +\headcommand {\beamer@documentpages {21}} +\headcommand {\def \inserttotalframenumber {19}} diff --git a/Lectures_my/MC_2016/Lecture10/mchrzasz.pdf b/Lectures_my/MC_2016/Lecture10/mchrzasz.pdf index 264a34a..007e25d 100644 --- a/Lectures_my/MC_2016/Lecture10/mchrzasz.pdf +++ b/Lectures_my/MC_2016/Lecture10/mchrzasz.pdf Binary files differ diff --git a/Lectures_my/MC_2016/Lecture10/mchrzasz.synctex.gz b/Lectures_my/MC_2016/Lecture10/mchrzasz.synctex.gz index e06aca3..2b66ff0 100644 --- a/Lectures_my/MC_2016/Lecture10/mchrzasz.synctex.gz +++ b/Lectures_my/MC_2016/Lecture10/mchrzasz.synctex.gz Binary files differ diff --git a/Lectures_my/MC_2016/Lecture10/mchrzasz.tex b/Lectures_my/MC_2016/Lecture10/mchrzasz.tex index 80e5114..79c8808 100644 --- a/Lectures_my/MC_2016/Lecture10/mchrzasz.tex +++ b/Lectures_my/MC_2016/Lecture10/mchrzasz.tex @@ -565,7 +565,20 @@ \begin{frame}\frametitle{Muller method, example} \begin{minipage}{\textwidth} \begin{footnotesize} -\ARROW An example solution in the +\ARROW An example solution of Laplace equation on square $( 0 \leq x \leq 1,~0 \leq y \leq 1)$ with the boundary conditions: $u(0,y)=1,~u(1,y)=u(x,0)=u(x,1)=1$ + +\begin{tabular}{||c|c|c|c|c|c||} +\hline \hline +Method & Points $(x,y)$ & N. trajectories & Ave.n.of.steps & Time $[s]$ & Solution\\ +\hline \hline +\multirow{2}{*}{ Cons. step} & $(0.3,0.3)$ & 2000 & 89.87 & 42.0 & 0.396 \\ +& $(0.5,0.1)$ & 2000 & 46.05 & 21.5 & 0.075 \\ +$(h=0.05)$ & $(0.5,0.5)$ & 2000 & 115.83 & 54.1 & 0.247 \\ \hline +\multirow{3}{*}{ Muller met.} & $(0.3,0.3)$ & 2000 & 6.06 & 17.9 & 0.398 \\ +& $(0.5,0.1)$ & 2000 & 6.04 & 18.0 & 0.078 \\ +& $(0.5,0.5)$ & 2000 & 5.07 & 14.5 & 0.255 \\ +\hline \hline +\end{tabular} @@ -679,6 +692,99 @@ \end{frame} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{frame}\frametitle{Random walk for boundary points, continued} +\begin{minipage}{\textwidth} +\begin{footnotesize} +\ARROW The boundary point $Q$ has only one internal neighbour point $P$.\\ +\ARROW The algorithm: +\begin{itemize} +\item We start the walk from a internal point $(X,Y)$ and we assign to it a weight: $W=1$. +\item If a particle at a given moment is sitting on the boundary then with probability $p$ it goes back to previous point $P$ and gets a weight $W \cdot \phi(Q)$ and with probability $(1-p)$ it finishes the walk and gets a weight of $W \cdot \psi(Q).$ +\item For each trajectory we assign a value equal to the weight of the last point. So for example if the trajectory: $Q^{(1)},Q^{(2)}, Q^{(3)},...,Q^{(k)}$ we will assign the number: +\begin{align*} +\phi(Q^{(1)}) \phi(Q^{(2)}) \phi(Q^{(3)})... \phi(Q^{(k-1)}) \psi( Q^{(k)}) +\end{align*} +\end{itemize} + + + +\ARROWR One again this is only for 1 neighbour point $P$ and that the normal of the boundary is parallel to the grid!\\ +\ARROW The general case is more difficult! + + + + + +\end{footnotesize} + +\end{minipage} + +\end{frame} + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{frame}\frametitle{More general case} +\begin{minipage}{\textwidth} +\begin{footnotesize} +\begin{columns} +\column{2.2in} +\includegraphics[width=0.95\textwidth]{images/boundary.png} + + + +\column{2.8in} +\ARROW The boundary conditions: +\begin{align*} +f(Q) \frac{1}{h\sqrt{1+c_1^2}} \left[ c_2 u(P_1)+c_1 u(P_2) - u(Q^{\ast} \right] + \\g(Q) u(Q^{\ast})=h(Q) +\end{align*} +\ARROW The trick: +\begin{align*} +\phi_1(Q^{\ast})=\frac{c_1 f(Q)}{p_1 \left[f(Q) - h\sqrt{1+c_1^2} \right]}\\ +\phi_2(Q^{\ast})=\frac{c_2 f(Q)}{p_2 \left[f(Q) - h\sqrt{1+c_1^2} \right]}\\ +\psi_3(Q^{\ast})=-h \frac{ \sqrt{c_1^2+1}h(Q))}{p_3 \left[f(Q) - h\sqrt{1+c_1^2} \right]}\\ +\end{align*} +\end{columns} +\ARROW Putting above new variables we get: +\begin{align*} +u(Q^{\ast})=p_1 \phi_1(Q^{\ast}) u(P_1) + p_2 \phi_2(Q^{\ast}) u(P_2) + p_3 \psi(Q^{\ast}) +\end{align*} +\ARROW We will interpret the $p_1$, $p_2$, $p_3$ numbers as probability. + +\end{footnotesize} + +\end{minipage} + +\end{frame} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{frame}\frametitle{More general case, continuation} +\begin{minipage}{\textwidth} +\begin{footnotesize} +\ARROW The rules of random walk: +\begin{itemize} +\item The particle starts in $(X,Y)$ inside the domain with weight: $W=1$. +\item If at some point in time the particle hits the boundary in point $Q^{\ast}$: +\begin{itemize} +\item With probability $p_1$ it goes to point $P_1$ and the weight is $W \cdot \phi_1(Q^{\ast})$ +\item With probability $p_2$ it goes to point $P_2$ and the weight is $W \cdot \phi_2(Q^{\ast})$ +\item With probability $p_3$ it stops the walk and the weight is $W \cdot \psi(Q^{\ast})$ + +\end{itemize} +\item For each trajectory we assign the weight at the end point. +\end{itemize} + + + +\end{footnotesize} +\end{minipage} +\end{frame} + + \backupbegin \begin{frame}\frametitle{Backup} diff --git a/Lectures_my/MC_2016/Lecture8/mchrzasz.log b/Lectures_my/MC_2016/Lecture8/mchrzasz.log index 50b36c8..e086a9a 100644 --- a/Lectures_my/MC_2016/Lecture8/mchrzasz.log +++ b/Lectures_my/MC_2016/Lecture8/mchrzasz.log @@ -1,4 +1,4 @@ -This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/Debian) (format=xelatex 2015.4.1) 8 MAY 2016 13:33 +This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/Debian) (format=xelatex 2015.4.1) 9 MAY 2016 10:32 entering extended mode restricted \write18 enabled. %&-line parsing enabled. diff --git a/Lectures_my/MC_2016/Lecture8/mchrzasz.tex b/Lectures_my/MC_2016/Lecture8/mchrzasz.tex index 3699f76..946a323 100644 --- a/Lectures_my/MC_2016/Lecture8/mchrzasz.tex +++ b/Lectures_my/MC_2016/Lecture8/mchrzasz.tex @@ -624,7 +624,7 @@ \item The dual method calculates the whole $\overrightarrow{x}_0$ vector. \item The algorithm: \begin{itemize} -\item On the indexes: $\lbrace0,1,...,n\rbrace$ we set a probability distribution:\\ $q_1, q_2,..., q_n$, $q_i>0$ and $\sum_{i=1^n} q_i=1$. +\item On the indexes: $\lbrace0,1,...,n\rbrace$ we set a probability distribution:\\ $q_1, q_2,..., q_n$, $q_i>0$ and $\sum_{i=1}^n q_i=1$. \item The starting point we select from $q_i$ distribution. \item If in $t$ time we are in $i_t$ state then with probability $p(i_{t+1} \vert i_t) = h_{i_{t+1},i_{t}}$ in $t+1$ we will be in state $i_{t+1}$. For $i_{t+1}=0$ we define the probability: $h_{0,i_{t}}=1-\sum_{j=1}^n h_{j,i_{t}}$. Here we also assume that $h_{j,i_{t}} > 0$. \item NOTE: there the matrix is transposed compared to previous method: $H^{T}$.