From 96b86c0d9c02d0fcc9b650fb3e5069a8ec013223 Mon Sep 17 00:00:00 2001 From: Alexander Schmidt Date: Thu, 28 Nov 2013 09:38:42 +0100 Subject: [PATCH 1/1] Doing the right rho overrelaxation update now. --- sim-nonmetro.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sim-nonmetro.hpp b/sim-nonmetro.hpp index 064a7bb..7acab4d 100644 --- a/sim-nonmetro.hpp +++ b/sim-nonmetro.hpp @@ -53,6 +53,8 @@ void sim::updatePhi (const int& x) for (int nu=0; nu<4; nu++) V += conf[ (*nb)[x*4+nu] ].phi; + Y = sqrt(M) * conf[x].phi - V / sqrt(M); + #if defined(ALGORITHM_AHBMHB) || defined(ALGORITHM_AHBMOR) || defined(ALGORITHM_AHBM0) Y = polar( abs(Y), gsl_rng_uniform(rangsl) * 2*M_PI ); #elif defined(ALGORITHM_AORMHB) || defined(ALGORITHM_AORMOR) || defined(ALGORITHM_AORM0) @@ -65,8 +67,10 @@ void sim::updatePhi (const int& x) #if defined(ALGORITHM_AHBMHB) || defined(ALGORITHM_AORMHB) || defined(ALGORITHM_A0MHB) Y = polar( magnYOfR( gsl_rng_uniform(rangsl) ), arg(Y) ); #elif defined(ALGORITHM_AHBMOR) || defined(ALGORITHM_AORMOR) || defined(ALGORITHM_A0MOR) - Y = polar( magnYOfR( 1 - exp(-norm(Y)) ), arg(Y) ); //!!!! + Y = polar( magnYOfR( exp( -norm(Y) ) ), arg(Y) ); #endif + + conf[x].phi = Y / sqrt(M) + V / M; } void sim::_makeSweep() { -- 2.39.5