{
const double theta = gsl_rng_uniform(rangsl) * 2*M_PI;
complex<double> V=0;
+ const double oldarg = arg(conf[x].phi);
for (int nu=0; nu<4; nu++)
V += conf[ (*nb)[x*4+nu] ].phi;
- 1./M * norm(V)
+ 2 * real( conf[x].phi * conj(V) ) );
- double oldarg = arg(conf[x].phi);
-
conf[x].phi = sqrt(std::log( 1./(1-r) )) / sqrt(M)
* polar(1.0, oldarg)
+ V / M;
{
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<double> V=0;
for (int nu=0; nu<4; nu++)
V += conf[ (*nb)[x*4+nu] ].phi;
- double oldarg = arg(conf[x].phi);
-
conf[x].phi = sqrt(std::log( 1./(1-r) )) / sqrt(M)
* polar(1.0, oldarg)
+ V / M;