>From the output of the command ./ex19 -help | grep -A5 ksp_type, I can see the 
>possible Krylov method options:
 cg groppcg pipecg cgne nash stcg gltr richardson chebyshev gmres tcqmr bcgs 
ibcgs fbcgs fbcgsr bcgsl cgs tfqmr cr pipecr lsqr preonly qcg bicg fgmres 
minres symmlq lgmres lcd gcr pgmres specest dgmres (KSPSetType)

The multigrid method does not belong to the Krylov methods so it is not there. 
I'm wondering which option should I specify if I want to use multigrid and 
hence the NonlinearGS smoother? 


________________________________________
From: Jed Brown [[email protected]]
Sent: Thursday, June 05, 2014 10:36 AM
To: Sun, Hui; [email protected]
Subject: Re: [petsc-users] questions on KSP solver and preconditioning

"Sun, Hui" <[email protected]> writes:

> Hello, I'm reading ex19.c from examples under directory snes. The version I'm 
> using is 3.3. In the code, a user defined function NonlinearGS is 
> implemented, and is registered thru the command
> ierr = SNESSetGS(snes, NonlinearGS, (void*)&user);CHKERRQ(ierr);
>
> I'm wondering if this only serves as a preconditioner? Because I read
> from the output that the default ksp solver is gmres. I'm also
> wondering what shall I do if I want to make the user defined
> NonlinearGS the actual solver instead of the preconditioner?

NonlinearGS is primarily used as a smoother in nonlinear multigrid
(FAS).  It is not used by the default configuration.

> From the discussion a few days ago, I knew that by specifying option
> -ksp_type gmres or -ksp_type bcgs, you use gmres or bcgs as your
> solvers, where then can I find a database for the ksp solvers?

  ./ex19 -help | grep -A5 ksp_type

this will output a list of available KSPs.

Reply via email to