Numerical Simulation of Mechanical Response of Geomaterials from Strain Hardening to Localized Failure