- In the first message you printed where PCG converges after 1 iteration, this is an indication that the preconditioner matrix being used is a complete factorization. The problem is solved after 1 iteration because performing a complete LU factorization on the coefficient matrix is the same as solving the problem.
- It's not surprising to see PCG not converge after 100 iterations, but it is surprising to see a relative residual of NaN. This suggests that one of the values in the solution vector blew up to Inf at some point (or, less likely, that you provided an initial guess or coefficient matrix that had a NaN or Inf in it). The best advice for this case is to use a better preconditioner matrix since that helps with the condition of the coefficient matrix.
why convergence is not happening in pcg function ?
11 次查看(过去 30 天)
显示 更早的评论
Hi I used the pcg function for gradient conjugate, but convergence did not happened and I the following text is displaying in the Command Window? I would really appreciate if somebody help me to fix it.
"pcg converged at iteration 1 to a solution with relative residual 1.6e-16.
pcg stopped at iteration 100 without converging to the desired tolerance 1e-10
because the maximum number of iterations was reached.
The iterate returned (number 100) has relative residual NaN."
0 个评论
回答(1 个)
Josh Meyer
2019-9-23
There are two things to notice here:
That said, I would expect these two messages to be returned by PCG for two separate function calls. If, as advertised, both of these messages were printed by PCG for a single function call, then I recommend calling Technical Support. That could potentially be a bug that needs to be fixed.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!