X-Git-Url: http://git.treefish.org/~alex/phys/heatbath.git/blobdiff_plain/6f388da54cc67e5fbc10c2e8ae78ad28a5f053dd..3c0d4377f0e0c7ed6df154aaf0b7cdf7442571af:/sim-1mr-.hpp diff --git a/sim-1mr-.hpp b/sim-1mr-.hpp index 75c41d9..01701b9 100644 --- a/sim-1mr-.hpp +++ b/sim-1mr-.hpp @@ -45,7 +45,6 @@ void sim::updatePhi (const int& x) { const double theta = gsl_rng_uniform(rangsl) * 2*M_PI; complex V=0; - const double oldarg = arg(conf[x].phi); for (int nu=0; nu<4; nu++) V += conf[ (*nb)[x*4+nu] ].phi; @@ -55,7 +54,7 @@ void sim::updatePhi (const int& x) + 2 * real( conf[x].phi * conj(V) ) ); conf[x].phi = sqrt(std::log( 1./(1-r) )) / sqrt(M) - * polar(1.0, oldarg) + * polar( 1.0, arg(conf[x].phi) ) + V / M; }