Numerical modelling in damage mechanics