Dear folks, I hope you're having a nice day. For the Poisson solver in /src/ksp/ksp/example/tutorial/ex45.c, I used the ksp_type = CG to solve it before; it converges very fast with pc_type = gamg. However, I was trying to check if the matrix generated by the 'ComputeMatrix' is symmetric by using "ierr = MatIsSymmetric(B, tol, &flg);". It shows that this matrix is not exact a symmetric one by setting tol = 0.0. Yet, the matrix is 'symmetric' if the tol > 0.01. Does this mean that, even if the matrix is not exact symmetric, the CG could still be used. This brings me a question. Can the CG be used to solve an actual unsymmetric matrix as long as 'MatIsSymmetric' returns a 'PETSC_TRUE' value with certain tolerance. Is there any rule of thumb for this tolerence? Also, as a preconditioner, does 'gamg' only work for symmetric positive-definite matrix? or it works for any matrix or even with GMRES?
thanks, Alan
