summaryrefslogtreecommitdiff
path: root/ising.hpp
diff options
context:
space:
mode:
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);
}
}
}