Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2018-09-10 Thread Jie Cheng
Hi Hamed I just browsed your post two years ago. I am not sure if you are still active on this mailing list. But I am very interested in the bug you found because they may be inspiring to me. It looks like in Line 923 and Line 963 you had two temporary distributed solution inside the Newton loo

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-10 Thread Wolfgang Bangerth
On 11/10/2016 03:34 PM, Hamed Babaei wrote: After two months of struggling with the parallel code, I finally found the bug. I had made a stupid mistake, initializing the temporary distributed solution inside the Newton loop Outstanding. I'm glad to hear! The pessimistic view about softwa

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-10 Thread Hamed Babaei
Hi All, After two months of struggling with the parallel code, I finally found the bug. I had made a stupid mistake, initializing the temporary distributed solution inside the Newton loop I have no word to thank all of you dear friends, Wolfgang and Daniel in particular, for your incredib

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-10 Thread Hamed Babaei
Hi all, It seems that although before first call to solve(in the zero newoton iteration) very few system matrix components are zero but after first solving in the first Newoton iteration, most of the system_matrix components are zero except all the diagonal components and few off-diagonal ones

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-10 Thread Hamed Babaei
Dear Daniel, Then I would expect that the solver should behave the same for both > matrices. Are you still running into the same problems using just 4 cells > with your parallel code? > Yes, the parallel code is not solved by SolverCG+SSOR even for only 4 cell. It is really weird to me that de

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-10 Thread Daniel Arndt
Hamed, Using the print function of Sparsematrix class (Thanks to Daniel for > letting me know that) I printed the elements of system_matrix for both > sequential and parallel codes. > I reduced the problem to only 54 DoFs. It seems that both system_matrices > are symmetric and Identical except

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-09 Thread Hamed Babaei
Hi all, Using the print function of Sparsematrix class (Thanks to Daniel for letting me know that) I printed the elements of system_matrix for both sequential and parallel codes. I reduced the problem to only 54 DoFs. It seems that both system_matrices are symmetric and Identical except for so

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-09 Thread Daniel Arndt
Hamed, Thanks for your help. I can reduce my problem to four 2D elements. I would > like to plot the system_matrix of sequential and parallel codes to compare > them but I am not sure how to do so. > Can I loop over the elements of system_matrix and simply plot them? > All of the matrix classes

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-09 Thread Wolfgang Bangerth
On 11/09/2016 09:00 AM, Hamed Babaei wrote: Thanks for your help. I can reduce my problem to four 2D elements. I would like to plot the system_matrix of sequential and parallel codes to compare them but I am not sure how to do so. Can I loop over the elements of system_matrix and simply plot the

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-09 Thread Hamed Babaei
Dear Wolfgang, Thanks for your help. I can reduce my problem to four 2D elements. I would like to plot the system_matrix of sequential and parallel codes to compare them but I am not sure how to do so. Can I loop over the elements of system_matrix and simply plot them? Thanks -- The deal.II p

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-08 Thread Wolfgang Bangerth
On 11/06/2016 11:15 AM, Hamed Babaei wrote: I am attaching the sequential and parallel codes as well as parameters.prm file. It would be appreciated if you could compare tangent_matrix (the system_matrix of the elasticity part of the problem) of parallel and sequential codes to find out where I

[deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-06 Thread Hamed Babaei
Hi all, I am attaching the sequential and parallel codes as well as parameters.prm file. It would be appreciated if you could compare tangent_matrix (the system_matrix of the elasticity part of the problem) of parallel and sequential codes to find out where I have ruined the S.P.D condition th

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-05 Thread Hamed Babaei
Dear Jean-Paul, I have not written all my boundary condition here to avoid having too long post. You are right but in fact I do have the same boundry condition as -x plain on -y and -z plains. So I think the problem is not because of ill-posed bc. Thanks Hamed -- The deal.II project is loca

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-05 Thread Jean-Paul Pelteret
Dear Hamed, >From the code you've provided you don't seem to impose a dirichlet boundary condition on any "y" degree of freedom. You need to fix at least one degree of freedom in each coordinate direction in order for your problem to have a unique solution. In some cases the CG method can solve

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-04 Thread Hamed Babaei
Hi all, Since the sequential code is solved by SolverCG+SSOR and the parallel one isn't but by Bicgstab and GMRES, It seems to me that I have ruined the symmetry of my system_matrix through parallelization. The assembly and make_constraint parts which contribute to the creation and features of

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-04 Thread Daniel Arndt
Hamed, I have a quick question for you. I was wondering if the system_matrix of > the sequential code should be exactly the same as parallel on for the same > problem condition. > I mean if my sequential code is solved by SolverCG and SSOR > preconditioner, the parallel one should necessarily b

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-04 Thread Bruno Turcksin
Hamed, 2016-11-04 11:25 GMT-04:00 Hamed Babaei : > I have a quick question for you. I was wondering if the system_matrix of the > sequential code should be exactly the same as parallel on for the same > problem condition. It should be the same except for round-off error. If you think about it, mat

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-04 Thread Hamed Babaei
Hi all, I have a quick question for you. I was wondering if the system_matrix of the sequential code should be exactly the same as parallel on for the same problem condition. I mean if my sequential code is solved by SolverCG and SSOR preconditioner, the parallel one should necessarily be solve

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-02 Thread Bruno Turcksin
Hamed, 2016-11-02 10:22 GMT-04:00 Hamed Babaei : > It seems that my system_matrix is not s.p.d any more although in sequential > code it was. Then, there is a bug in your code. You can compare the matrix produced by the sequential code with the one in parallel do help you find the bug. Best, Bru

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-02 Thread Hamed Babaei
Dear Wolfgang, I wrote the sequential code first and It converged to the exact solution using SolverCG and SSOR preconditioner. However, the parallel code diverges at the first call to SolverCG but using GMRES or Bicgstab it works though up to 15 DoFs not more. First and the most important

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-02 Thread Wolfgang Bangerth
On 11/01/2016 10:31 AM, Hamed Babaei wrote: I mean non of the standard preconditioners helped to make it converged. Like Bruno mentioned, if the standard preconditioners don't work, then you will need to think about more complicated ones. Take a look at my video lectures on preconditioners,

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-11-01 Thread Hamed Babaei
Dear Bruno, I mean non of the standard preconditioners helped to make it converged. On Monday, October 31, 2016 at 3:13:35 PM UTC-5, Bruno Turcksin wrote: > > Hamed, > > 2016-10-31 15:56 GMT-04:00 Hamed Babaei >: > > > I have already checked SSOR and AMG non of them make a difference . ILU > >

Re: [deal.II] Re: Convergence problem arising for large number of DoFs

2016-10-31 Thread Bruno Turcksin
Hamed, 2016-10-31 15:56 GMT-04:00 Hamed Babaei : > I have already checked SSOR and AMG non of them make a difference . ILU > doesn't work and gives this error: "[0]PETSC ERROR: MatSolverPackage petsc > does not support matrix type mpiaij" What do you mean they don't make a difference? You should g

[deal.II] Re: Convergence problem arising for large number of DoFs

2016-10-31 Thread Hamed Babaei
Dear Bruno, I have already checked SSOR and AMG non of them make a difference . ILU doesn't work and gives this error: "[0]PETSC ERROR: MatSolverPackage petsc does not support matrix type mpiaij" I don't know how to increase number of iteration. Although I have used the "SolverControl solver_c

[deal.II] Re: Convergence problem arising for large number of DoFs

2016-10-31 Thread Bruno Turcksin
Hamed, On Monday, October 31, 2016 at 3:01:20 PM UTC-4, Hamed Babaei wrote: > > This error message can indicate that you have simply not allowed a > sufficiently large number of iterations for your iterative solver to > converge. This often happens when you increase the size of your problem. In