Nonlinear finite element analysis of quasi-brittle materials