[petsc-users] Pre-conditioners in PETSc

Ethan Coon ecoon at lanl.gov
Tue Feb 22 11:14:35 CST 2011


On Tue, 2011-02-22 at 12:06 -0500, Gaurish Telang wrote:
> I am quite confused on using pre-conditioners in PETSc
> 
> (1)
> When we use KSPSetOperators(KSP ksp,Mat Amat,Mat Pmat,MatStructure flag), why does the manual page say that Pmat is usually the same as Amat? 
> 
> Is Pmat the preconditioning matrix itself, or is Pmat a matrix to which preconditioning techniques must be applied via "-pc_type <option_name>" ? 

The 2nd.  Pmat is NOT the approximate inverse of Amat, it is a matrix
whose approximate inverse will be used to multiple Amat before the KSP
is used.
> 
> (2)
> Also suppose the succeeding statement of KSPSetOperators is KSPSetFromOptions(ksp_context) and I pass "-pc_type none" at the terminal, would this mean that Pmat is not at all needed
> 
> in PETSc's calculations?? 

Correct, pmat is not used in that case.  In that case, you still have to
pass something in to KSPSetOperators, so Amat for both is the likely
choice.


Ethan

> 
> Thank you,
> 
> Gaurish
> 
> 
> 
> 
> 

-- 
------------------------------------
Ethan Coon
Post-Doctoral Researcher
Applied Mathematics - T-5
Los Alamos National Laboratory
505-665-8289

http://www.ldeo.columbia.edu/~ecoon/
------------------------------------



More information about the petsc-users mailing list