PCComposite is probably the answer http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCCOMPOSITE.html
The multiplicative variant will call one after the other. In order to nest it you may have to register your own custom type rather than using shell; this is doable with http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCRegister.html - Peter On Tue, Apr 22, 2014 at 9:43 AM, Qin Lu <[email protected]> wrote: > Hello, > > I need to implement a 2-stage preconditioner using PETSc linear solver: > > 1. The first stage uses a user-provided preconditioner routine. It seems I > can set it with PCShellSetApply. > 2. The second stage uses PETSc's ILU. > > Shall I just call this two preconditioners in sequence, or there is a > particular way to hook them up? Is there any sample code for this? > > Many thanks for your suggestions. > > Best Regards, > Qin >
