[Trilinos-Users] Multiplying an Epetra_CrsMatrix by another Epetra_CrsMatrix

Mehmet Salih YILDIRIM linux at isadamlari.org
Tue May 25 02:34:57 MDT 2010


Hi all!

I have very large Epetra_CrsMatrix matrices and I have to multiply one with
another. That is, I'm actually trying to transform a generalized
eigenproblem into a standard one, and like most of you already know, my
problem is

> A * x = B * x * \lambda
>

should be transformed into something like:

> B^{-1/2} * A * B{-1/2} * y = y * \lambda
>

It is easy to calculate B^{-1/2} since B is diagonal, but I couldn't figure
out how to do B^{-1/2} * A * B^{-1/2}  multiplication because I am not sure
if Epetra_CrsMatrix::Multiply satisfies my need here since its second and
third arguements are Epetra_Vector or Epetra_MultiVector and they are not in
the same class hierarchy with Epetra_CrsMatrix.

On the other hand, I have to keep B^{-1/2} in the memory for transofrming
the solution back into generalized problem's solution, but i don't need to
store A in the memory. A is a Teuchos::RCP<Epetra_CrsMatrix> object, so i
think deleting it would solve the problem of memory leak. Any other ideas? I
thought maybe the mutliplication result can be stored in the matrix A so
that I don't need to allocate a new matrix for result and free the matrix A.

I have to say sorry if the question is very easy but I just couldn't figure
it out.

Best regards,
Mehmet Salih YILDIRIM
Hayri Uğur KOLTUK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20100525/2eb25cfe/attachment.html 


More information about the Trilinos-Users mailing list