<div class="gmail_quote">On Wed, Feb 9, 2011 at 17:44, Peter Wang <span dir="ltr">&lt;<a href="mailto:pengxwang@hotmail.com">pengxwang@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>Did you mean All the Krylov methods alone will get worse with increasing grid number?</div></blockquote><div><br></div><div>Yes, the number of Krylov iterations for second order elliptic problems with no preconditioner scales proportional to the number of grid points in any direction. You need a spectrally equivalent preconditioner, usually multigrid of some sort, to prevent this.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div> Since the finer grid has smaller size and more number of grid.<br>
 <br>
   Since I am a new user of PETSc, the easiest way for me is still keep in KSP solver. However, if the solver cannot satisfy the speed reqirement. I am thinking to use MG method. However, I don&#39;t have any experience on multigrid. Could you please give me some suggestion on it? <br>

 <br>
 1, Since I  have built the Matrix and the vector for finite difference scheme in KSP solver, where should I start from to transfer to multigrid?  I studied the example in: src/ksp/ksp/examples/tutorials/ex22f.F. Is it a good prototype to be based on to create my own code?  Is DMMG is the best tool for my problem?<br>
</div></blockquote><div><br></div><div>Assuming you currently assemble a matrix, just configure PETSc with --download-ml and --download-hypre, then try running your code with -pc_type ml or -pc_type hypre. You can use geometric multigrid later to improve the constants or handle cases where algebraic multigrid (ML or BoomerAMG from Hypre) are having trouble.</div>
<div><br></div><div>You need to tell us what equations you are solving if you want useful suggestions.</div></div>