Thank you Wolfgang. I didin't dive much into the Chebyshev preconditioner because I'm not familiar with it. I assume it's because the CG solver inside Chebyshev preconditioner didn't converge or what. But as you stated, if NaN should only get from NaN elements and divided by zero, then I may find the error. I'll follow your debug suggestion.
Best Wayne 在2023年2月14日星期二 UTC+8 12:48:42<Wolfgang Bangerth> 写道: > > > It's strange that the iteration breaks at step 0. If I try right > > preconditioning, it breaks at step 1 with nan. Besides, if there is only > on > > multigrid level, the problem is solved correctly with 1 iteration, so > matrices > > should be correct. The coarse solution is good enough for smoothing. > > > > The question is, in which case may a CG or GMRES solver breaks at step 0 > with nan? > > NaN errors, like segmentation faults, are relatively easy to find because > you > know that every NaN you get is wrong. So you check that the matrix and > right > hand side and solution vector you give to the solver don't have any NaNs. > If > they don't, and you get NaNs out, then the problem likely lies with the > preconditioner, so you single step through the solver around the place > where > the preconditioner is applied and check in which operation the NaN appears. > > In your case, you seem to have already found out that it's the Chebyshev > preconditioner. The question is why. Is it because the matrix the > preconditioner uses has NaNs in it? Is it because the preconditioner makes > an > assumption that it can divide by certain matrix entries, but they are > zero? > Single stepping in a debugger will give you the answer :-) > > Best > W. > > -- > ------------------------------------------------------------------------ > Wolfgang Bangerth email: [email protected] > www: http://www.math.colostate.edu/~bangerth/ > > > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/a0326f84-a7b7-49ec-97b7-db1579574e87n%40googlegroups.com.
