X-Git-Url: http://git.treefish.org/~alex/phys/heatbath.git/blobdiff_plain/6f388da54cc67e5fbc10c2e8ae78ad28a5f053dd..3c0d4377f0e0c7ed6df154aaf0b7cdf7442571af:/sim-r-.hpp diff --git a/sim-r-.hpp b/sim-r-.hpp index f16d97e..f00b873 100644 --- a/sim-r-.hpp +++ b/sim-r-.hpp @@ -44,15 +44,13 @@ sim::sim(o815 *_O815) : o815::sim( _O815, void sim::updatePhi (const int& x) { const double r = gsl_rng_uniform(rangsl); - const double theta = gsl_rng_uniform(rangsl) * 2*M_PI; - const double oldarg = arg(conf[x].phi); complex V=0; for (int nu=0; nu<4; nu++) V += conf[ (*nb)[x*4+nu] ].phi; conf[x].phi = sqrt(std::log( 1./(1-r) )) / sqrt(M) - * polar(1.0, oldarg) + * polar( 1.0, arg(conf[x].phi) ) + V / M; }