Influence of an electric or magnetic field on the liquid–solid transformation in materials and on the microstructure of the solid