On Wed, Mar 21, 2018 at 6:12 AM, Matthew Knepley <[email protected]> wrote:
> On Wed, Mar 21, 2018 at 9:07 AM, 我 <[email protected]> wrote: > >> Thanks for your reply! You mean the preconditioner must be the necessary >> choice for the linear iterative method in PETSc? >> > > No. As you saw, you can use no preconditioner. The bad convergence has > nothing to do with PETSc. It is a mathematical fact. All > iterative methods behave this way. > > >> And the default preconditioner in PETSC is which one? >> > > ILU(0). > Let me also point out: If you want to know all of the details of what solvers and preconditioners are being used, you can run with "-ksp_view" and you will be given all of the details of what PETSc is using. If you are using SNES to solve nonlinear problems, then you can also do "-snes_view". --Richard > > >> I want to compare them in order to illustrate that PCHYPRE is best one >> for my problem. >> > > Then the right thing to do is read some papers and reproduce what other > people have done, and show that Hypre is better than that. > > >> If I want to get the matrix after preconditioned (e.g. PAx=Pb, and I want >> to get PA), is there a function in PETSc? >> > > http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/ > KSPComputeExplicitOperator.html > > It is extremely expensive and should only be used for very small problems. > The whole idea of iterative methods is that you do > NOT compute this operator explicitly. > > Matt > > >> Thanks again! >> Daye >> >> >> >> >> At 2018-03-21 18:45:18, "Matthew Knepley" <[email protected]> wrote: >> >> On Wed, Mar 21, 2018 at 3:35 AM, 我 <[email protected]> wrote: >> >>> Hi, >>> I want to compare the time cost between preconditioner and >>> unpreconditioner in PETSc. But I didn't know how to turn off the >>> preconditioner in Petsc. If I choose the PCNONE, but the solution even can >>> not converge. >>> >> >> That is how you turn off a preconditioner, -pc_type none. Without a >> preconditioner, almost nothing converges. You can't have it both ways. >> >> Thanks, >> >> Matt >> >> >>> If I do not declare PC at the beginning of my program, will PETSc choose >>> a default preconditioner? I just want to turn off it. Any suggestions? >>> Thank you very much! >>> Daye >>> >>> >>> >>> >> >> >> >> -- >> What most experimenters take for granted before they begin their >> experiments is infinitely more interesting than any results to which their >> experiments lead. >> -- Norbert Wiener >> >> https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/> >> >> >> >> >> > > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/> >
