void sim::updatePhi (const int& x)
{
complex<double> V=0;
- const double theta = gsl_rng_uniform(rangsl) * 2*M_PI;
for (int nu=0; nu<4; nu++)
V += conf[ (*nb)[x*4+nu] ].phi;
+ 2 * real( conf[x].phi * conj(V) ) );
conf[x].phi = sqrt(std::log( 1./(1-r) )) / sqrt(M)
- * polar(1.0,theta)
+ * polar( 1.0, arg(conf[x].phi) )
+ V / M;
}