[petsc-users] A question on the PETSc options for non-uniform grid
Zhenglun (Alan) Wei
zhenglun.wei at gmail.com
Fri Mar 29 17:05:59 CDT 2013
Dear All,
I hope you're having a nice day.
Based on ksp ex45, a 3D Poisson solver with non-uniform grid is coded.
The PETSc options I used is:
/mpiexec -np 32 ./ex45 -pc_type gamg -ksp_type cg -pc_gamg_type agg
-pc_gamg_agg_nsmooths 1 -mg_levels_ksp_max_it 1 -mg_levels_ksp_type
richardson -ksp_rtol 1.0e-7/
There are some problems:
1, if the mesh is very coarse with very small amount of the grid, the
code runs well;
2, if the mesh is fine, an error message comes up saying 'un-symmetric
graph'. It suggests me to use '-pc_gamg_sym_graph true' or
'-pc_gamg_thredhold 0.0'.
a) if '-pc_gamg_sym_graph true' is used, the code runs but blows up very
quickly with crazy norm;
b) if '-pc_gamg_thredhold 0.0' is used, the code stops on the KSPSolve()
forever;
3, because of the 'un-symmetric graph' error, it reminds me that the
matrix may not be symmetric, which indicates that '-ksp_type cg' may not
be a good option. Therefore, I changed it to '-ksp_type gmres'. It makes
the code run with 'moderate fine' mesh. However, it stops at KSPSolve()
also with fine mesh.
a) does there any other '-ksp_type' fit better for this case?
b) does multigrid preconditioner work well for gmres?
thanks,
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130329/614cf098/attachment.html>
More information about the petsc-users
mailing list