Make changes

This commit is contained in:
2023-12-03 13:33:48 +01:00
parent 84692040d3
commit 237bd37184
13 changed files with 377 additions and 207 deletions

View File

@@ -18,6 +18,7 @@
#include "utils.hpp"
#include <armadillo>
#include <cstdint>
#include <random>
#include <unordered_map>
@@ -53,7 +54,8 @@ private:
/** @brief A hash map containing all possible energy changes.
* */
std::unordered_map<int, double> energy_diff;
//std::unordered_map<int, double> energy_diff;
double energy_diff[17];
/** @brief The temperature of the model.
* */
@@ -65,12 +67,15 @@ private:
/** @brief The current energy state. unit: \f$ J \f$.
* */
int E;
int64_t E;
/** @brief The current magnetic strength. unit: Unitless.
* */
int M;
int64_t M;
std::mt19937 engine;
void initialize_engine();
/** @brief Initialize the lattice with a random distribution of 1s and
* -1s.
* */