C; for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) { // Scatter to grid auto dpos = (Vec(i, j) - fx) * dx; Vector3 mv(p.v * particle_mass, particle_mass); //translational momentum grid[base_coord.x + i][base_coord.y + j] += w[i].x*w[j]...