Error with index -1 is out of bounds for axis 0 with size 0

Hello, everyone
please I need your help please.
I have some problems with " idex -1 is out of bounds for axis 0 with size 0" . When I put 1 instead to 0

I got another error with file ''mpi4py".
thank you for your kind help.

Read Read before posting: How do I get my question answered?

The code you posted is not reproducible because:

  • we don’t have the mesh
  • most likely, we don’t have the patience to re-type on our own every line of the code you posted in the screenshot :wink:

Here is the link of my python code and my mesh file.

Thank you for your tips

Seems to me that your mesh is missing physical groups associated to subdomains and boundaries. Those are required to use in order to prepare the second and third output arguments.

Thank you very much, everything is working perfectly. I added the physical group and the issue disappeared. Thank you immensely. I’m moving on to the next step :smiling_face:.

I also used instead gmshio.