Solve for eigenvalues for small matrix in serial

31 views
Skip to first unread message

Pai Liu

unread,
Dec 19, 2019, 10:23:54 PM12/19/19
to deal.II User Group
Hi all,
In my parallel code, I want to solve the eigenvalues of a small matrix (e.g. 3 by 3) in serial on each processor.

I know Step-36 depends on MPI communication to create the eigenfunctions and to solve the problem, BUT I only need to compute the eigenvalues of a small matrix in serial on each processor.

So, is there a easy way to do this, perferly with matrix type FullMatrix<double>?

Actually I also have a look at the function "EigenInverse (SolverControl &cn, VectorMemory< VectorType > &mem, const AdditionalData &data=AdditionalData())", which may be a good choice.
But I do not understand the description of the second parameter "VectorMemory< VectorType > &mem", and thus I dont know how to use this solve function. Maybe someone can show me an example of this function.

Many thanks in advance.

Jean-Paul Pelteret

unread,
Dec 20, 2019, 2:26:24 AM12/20/19
to dea...@googlegroups.com
Hi Pai,

If you’ve got LAPACK installed then the LAPACKFullMatrix class is able to do the job for you. It has several methods implemented to compute eigenvalues, and you’d then use the eigenvalue() method to retrieve each eigenvalue.

I hope this helps.
Best,
Jean-Paul

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/bfbea22e-6525-436a-aee6-0b073a1692a6%40googlegroups.com.

Wolfgang Bangerth

unread,
Dec 21, 2019, 12:17:27 AM12/21/19
to dea...@googlegroups.com
On 12/19/19 8:23 PM, Pai Liu wrote:
> In my parallel code, I want to solve the eigenvalues of a small matrix (e.g. 3
> by 3) in serial on each processor.

In addition to Jean-Paul's answer, if your 3x3 matrix is symmetric, you can
also put the entries into an object of type SymmetriTensor<2,3> for which
there is an eigenvalues() function.

Best
W.

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

Pai Liu

unread,
Dec 25, 2019, 5:25:35 PM12/25/19
to deal.II User Group

Thanks very much!
Reply all
Reply to author
Forward
0 new messages