[petsc-users] Incomplete Cholesky Factorization in petsc

Wenlong Gong wenlonggong at gmail.com
Tue Dec 5 09:32:17 CST 2017


Barry, Thank you for the reply! It makes sense If two IC() function returns
slightly different factored matrix. But the IC factor matrix from PETSc is
not even close to what I get from ichol in Matlab.
Ultimately I need this incomplete cholesky factorization function wrapped
in R once it gives correct result. Not sure if I used the easiest way to
get IC so I also seek for help on getting a concise version of IC().

-Wendy


On Mon, Dec 4, 2017 at 10:07 PM, Smith, Barry F. <bsmith at mcs.anl.gov> wrote:

>
>   I'm not sure what your goal is. In general two different IC(0) codes
> might produce slightly different factorizations based on implementation
> details even if they claim to run the same algorithm so I don't think there
> is a reason to try to compare the factors they produce.
>
>   In addition PETSc, as well as most IC/ILU/LU  codes store the factored
> matrices in a "non-conventional" form that is optimized for performance so
> it is not easy to just pull out the "factors" to look at them or compare
> them.
>
>     Barry
>
>
> > On Dec 4, 2017, at 9:07 PM, Wenlong Gong <wenlonggong at gmail.com> wrote:
> >
> > Hello,
> >
> > I'm trying to use the Incomplete Cholesky Factorization for a sparse
> matrix in petsc. I started with a 10*10 matrix and used ksp and pc in order
> to get the ICC(0) factor, with no fill-in, natural ordering. However, the
> returned factor matrix does not match with the answer I got from matlab
> ichol() function.
> >
> > The code with the hard-coded data is attached here. I would appreciate
> if anyone could help check if I did anything wrong.Please let me know if
> there is easier way to get this incomplete cholesky factor. Thanks!
> >
> > Best regards,
> > Wendy
> >
> > <repex.c>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171205/ac85e282/attachment-0001.html>


More information about the petsc-users mailing list