Condition number and Eigen Values of a Matrix

98 views
Skip to first unread message

Mohammad Sabawi

unread,
Jan 31, 2016, 1:18:01 PM1/31/16
to deal.II User Group

Hello every one,

 

How to compute the condition number and eigen values of a matrix I use it in my code in deal.II not in Trillions or PETSc? Is there any difference if  is it a block or non block matrix?

 

Best

 

Mohammad

Wolfgang Bangerth

unread,
Jan 31, 2016, 8:23:31 PM1/31/16
to dea...@googlegroups.com
On 01/31/2016 12:18 PM, Mohammad Sabawi wrote:
> **
>
> *How to compute the condition number and eigen values of a matrix I use it in
> my code in deal.II not in Trillions or PETSc? Is there any difference if is
> it a block or non block matrix?*

deal.II doesn't currently provide a way to compute eigenvalues of sparse
matrices other than through Trilinos and PETSc/Slepc (unless you're only
interested in the largest/smallest eigenvector, for which you can use the
EigenPower/EigenInverse classes).

But you could output the matrix in text format and input it into matlab, for
example, if you just want to experiment a bit.

Best
W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/

Reza Rastak

unread,
Dec 2, 2020, 11:30:42 PM12/2/20
to deal.II User Group
Dear Wolfgang,

I am trying to calculate the condition number of a Trilinos Block Sparse matrix. Is there an example of that in the documentation that you can point me to?

Thank you,

Reza

Wolfgang Bangerth

unread,
Dec 2, 2020, 11:46:32 PM12/2/20
to dea...@googlegroups.com
On 12/2/20 9:30 PM, Reza Rastak wrote:
>
> I am trying to calculate the condition number of a Trilinos Block Sparse
> matrix. Is there an example of that in the documentation that you can point me to?

No, and that's actually a quite difficult task because you have to estimate
eigenvalues. The easiest way is probably to use the power iteration and
inverse power iteration to estimate largest and smallest eigenvalues -- see
the EigenPower and EigenInverse classes.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Jean-Paul Pelteret

unread,
Dec 3, 2020, 1:57:23 PM12/3/20
to dea...@googlegroups.com

Reza Rastak

unread,
Dec 4, 2020, 11:51:51 PM12/4/20
to deal.II User Group
Thank you so much Jean-Paul. I was able to use SolverCG::connect_condition_number_slot() successfully in my code.

Best,
Reza

Reply all
Reply to author
Forward
0 new messages