summaryrefslogtreecommitdiff
path: root/ising.hpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2020-02-25 15:23:41 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2020-02-25 15:23:41 -0500
commit1da9ba0af64dd1ff07c9fda6226689b4e8701e43 (patch)
tree7583c571b34e4e7a3dac0cc6e34016c6a6270e56 /ising.hpp
parent5fe3e194a2d4690b541ecee8ea342681c4eeaa6c (diff)
downloadspace_wolff-1da9ba0af64dd1ff07c9fda6226689b4e8701e43.tar.gz
space_wolff-1da9ba0af64dd1ff07c9fda6226689b4e8701e43.tar.bz2
space_wolff-1da9ba0af64dd1ff07c9fda6226689b4e8701e43.zip
Minor refactoring of sphere commands and animation class, and introduction of Dimers
Diffstat (limited to 'ising.hpp')
-rw-r--r--ising.hpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/ising.hpp b/ising.hpp
index 6f140be..a97da26 100644
--- a/ising.hpp
+++ b/ising.hpp
@@ -91,15 +91,15 @@ void isingPopulate(isingModel& m, unsigned L, double pop, double mag) {
for (unsigned i = 0; i < L; i++) {
for (unsigned j = 0; j < L; j++) {
if (rng.uniform<double>(0, 1) < pop) {
- Spin<signed, D, signed>* ss = new Spin<signed, D, signed>();
- ss->x = {i, j};
- if (rng.uniform<double>(0, 1) < mag) {
- ss->s = 1;
- } else {
- ss->s = -1;
- }
- m.s.push_back(ss);
- m.dict.insert(ss);
+ Spin<signed, D, signed>* ss = new Spin<signed, D, signed>();
+ ss->x = {i, j};
+ if (rng.uniform<double>(0, 1) < mag) {
+ ss->s = 1;
+ } else {
+ ss->s = -1;
+ }
+ m.s.push_back(ss);
+ m.dict.insert(ss);
}
}
}