A generalized machine learning framework for brittle crack problems using transfer learning and graph neural networks