AIJ and BAIJ convertion
SUN Chun
Chun.SUN at 3ds.com
Tue May 5 10:31:29 CDT 2009
Thanks Hong and Satish,
Unfortunately I did use MatCreateMPIAIJ. It's difficult to change that part of my code. Plus I have matrices dumped out with AIJ format and I want to read it as BAIJ. It seems that I have no option other than MatCreateMPIBAIJ then MatSetBlockSize then add entries one by one...?
I was reading MatCopy and it says A and B should have same nnz pattern, which won't happen between AIJ and BAIJ. Also I was reading MatConvert, but it allocates new matrix for you without asking blocksize. I'm not sure either of them can do this.
Thanks,
Chun
-----Original Message-----
From: petsc-users-bounces at mcs.anl.gov [mailto:petsc-users-bounces at mcs.anl.gov] On Behalf Of Satish Balay
Sent: Tuesday, May 05, 2009 11:18 AM
To: PETSc users list
Subject: Re: AIJ and BAIJ convertion
This is assuming MatCreate() is used - not MatCreateMPIAIJ()..
Satish
On Tue, 5 May 2009, Hong Zhang wrote:
>
> Run your code with the option
> '-mat_type baij -mat_block_size 6'
> You can use '-mat_view_info' to varify the matrix type
> that is actually used.
>
> Hong
>
> On Tue, 5 May 2009, SUN Chun wrote:
>
> > Hi,
> >
> > I created a matrix with AIJ format. I knew the structure of this matrix
> > should also fit BAIJ type with some certain block size (say 6). Now instead
> > of creating another BAIJ matrix then fill in the values again, do I have an
> > easier way to convert this AIJ matrix to BAIJ matrix with given block size?
> > I'm willing to allocate another memory for the new matrix.
> >
> > Thanks,
> > Chun
> >
>
More information about the petsc-users
mailing list