[Trilinos-Users] math operation on Epetra_CrsMatrix

Heroux, Michael A maherou at sandia.gov
Tue Feb 17 21:01:21 MST 2015


Deepak,

You can extract a copy of the matrix diagonal into an Epetra Vector using this method:

int Epetra_CrsMatrix::ExtractDiagonalCopy (Epetra_Vector<http://trilinos.org/docs/dev/packages/epetra/doc/html/classEpetra__Vector.html> & Diagonal)const

Documented here:

http://trilinos.org/docs/dev/packages/epetra/doc/html/classEpetra__CrsMatrix.html#ac507a69c2f8d5aa7e42fde8ecc626a07

If you need the action of the inverse values, you can use this method:

int Epetra_MultiVector::ReciprocalMultiply ( double ScalarAB,
const Epetra_MultiVector & A,
const Epetra_MultiVector & B,
double ScalarThis
)

Documented here:

http://trilinos.org/docs/dev/packages/epetra/doc/html/classEpetra__MultiVector.html#ae9641adfac464747124c955f59474299

If you need the actual reciprocal values, use this method:

int Epetra_MultiVector::Reciprocal ( const Epetra_MultiVector & A )

Documented here:

http://trilinos.org/docs/dev/packages/epetra/doc/html/classEpetra__MultiVector.html#a2bd5ea6f0e1cf7742db18065f6d5e687

Mike

From: Deepak Garg <deepak.garg at ingv.it<mailto:deepak.garg at ingv.it>>
Date: Tuesday, February 17, 2015 at 9:54 AM
To: "trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>" <trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>>
Subject: [EXTERNAL] [Trilinos-Users] math operation on Epetra_CrsMatrix

I have an Epetra_CrsMatrix A. I need to compute the inverse of diagonal of this matrix. i.e.  for

Epetra_CrsMatrix  A

I want to compute  Inverse( diagonal(A) ).

What should I write to compute this?



Regards
Deepak Garg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20150218/984f1f5f/attachment.html>


More information about the Trilinos-Users mailing list