Finished review. The only point left is in results line 105, where I added a comment.

This commit is contained in:
Janita Willumsen
2023-12-05 10:02:43 +01:00
parent a0d3a39d07
commit 5df0a2411b
4 changed files with 17 additions and 15 deletions

View File

@@ -9,7 +9,7 @@ MRI machines to produce detailed anatomical images.
Magnetic materials care classified based on their specific magnetic behavior,
and one of the groups consists of ferromagnetic materials. These materials are
easily magnetized, and when exposed to a strong magnetic field they can become
easily magnetized, and when exposed to a strong magnetic field, they become
saturated. In addition, when these materials are heated to a critical point, they
lose their magnetic property \cite{britannica:2023:ferromagnetism}.

View File

@@ -241,8 +241,8 @@ states can be reached at every current state, whereas detailed balance implies n
net flux of probability. To satisfy these criteria we use the Metropolis-Hastings
algorithm, found in Algorithm \ref{algo:metropolis}, to generate samples of microstates.
One Monte Carlo cycle consist of changing the initial configuration of the lattice,
by randomly flipping a spin. When a spin is flipped, the change in energy is evaluated as
One Monte Carlo cycle consists of $N$ attempted spin flips. When a spin is flipped,
the change in energy is evaluated as
\begin{align*}
\Delta E &= E_{\text{after}} - E_{\text{before}} \ ,
\end{align*}
@@ -287,15 +287,15 @@ will tend toward the actual probability distribution of the system.
\subsection{Implementation and testing}\label{subsec:implementation_test}
We implemented a test suite, and compared the numerical estimates to the analytical
results from Section \ref{subsec:statistical_mechanics}. In addition, we set a tolerance to
verify convergence, and a maximum number of Monte Carlo cycles to avoid longer
runtimes during execution.
results from Section \ref{subsec:statistical_mechanics}. In addition, we set a
tolerance to verify convergence, and a maximum number of Monte Carlo cycles to
avoid potentially having the program run indefinitely.
We used a pattern to access all neighboring spins, where all indices of the neighboring
spins are put in an $L \times 2$ matrix. The indices are accessed using pre-defined
constants, where the first column contain the indices for neighbors to the left
and up, and the second column right and down. This method avoids the use of if-tests,
and takes advantage of the parallel optimization.
and up, and the second column right and down. This method avoids the use of if-tests,
so we can take advantage of the compiler optimization.
We parallelized our code using both message passing interface (OpenMPI) and
multi-threading (OpenMP). First, we divided the temperatures into smaller sub-ranges,

View File

@@ -94,7 +94,7 @@ point.
\subsection{Phase transition}\label{subsec:phase_transition}
% Phase transition figures
We continued investigating the behavior of the system around the critical temperature.
First, we generated $10$ million samples of spin configurations for lattices of
First, we generated $10$ million samples of spin configurations, per temperature, for lattices of
size $L \in \{20, 40, 60, 80, 100\}$, and temperatures $T \in [2.1, 2.4]$. We divided the
temperature range into $40$ steps, with an equal step size of $0.0075$. The samples
were generated in parallel, where the program allocated $4$ sequential temperatures to $10$
@@ -102,7 +102,7 @@ MPI processes. Each process was set to spawn $10$ threads, resulting in a total
$100$ threads working in parallel. We include results for $1$ million MC cycles
in Appendix \ref{sec:additional_results}
$\boldsymbol{Rewrite}$ We ran a profiler to make sure the program was fully optimized which found that the
$\boldsymbol{Rewrite}$ We used a profiler to make sure the program was fully optimized which found that the
workload was balanced, the threads was not left idle to long/not a lot of downtime.
In Figure \ref{fig:phase_energy_10M}, for the larger lattices we observe a sharper