<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Thanks a lot, Jed,<BR>
<BR>
I will try the algebric multigrid first. <BR>
<BR>
In order to configure PETSc with --download-ml and --download-hypre,which shell file in unix should I modify?<BR>
<BR>
Should I add some line in my current code to run with -pc_type ml or -pc_type hypre, or just use runtime option? <BR>
<BR>
I am solving a 2-D poisson equation with finite difference scheme. Please find the problem discription as attached if it is necessary. Thanks again.<BR>
<BR>
<BR> <BR>
<HR id=stopSpelling>
Date: Wed, 9 Feb 2011 17:54:19 +0100<BR>From: jed@59A2.org<BR>To: petsc-users@mcs.anl.gov<BR>Subject: Re: [petsc-users] questions about the multigrid framework<BR><BR>
<DIV class=ecxgmail_quote>On Wed, Feb 9, 2011 at 17:44, Peter Wang <SPAN dir=ltr><<A href="mailto:pengxwang@hotmail.com">pengxwang@hotmail.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=ecxgmail_quote style="PADDING-LEFT: 1ex; BORDER-LEFT: #ccc 1px solid">
<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=ecxgmail_quote style="PADDING-LEFT: 1ex; BORDER-LEFT: #ccc 1px solid">
<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'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>                                            </body>
</html>