[petsc-users] newbie questions on preconditioner LU
Jed Brown
jedbrown at mcs.anl.gov
Mon Jan 28 14:04:10 CST 2013
On Mon, Jan 28, 2013 at 1:50 PM, Ling Zou <lingzou80 at gmail.com> wrote:
> On Mon, Jan 28, 2013 at 12:43 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
>>
>> On Mon, Jan 28, 2013 at 1:36 PM, Ling Zou <lingzou80 at gmail.com> wrote:
>>
>>> I guess I got the impression that M is generally the same as A from
>>> reading the manual.(PETSc Users Manual, Reversion 3.3, page 71, under 4.1
>>> Using KSP)
>>>
>>> "Typically the preconditioning matrix (i.e., the matrix from which the
>>> preconditioner is to be constructed), Pmat, is the same as the matrix that
>>> defines the linear system, Amat; however, occasionally these matrices
>>> differ (for instance, when a preconditioning matrix is obtained from a
>>> lower order method than that employed to form the linear system matrix)."
>>>
>>
>> I think you are getting confused by mixed notation. A PC in PETSc is an
>> algorithm that takes a matrix (Pmat in the docs) and does some work to be
>> able to apply an operation (named "M^{-1}" in your first email). This does
>> *not* imply that M=Pmat, or that M is ever available or used, there is just
>> a a linear operation named "M^{-1}".
>>
>
> Hmmm...it's getting more complicated now.
>
It's not that bad, the notation "M^{-1}" is just misleading. Let's try
writing the preconditioned equation differently
T A x = T b
T is a linear operator defined as a _function_, not as an assembled matrix.
Now suppose there is an operation T = MakePreconditioner(SomeMatrix).
Usually T will be somehow "close" to SomeMatrix^{-1}, but this could be
very approximate. There are many different algorithms "MakePreconditioner",
but Jacobi (i.e., T = diag(SomeMatrix)^{-1}), incomplete factorization, and
domain decomposition are common cases.
When you call KSPSetOperators(ksp,A,Pmat,...), you're telling PETSc to use
T = MakePreconditioner(Pmat).
> I guess I need read the manual more carefully and study the example codes
> more. By the way, could you redirect me to an example code or a tutorial to
> understand this better?
>
The examples using Pmat different from Amat are more advanced. I recommend
just passing Pmat=Amat for now and revisit this topic later.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130128/6c40eefe/attachment.html>
More information about the petsc-users
mailing list