A numerical spectral approach to solve the dislocation density transport equation