how to inverse a sparse matrix in Petsc?
Matthew Knepley
knepley at gmail.com
Mon Feb 4 12:25:51 CST 2008
On Feb 4, 2008 12:20 PM, Yujie <recrusader at gmail.com> wrote:
> what is the difference between sequantial and parallel AIJ matrix? Assuming
> there is a matrix A, if I partitaion this matrix into A1, A2, Ai... An.
> A is a parallel AIJ matrix at the whole view, Ai is a sequential AIJ matrix?
We mean parallel CSR format, which is described in the book Iterative Methods
for Sparse Linear Systems by Yousef Saad as well as in the PETSc manual.
> I want to operate Ai at each node.
> In addition, whether is it possible to get general inverse using
> MatMatSolve() if the matrix is not square? Thanks a lot.
Rectangular matrices do not have inverses in that sense. You may want some
sort of pseudo-inverse, but it must be motivated by the problem you are solving.
Matt
> Regards,
> Yujie
>
>
> On 2/4/08, Barry Smith <bsmith at mcs.anl.gov> wrote:
> >
> > For sequential AIJ matrices you can fill the B matrix with the
> > identity and then use
> > MatMatSolve().
> >
> > Note since the inverse of a sparse matrix is dense the B matrix is
> > a SeqDense matrix.
> >
> > Barry
> >
> > On Feb 4, 2008, at 12:37 AM, Yujie wrote:
> >
> > > Hi,
> > > Now, I want to inverse a sparse matrix. I have browsed the manual,
> > > however, I can't find some information. could you give me some advice?
> > >
> > > thanks a lot.
> > >
> > > Regards,
> > > Yujie
> > >
> >
> >
>
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener
More information about the petsc-users
mailing list