[petsc-users] How to decompose and record a constant A

Dave May dave.mayhem23 at gmail.com
Tue Apr 9 08:32:33 CDT 2019


On Tue, 9 Apr 2019 at 10:33, Mark Adams via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> PETSc solvers will cache any setup computations, like a matrix
> factorization, and will reuse them on subsequent solves.
>
> If you call KSPSetOperators, PETSc will assume its cache is invalid and
> redo any required setup on subsequent solves.
>

Following from what Mark said, if you want an exact solve, use -pc_type lu.
Note that this will not store the inverse, rather only the L, U factors.
During setup, the L,U factors are created and subsequent solves will simply
apply the forward and backward solves using these factors.



> Mark
>
> On Tue, Apr 9, 2019 at 4:08 AM ztdepyahoo via petsc-users <
> petsc-users at mcs.anl.gov> wrote:
>
>> Dear group:
>>       I need to solve a Laplacian problem Ax=b every time step where A is
>> a constant . I want to store the inverse of A at the first time step.
>> how to do with Petsc
>>  Regards
>>
>> ztdepyahoo
>> ztdepyahoo at gmail.com
>>
>> <https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=ztdepyahoo&uid=ztdepyahoo%40gmail.com&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fqiyelogo%2FdefaultAvatar.png&items=%5B%22ztdepyahoo%40gmail.com%22%5D>
>> 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail81> 定制
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190409/11e90c62/attachment.html>


More information about the petsc-users mailing list