[petsc-users] I am wondering if there is a way to implement SPMM
Patrick Sanan
patrick.sanan at gmail.com
Tue Aug 4 04:46:31 CDT 2015
On Tue, Aug 04, 2015 at 06:09:30PM +0900, Cong Li wrote:
> I am sorry that I should have explained it more clearly.
> Actually I want to compute a recurrence.
>
> Like, I want to firstly compute A*X1=B1, and then calculate A*B1=B2,
> A*B2=B3 and so on.
> Finally I want to combine all these results into a bigger matrix C=[B1,B2
> ...]
>
> Is there any way to do this efficiently.
With no other information about your problem, one literal solution might be to use MATNEST to define C once you have computed B1,B2,..
However, this invites questions about what you plan to do with C and whether you require explicit representations of some or all of these matrices, and what problem sizes you are considering.
>
>
>
> On Tue, Aug 4, 2015 at 5:45 PM, Patrick Sanan <patrick.sanan at gmail.com>
> wrote:
>
> > On Tue, Aug 04, 2015 at 03:42:14PM +0900, Cong Li wrote:
> > > Thanks for your reply.
> > >
> > > I have an other question.
> > > I want to do SPMM several times and combine result matrices into one
> > bigger
> > > matrix.
> > > for example
> > > I firstly calculate AX1=B1, AX2=B2 ...
> > > then I want to combine B1, B2.. to get a C, where C=[B1,B2...]
> > >
> > > Could you please suggest a way of how to do this.
> > This is just linear algebra, nothing to do with PETSc specifically.
> > A * [X1, X2, ... ] = [AX1, AX2, ...]
> > >
> > > Thanks
> > >
> > > Cong Li
> > >
> > > On Tue, Aug 4, 2015 at 3:27 PM, Jed Brown <jed at jedbrown.org> wrote:
> > >
> > > > Cong Li <solvercorleone at gmail.com> writes:
> > > >
> > > > > Hello,
> > > > >
> > > > > I am a PhD student using PETsc for my research.
> > > > > I am wondering if there is a way to implement SPMM (Sparse
> > matrix-matrix
> > > > > multiplication) by using PETSc.
> > > >
> > > >
> > > >
> > http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMatMult.html
> > > >
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150804/82a5d226/attachment-0001.pgp>
More information about the petsc-users
mailing list