[petsc-users] Questions about MatConvert BAIJ to AIJ

Jed Brown jed at jedbrown.org
Wed Mar 18 14:48:54 CDT 2015


Chung-Kan Huang <ckhuangf at gmail.com> writes:

> Yes, I was suprised that I can still use MatSetValuesBlocked after I did
> MatConvert MATBAIJ to MATAIJ.
>
> Then I just found the mat type is still seqbaij which means the MatConvert
> didn't work.
>
> This is how I did MatConvert
>
> MatConvert(J, MATAIJ, MAT_REUSE_MATRIX, & J);
>
> where J is my Jacobian matrix.

Seems to me this should fail because you didn't MatConvert this matrix
yet.  Anyway, you should use MAT_INITIAL_MATRIX and put the result in a
new Mat.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150318/0f39d45a/attachment.pgp>


More information about the petsc-users mailing list