-
Notifications
You must be signed in to change notification settings - Fork 0
/
App_SourceCodes.tex
38 lines (35 loc) · 1.38 KB
/
App_SourceCodes.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
% !TeX root = Body.tex
\chapter{Simulation Algorithms}
\begin{algorithm}
\caption{Single Flip Algorithm for a Monte Carlo Time (Equilibrium)}
\label{alg:SFAEMC}
\begin{algorithmic}
\FOR{$i_{\rm step} = 1, \dots, N_{\rm size}$}
\STATE randomly chose a spin
\STATE flip by the probability $\min\{1, \mathrm{e}^{\beta \Delta E}\}$
\ENDFOR
\STATE measurement
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\caption{Single Flip Algorithm for a Monte Carlo Time (Non-equilibrium)}
\label{alg:SFANEMC}
\begin{algorithmic}
\STATE $\text{pump} = 0$
\STATE $\text{diss} = 0$
\FOR {$i_{\rm v} = 1, \dots, v$}
\STATE $\text{prev}\Leftarrow \text{energy on the slip plane}$
\STATE sliding
\STATE $\text{next}\Leftarrow \text{energy on the slip plane}$
\STATE $\text{pump} = \text{pump} + (\text{next} - \text{prev})$
\\
\STATE $\text{prev}\Leftarrow \text{energy on the entire system}$
\FOR{$i_{\rm step} = 1, \dots, N_{\rm size}/v$}
\STATE flip by the probability $\min\{1, \mathrm{e}^{\beta \Delta E}\}$
\ENDFOR
\STATE $\text{next}\Leftarrow \text{energy on the entire system}$
\STATE $\text{diss} = \text{diss} + (\text{next} - \text{prev})$
\ENDFOR
\STATE{measurement}
\end{algorithmic}
\end{algorithm}