Application of the spectral method to the simulation of the phase-field model for martensitic transformation