Influence of the magnetic fields on crystallization