[petsc-users] Using HYPRE AMG for only one of the linear eqns

Jed Brown jedbrown at mcs.anl.gov
Sat Dec 24 09:03:20 CST 2011


On Sat, Dec 24, 2011 at 07:42, TAY wee-beng <zonexo at gmail.com> wrote:

> I am solving 4 linear equations in my cfd code. I have declared them as:
>
> KSP   ksp,ksp_semi_x,ksp_semi_y,ksp_**semi_z
>
> PC    pc,pc_semi_x,pc_semi_y,pc_**semi_z
>
> PCType      ptype
>
> KSPType        ksptype
>
> However, I only want to solve the 1st eqn via hypre (thru command prompt),
> and the others via KSPBCGS.
>
> I now add:
>
> ksp_type richardson -pc_type hypre -pc_type_hypre boomeramg
>
> Are all the eqns now solved using hypre?
>
> How should I specify in the command prompt?
>

As Matt says, you can use PCFIELDSPLIT to solve the coupled system. If you
really want to set up your own KSP for each system, then use

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPSetOptionsPrefix.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111224/7dd1329e/attachment.htm>


More information about the petsc-users mailing list