Effect of strain localization on the response of granular materials subjected to monotonic and cyclic triaxial tests