CG is a better method than GMRES for symmetric positive definite problems.  

You want to use a better preconditioner.  Try '-pc_type gamg 
-pc_gamg_agg_nsmooths 1'


On Feb 19, 2013, at 11:36 AM, Marcelo Xavier Guterres <m.guterres at gmail.com> 
wrote:

> Esteemed colleagues,
> 
> 
> 
> My problem is:
> 
> Div ( Grad ( phi ) ) = 0 
> 
> mesh:
> 
> 0 < x < 1;
> 0 < y < 1;
> 
> with boundary conditions:
> 
> phi ( x , 0 ) =  x;
> phi ( 0 ,y )  =  x;
> phi ( x , 1 ) =  x;
> phi ( 1 ,y )  =  x;
> 
> with serial processing.
> 
> 
> solved with ( KSPCG x PCJACOBI ) and  (KSPGMRS x PCJACOBI). I have a 
> question, why the "norm error of the solution" of GMRES is high, when the 
> mesh is large. It is a problem in methods or truncation error?
> 
> 
> the results were:
> 
> 
> m     n       m x n   error ( KSPCG x PCJACOBI )      error ( KSPGMRS x 
> PCJACOBI )
> 3     3       9       1,92E?16        4,42E?16        
> 
> 4     4       16      2,08E?16        6,46E?16        
> 
> 5     5       25      4,41E?16        9,63E?16        
> 
> 6     6       36      8,77E?16        8,26E?16        
> 
> 7     7       49      2,37E?06        2,52E?06        
> 
> 8     8       64      1,17E?05        1,33E?05        
> 
> 9     9       81      9,32E?06        1,26E?05        
> 
> 10    10      100     7,33E?06        9,93E?06        
> 
> 20    20      400     4,22E?05        3,16E?04        
> 
> 30    30      900     1,06E?04        2,37E?02        
> 
> 40    40      1600    2,14E?04        3,77E?02        
> 
> 50    50      2500    3,37E?04        9,36E?03        
> 
> 100   100     10000   1,27E?03        6,53E?02        
> 
> 200   200     40000   4,32E?03        3,67E?01        
> 
> 300   300     90000   9,53E?02        1,02E+00        
> 
> 400   400     160000  1,68E?02        2,10E+00        
> 
> 500   500     250000  2,61E?02        3,66E+00        
> 
> 
> how can I improve the performance of GMRES?
> 
> 
> a good week for all.
> 
> 
> -- 
> Ph.d student Marcelo Xavier Guterres
> Rio de Janeiro , Brazil.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130219/d204c2be/attachment-0001.html>

Reply via email to