# [Trilinos-Users] How to scale the diagonal of a crs matrix and extract it to a array.

Heroux, Michael A maherou at sandia.gov
Mon Aug 14 10:23:37 EDT 2017

```Here is a method for extracting the diagonal:

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

If you mean scaling the matrix by the diagonal, here is the left scaling method:

https://trilinos.org/docs/dev/packages/epetra/doc/html/classEpetra__CrsMatrix.html#a100330317094dc8a19f8feb73b5f0b87

There is a similar right scaling method:

https://trilinos.org/docs/dev/packages/epetra/doc/html/classEpetra__CrsMatrix.html#a136bb231cfe4bb129c6754f224eb0889

There are also methods to help with other scalings: InvRowSums(), InvRowMaxs(), InvColSums(), InvColMaxs()

Mike

From: Trilinos-Users <trilinos-users-bounces at trilinos.org> on behalf of ztdepyahoo <ztdepyahoo at gmail.com>
Date: Wednesday, August 9, 2017 at 7:55 AM
To: Trilinos Users <trilinos-users at trilinos.org>
Subject: [EXTERNAL] [Trilinos-Users] How to scale the diagonal of a crs matrix and extract it to a array.

Dear group:
How to scale the diagonal of a crs matrix and extract it to a array with Epetra.

Regards

________________________________
ztdepyahoo at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20170814/b224953d/attachment.html>
```