The effect of stress distribution in the bulk of a microwire on the magnetization processes