Hi all, I just made some changes in the second parameter of SolverControl in the following way which apparently resolved the problem:
my problem is nonlinear so I solve it by newton method. It seems that in the first Newton-Rophson iteration the CG solver can not converge if the tolerance for success of CG iterations is considered "1e-12*system_rhs.l2_norm()" but It converges with a smaller number like 10e-16. what I did to solver_control follows: double tol ; if (newton_rophson_itteration_number==0) tol = 1e-16; else tol =1e-12*system_rhs.l2_norm(); SolverControl solver_control (dof_handler.n_dofs(), tol); and the following is system_rhs.l2_norm (newton residual) for the first time step: newton iteration system_rhs.l2_norm number of CG iterations 0 1.82492e-09 97 1 7.71201e-07 185 2 2.1306e-07 207 3 6.89427e-08 199 4 3.16879e-09 198 5 8.83219e-12 201 6 9.55033e-17 202 As you can see in the first newton iteration residual increases then starts to decrease till convergence criteria is satisfied. Although the problem has been resolved by this trick but I don't know why I need to consider different convergence criteria for CG solver in the first newton iteration. In addition, the CG solver still doesn't converge with PreconditionAMG but it works with PreconditionJacobi. Thanks, On Wednesday, October 19, 2016 at 11:01:05 AM UTC-5, Bruno Turcksin wrote: > > 2016-10-19 11:51 GMT-04:00 Hamed Babaei <hamedb...@gmail.com <javascript:>>: > > > I need to compute the determinant of system_matrix to check if its > positive > > or negative so that I know my system_matrix is positive definite or not. > That's what I thought. You don't need to know the determinant to do > that, you can check the sign of the eigenvalues. If all the > eigenvalues are positive, the matrix is positive definite. You can > either use a separate routine to compute the eigenvalues (see step-36 > dealii.org/8.4.1/doxygen/deal.II/step_36.html) or you can get an > estimate of the eigenvalues when you are using GMRES (see > > http://dealii.org/8.4.1/doxygen/deal.II/classSolverGMRES.html#a7b12c13beeb2d307f244e4dd48c06859) > > > > Best, > > Bruno > -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.