[petsc-users] Conversion between AIJ & BAIJ

Chung-Kan Huang ckhuangf at gmail.com
Wed Jan 21 12:56:06 CST 2015


So if I do

Mat A, AB;
MatCreateAIJ(comm,m,n,M,N,d_nz, d_nnz,o_nz, o_nnz, &A);
MatSetBlockSize(AB, bs)
I can create AB as a BAIJ with block size of bs from A which is a AIJ

So from this point I can use both A and AB and they will mean the same
matrix. Am I right?

At the end of the program do I only destory one of them or both?

Do I need to worry about anything in terms of memory penalty?



On Tue, Jan 20, 2015 at 4:39 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>   You can do a MatConvert() (requires another copy of the matrix) for the
> parts that benefit from BAIJ.
>   Barry
> > On Jan 20, 2015, at 4:33 PM, Chung-Kan Huang <ckhuangf at gmail.com> wrote:
> >
> > Hi,
> >
> > Does PETSc provide means for conversion between AIJ & BAIJ.
> >
> > My matrix is created as AIJ because it makes life easy for most part of
> the applications but some part of applications actually get some benefits
> with BAIJ.  So I wonder if a matrix can exist as two idenfities and I can
> use either format depend on which one is more convenient at run time.
> >
> > So in my case the block size is fixed and identical for all blocks.
> >
> >
> > Thanks,
> >
> >
> > Kan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150121/f0cb8cdd/attachment.html>

More information about the petsc-users mailing list