TimeoutError while using BlockedNewtonSolver

Hi,Refer to this article to solve the problem of cohesive debonding Cohesive zone modeling restricted to an interface — Computational Mechanics Numerical Tours with FEniCSx.
Currently, I want to reproduce models such as masonry structure models. Therefore, I have set up a function space for each block, and for the interface where each block is connected, I have set up a function space to represent the interface damage. However, when my model is relatively small, the model can be calculated.


But when my model is relatively large, like this

it seems that the stiffness matrix cannot be assembled, and there is often an error message that the program is killed. How can this problem be solved? To avoid the large number of interfaces, I am thinking about whether it is feasible to adopt cohesive elements with thickness.

TimeoutError: JIT compilation timed out, probably due to a failed previous compile. Try cleaning cache (e.g. remove /home/sff/.cache/fenics/libffcx_forms_3aa4cd78f03388d2aee6f1720a7bd22e90d9d924.c) or increase timeout option.
Exception ignored in: <function BlockedNewtonSolver.__del__ at 0x7fbec089d4e0>
Traceback (most recent call last):
  File "/mnt/d/fenicsx/brick_bending/brick_bending.py", line 173, in __del__
    self._J.destroy()
    ^^^^^^^
AttributeError: 'BlockedNewtonSolver' object has no attribute '_J'

Without a reproducible example it is incredibly hard to give any guidance.

I referred to the article you posted, JIT options and visualization using Pandas — FEniCSx tutorial, to address the runtime error issue. I’m currently using the BlockedNewtonSolver as shown in this code snippet: scifem/src/scifem/solvers.py at main · scientificcomputing/scifem · GitHub. However, I’m unsure how to handle this situation. To provide an example here, could you tell me how to display my grid file in MSH format?

If you are using .geo files to create your mesh, add the .geo file here, and the command you use to create the mesh.
If you are using the GMSH Python API to generate the mesh, add the script in a post.

Alternatively, you can upload the msh file on zenodo (https://zenodo.org/) and share a link to it.

hi professor ,I am currently using a phase-field model in conjunction with non-zero thickness cohesive elements to simulate masonry structures. Here is the relevant link: [masonry simulation occurring timout problem].
I’ve noticed that the approach for handling the complex interfaces between bricks isn’t entirely satisfactory. Specifically, I’m required to apply a distinct function space to each interface. I would greatly appreciate it if you could offer some advice on how to improve this aspect