From 1da9ba0af64dd1ff07c9fda6226689b4e8701e43 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Tue, 25 Feb 2020 15:23:41 -0500 Subject: Minor refactoring of sphere commands and animation class, and introduction of Dimers --- ising.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'ising.hpp') 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(0, 1) < pop) { - Spin* ss = new Spin(); - ss->x = {i, j}; - if (rng.uniform(0, 1) < mag) { - ss->s = 1; - } else { - ss->s = -1; - } - m.s.push_back(ss); - m.dict.insert(ss); + Spin* ss = new Spin(); + ss->x = {i, j}; + if (rng.uniform(0, 1) < mag) { + ss->s = 1; + } else { + ss->s = -1; + } + m.s.push_back(ss); + m.dict.insert(ss); } } } -- cgit v1.2.3-54-g00ecf