I appear to have fixed the lb_planar_gpu.tcl test case again, but the lb_stokes_sphere_gpu.tcl test case still fails. I think there is a mysterious factor of 2 floating around somewhere in the code. I've added several comments to where I was uncertain about a piece of code, always with // ***** (lb_boundaries.c and lbgpu.cu). For the rest I think I've removed pretty much all the mess that was there.