[petsc-users] Questions about MatConvert BAIJ to AIJ

Chung-Kan Huang ckhuangf at gmail.com
Wed Mar 18 15:14:01 CDT 2015


On Wed, Mar 18, 2015 at 3:09 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
> > On Mar 18, 2015, at 3:07 PM, Chung-Kan Huang <ckhuangf at gmail.com> wrote:
> >
> > So I guess I misunderstood the meaning of " inplace conversion".
> > and what do MAT_INITIAL_MATRIX and MAT_REUSE_MATRIX do anyway?
>
>   No you have not misunderstood it.
>
> Currently
>    MAT_REUSE_MATRIX is only supported for inplace conversion, otherwise use
>    MAT_INITIAL_MATRIX.
>
>   For testing purposes you can use MAT_INITIAL_MATRIX.
>
>
I will try to convert the matrix in a new matrix using MAT_INITIAL_MATRIX.
while
MatConvert(J, MATAIJ, MAT_INITIAL_MATRIX, & A);
will convert the matrix and port the results into a new
what does
MatConvert(J, MATAIJ, MAT_REUSE_MATRIX, & J);
actually do?

Thanks,


>
> >
> >
> >
> >
> > On Wed, Mar 18, 2015 at 2:48 PM, Jed Brown <jed at jedbrown.org> wrote:
> > 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.
> >
> >
> >
> > --
> > Cheers
> >
>
>


-- 

*Cheers*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150318/892e9798/attachment-0001.html>


More information about the petsc-users mailing list