2d advection on the plane: convert to classes