3d particle-in-cell