A Collection Code for Spectral Method to solving PDE