- 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!