[petsc-users] Fwd: How can get the inverse matrix of P(transpose)AP

Cong Li solvercorleone at gmail.com
Sun Aug 18 10:20:02 CDT 2013


---------- Forwarded message ----------
From: Cong Li <solvercorleone at gmail.com>
Date: Mon, Aug 19, 2013 at 12:19 AM
Subject: Re: [petsc-users] How can get the inverse matrix of P(transpose)AP
To: Jed Brown <jedbrown at mcs.anl.gov>


Thanks for the reply.

The question I am asking here is closely related to the question I asked in
"How can I convert parall matrix to MATSEQDENSE"

Actuall I am trying to implement block cg (conjugate gradient) method for
my research.
It is like this AX=B, X and B are mxk matrices, A is mxm large sparse marix.

Given initial guess X0, R0=B-AX
P=R0
for i=1,2,...do
     gamma(i)=inv(Pi(transpose)APi)Pi(transpose)Ri
     X(i+1) = Xi +P(i) gamma(i)
.....
.....psi(i) = - inv(Pi(transpose)APi)PiA(transpose)R(i+1)
.....

So I need to get the invese of Pi(transpose)APi.

Cong


On Sun, Aug 18, 2013 at 10:15 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> Cong Li <solvercorleone at gmail.com> writes:
>
> > Hi
> >
> > I met a problem when trying to get a inverse matrix.
> >
> > The problem is like this:
> > I have a matrix P (m x k matrix, and k<<m) and a matrix A (m x m matrix,
> > large SPD matrix). Now I want to get the inverse matrix of
> > P(transpose)*A*p.
>
> Can you back up and explain at a high level what you're trying to
> accomplish?
>
> > Since P(transpose)*A*p is only a k x k matrix, and PETSc only supports
> > sequential direct solver, I want to store P(transpose)*A*p in MATSEQDENSE
> > type.
> > And the questions are
> > 1. given P and A are PETSc parallel matrix, for instance MATMPIAIJ, how
> can
> > I get sequential dense matrix P(transpose)*A*p?
> > 2. If I need to multiply P(transpose)*A*p with other parallel dense
> matrix,
> > how I can do it?
> >
> > Thanks a lot.
> >
> > Cong
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130819/bd089a80/attachment.html>


More information about the petsc-users mailing list