/** * Evaluate gravitational field on the body. * The original olden version calls a routine named "walkscan", * but we use the same name that is in the Barnes code. */ public void hackGravity (double rsize, Node root) { MathVector pos0 = pos.cloneMathVector (); HG hg = HG.makeHG (this, pos); hg = root.walkSubTree (rsize * rsize, hg); phi = hg.phi0; newAcc = hg.acc0; }