as commented Ahmad, I took the XFEM module with Prof. Moës during my master studies too. In case you want to dive into the topic, I should recommend you:
- Original paper:
Moës N, Dolbow J and Belytschko T. A finite element method for crack growth without remeshing. Int. J. Numer. Methods Eng. 1999; 46(1):131–150.
Moës, N., Dolbow, J.E. and Sukumar, N. (2017). Extended Finite Element Methods. In Encyclopedia of Computational Mechanics Second Edition (eds E. Stein, R. Borst and T.J.R. Hughes). https://doi.org/10.1002/9781119176817.ecm2111
-Book (Chapter 11):
Belytschko et al., Nonlinear Finite Elements for Continua and Structures, 2nd Edition, Wiley (2013)
-Matlab code: (I used this code as a starting point for my master thesis)