user's own preconditioner for PCG

Shao-Ching Huang schuang at ats.ucla.edu
Thu May 7 16:31:41 CDT 2009


Barry and Matt:

Thank you. I will look into PCSHELL.

Shao-Ching

Matthew Knepley wrote:
> On Thu, May 7, 2009 at 4:09 PM, Shao-Ching Huang <schuang at ats.ucla.edu 
> <mailto:schuang at ats.ucla.edu>> wrote:
> 
>     Hi,
> 
>     In a parallel PCG solve, is there a way to instruct PETSc to call my
>     own (serial) solver to invert the per-process, local precondition
>     matrix (as in the block-Jacobi preconditioner)?
> 
> 
> It sounds like the proper way to do this is to use -pc_type bjacobi 
> -sub_ksp_type preonly and then pull out
> then replace the block PC with a PCSHELL with wraps up your preconditioner.
> 
>   Matt
>  
> 
> 
>     Is there an example/documentation that I can follow? Which part of
>     code should I start looking at?
> 
>     We are trying to determine if there is any value to use the
>     aforementioned customized preconditioner as compared to the general
>     ones in PETSc and to DMMG, for this particular matrix at hand. This
>     is a structured mesh problem.
> 
>     Thank you.
> 
>     Shao-Ching
> 
> -- 
> 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


More information about the petsc-users mailing list