Numerical Simulation of Failure Process in Heterogeneous Elastoplastic Materials