Numerical variational models for fracture mechanics