FSI problem with SLEPc

@prj
Thanks to your guidance, I’ve completed the initial version of my code. However, I’m facing some persistent issues with its robustness:
The script isn’t robust enough, it works with -n 4 but fails with -n 6 , and sometimes it produces different results even when run multiple times with the same parameters.

For example, if I run the code withff-mpirun -n 4 FSI-SLEPc-MWE.edp -wg multiple times, it gives:



Apparently, the first one looks better than the others.

I’ve tried debugging it but haven’t been able to identify the root cause. I’m also uncertain if the solver configuration is optimal. I would be very grateful if you could take a look and help me diagnose the problem.
Here is my code attached:
FSI-SLEPc-MWE.edp (5.4 KB)

A typical case when such variations in the results occur is when the value of a variable is used before it has been affected any value.

Your code does not run in debug mode, which makes it difficult to… debug.

CHECK_KN: (k>=0) && ( (k <n) || !step) in file: ./../femlib/RNM.hpp, line 341
  current line = 159 mpirank 3 / 4
Assertion fail : (0)
	line :53, in file ./../femlib/RNM.hpp
 err code 6 ,  mpirank 3