
[Sponsors] 
March 23, 2009, 02:18 
petsc and diverge

#1 
New Member
leping chen
Join Date: Mar 2009
Location: china
Posts: 19
Rep Power: 9 
hi,i have a problem in using petsc to compute 3D FEA.my linear systems always diverge when i use others solution methods except for lu.as you konw, there are many solution methods in petsc, such as bcgs,gmres,cg......,but they really don't adapt to my situation. And when using lu as pc or ksp, memory becomes the bottleneck. anybody can help me? thank you very much!


March 23, 2009, 02:56 

#2 
Member
MrFluent
Join Date: Mar 2009
Posts: 33
Rep Power: 9 
make sure that what you are solving has diagonal dominance in matrix.
it seems that your matrix does not have this property, LU methods are somewhat less sensitive to this issue. 

March 23, 2009, 03:17 

#3 
New Member
leping chen
Join Date: Mar 2009
Location: china
Posts: 19
Rep Power: 9 
you mean to LU less sensitive to diagonal dominance in matrix? I cannot clearly understand your meaning. i cannot make sure my matrix is diagonal dominance, but i guess it is, beause FEM's matrix is general diagonal dominance.if diagonal dominance, whether or not the solution is easier? or reverse.


March 23, 2009, 03:34 

#4  
Member
MrFluent
Join Date: Mar 2009
Posts: 33
Rep Power: 9 
Quote:
the reason i said about diagonal dominance is because you said nothing else is working. If matrix is diagonally dominant, even a normal method like gauss siedel would show some convergence. (though it would be slow for large cases). 

March 23, 2009, 03:46 

#5 
New Member
leping chen
Join Date: Mar 2009
Location: china
Posts: 19
Rep Power: 9 
thank you very much!
my work is about 3D dynamic FEA,and use PETSc to solve Ax=b.but now i find when i use direct method(namely LU),without sufficient memory.When I select iterative method, the result is always diverge,such as sor, cg, gmres etc..so i am confusing. 

March 23, 2009, 03:50 

#6 
Member
MrFluent
Join Date: Mar 2009
Posts: 33
Rep Power: 9 
is there any way for you to print the matrix and then check if ap > sum(ali).


March 23, 2009, 04:02 

#7 
New Member
leping chen
Join Date: Mar 2009
Location: china
Posts: 19
Rep Power: 9 
Thank you!
I don't care if ap > sum(ali) and i also don't know what is ap or sum(ali)?But,i guess i can do it by matlab.But my current problem is how to solve the scalable sparse matrix?because direct method has not enough compute memory,iterative method can not converge(i tried many iterative methods of PETSc). whether or not you have some experiences in PETSc? Thank you again! 

March 23, 2009, 06:38 

#8  
Member
MrFluent
Join Date: Mar 2009
Posts: 33
Rep Power: 9 
Quote:
if you have written in little bit more detail about equations you are solving it might be possible to something. 

March 23, 2009, 08:23 

#9 
New Member
leping chen
Join Date: Mar 2009
Location: china
Posts: 19
Rep Power: 9 
Thanks a lot! I will try lsqr tomorrow! Before, I learned bicgstab or GMRES is a better iterative method for asymmetric matrix,but they were useless to my matrix. CG or PCG is very good for symmetric positive definite matrix, however, my matrix is symmetric and indefinite.Today, to my surprised, I found each diagonal entity of my matrix approximately equals to absolute value of sum of each row all entities. The determinant is infinite, and condition also is very great.Now, I think the best method is find for a preconditioner.Do you think? thank you very much!thank your help. you are welcome if you need more matrix information!


March 23, 2009, 20:39 

#10 
New Member
leping chen
Join Date: Mar 2009
Location: china
Posts: 19
Rep Power: 9 
lsqr is very slower, iteration is up to 70000.


March 23, 2009, 20:54 

#11 
Member
MrFluent
Join Date: Mar 2009
Posts: 33
Rep Power: 9 
this is why use it only if you wish to solve it once. it you have to solve it again and again.


March 23, 2009, 20:59 

#12 
New Member
leping chen
Join Date: Mar 2009
Location: china
Posts: 19
Rep Power: 9 
can you speak chinese?


March 23, 2009, 21:23 

#13 
Member
MrFluent
Join Date: Mar 2009
Posts: 33
Rep Power: 9 

March 24, 2009, 07:38 
Preconditioners for indefinite problems

#14  
Member
Jed Brown
Join Date: Mar 2009
Posts: 56
Rep Power: 11 
Quote:
Code:
ksp_gmres_restart 300 Since your matrix is indefinite, it's quite likely that no blackbox preconditioner will work well. One method that is fairly reliable if your matrix isn't terribly conditioned is sparse approximate inverse. You can select this with Code:
pc_type hypre pc_hypre_type parasails Code:
pc_type spai Another poorman's solution is to use a Schwarz preconditioner with exact (LU) solves in each subdomain. The theory doesn't guarantee that this will converge, but in practice it often works, although usually with suboptimal convergence rates. Use Code:
pc_type asm sub_pc_type lu Code:
pc_asm_blocks Code:
sub_pc_factor_mat_solver_package mumps Code:
sub_pc_factor_mat_solver_package umfpack A good general reference for indefinite problems is Code:
@article{benzi2005nss, title={{Numerical solution of saddle point problems}}, author={Benzi, M. and Golub, G.H. and Liesen, J.}, journal={Acta Numerica}, volume={14}, pages={1137}, year={2005}, publisher={Cambridge Univ Press} } Code:
@article{elman2008tcp, title={{A taxonomy and comparison of parallel block multilevel preconditioners for the incompressible NavierStokes equations}}, author={Elman, H.C. and Howle, V.E. and Shadid, J. and Shuttleworth, R. and Tuminaro, R.}, journal={Journal of Computational Physics}, volume={227}, number={1}, pages={17901808}, year={2008}, publisher={Academic Press} } 

March 24, 2009, 07:41 
PETSc mailing list

#15 
Member
Jed Brown
Join Date: Mar 2009
Posts: 56
Rep Power: 11 
Also, the PETSc mailing list http://lists.mcs.anl.gov/pipermail/petscusers/ is a very good place to ask questions like this. Provide as much detail as possible and exact error messages.


March 24, 2009, 08:39 

#16 
New Member
leping chen
Join Date: Mar 2009
Location: china
Posts: 19
Rep Power: 9 
Thank you very much!
GMRES and other iterative methods all cann't obtain convergence to my problem, unless select lu as a pc or only use lu as a ksp,however, memory becomes new bottleneck again. PETSc team recommends MUMPS,but I find MUMPS cannot be compatible with fortran 77. My program need compute eigenvalues, so I utilize arpack package and it is only compatible with fortran 77. I also want to use hypre,but I don't know how to use? Whether or not after I install hypre, I can utilize hypre by pc_type hypre pc_hypre_type parasails at once or I need modify my program yet? I am short of relevant informations and experiences.Can you help me? My program is about vibration analysis of anisotropic material.I compute eigenvalue by arpack package.But in arpack, I need utilize own program to compute Ax=b,so I select PETSc package to do it.After several attempts, I only find, if convergence, ksp or pc must include lu. 

March 24, 2009, 12:36 

#17  
Member
Jed Brown
Join Date: Mar 2009
Posts: 56
Rep Power: 11 
Quote:
After building PETSc with Hypre, you can control it on the command line; no code modification is necessary. Run with help to see what options are available with the current solver combination (piping through grep is helpful). A more flexible and scalable eigensolver is SLEPc. It uses PETSc data structures and brings the same flexibility to eigenproblems. It provides a uniform interface to several thirdparty solvers including ARPACK. 

Thread Tools  
Display Modes  

