Dear Professor,
I hope everything is fine with you.
Let me briefly describe the problems we have discussed. I want to obtain the displacement of the elastic system over time. My problem is that the sequential code could provide the correct resolution, while the parallel code with PETSc (even though only one single process) given me a different resolution with that of the sequential code. Obviously, for the trends and values of the resolution from the parallel code, it was wrong.
You suggested me to figure out the reason for the differences in the resolution between the sequential and parallel (one process) codes. I have carefully compared the two codes. The parallel code was transformed rigorously from the sequential code based on the examples of elastic_PETSc. I even converted the three-dimensional system into a simplest two-dimensional system, the similar problem still existed. Therefore, I think the reason for the differences between the two codes is not the compilation error of the parallel code, and may be the improper solver.
I searched the similar problems in the community of FreeFem++. There are several posts also show that the sequential code could give right resolution (about residual error), while the parallel with PETSc provide strange results. You suggested that the reason may be the improper solver. I have tried to change the solver in my code according to your suggestion, while the resolution also was wrong.
I really don’t know how to solve this problem, which is difficult for me. So, could you please help me to figure out this problem?
The simple sequential and parallel codes for 2D elasticity system are attached here.
Parallel with PETSc_2D.edp (3.3 KB)
Sequential_2D.edp (2.1 KB)
Please check them.
Give you my best wishes.
Liu