Dear Najwa, 

You don’t need to create the inverse of A. Just its action, pretty much in the exact same way you did for the mass matrix, but replacing the inverse operator done with umfpack with one done with CG. 

Luca

Il giorno 2 giu 2024, alle ore 09:42, Najwa Alshehri <najwaalshe...@gmail.com> ha scritto:

Wolfgang and all,

I have a positive definite matrix M, and its inverse can be quickly and easily found in deal.II using the following lines:

M_inv_umfpack.initialize(M);
auto M = linear_operator(M);
auto M_inv = linear_operator(M, M_inv_umfpack);

However, when solving the direct system, I need to provide the inverse of AA to the Arpack solver. This requires solving the system using the Conjugate Gradient (CG) method a number of times equal to the size of AA. As the mesh is refined, this size increases, and depending on the finite element method (FE) I am using, it could be even larger.

While I have been able to obtain at least the first three results for many FEs I am testing which is enough for the current study, I am seeking a faster solution for a general eigenvalue problem of the same type. If anyone has suggestions for a more efficient approach to finding the inverse of AA, I would greatly appreciate it.

One more time, you have always been great supporters. This group is very useful. Thank you to you Wolfgang, to Mathias for the answer, and to all members and developers of deal.ii.

Best regards,
Najwa




On Saturday, June 1, 2024 at 11:57:45 PM UTC+3 Wolfgang Bangerth wrote:
On 6/1/24 14:49, Najwa Alshehri wrote:
>
> I decided to solve the exact problem directly, namely AA x = \lambda M x. To
> achieve this, I computed the inverse of the matrix AA= Bt * A^inv *  B using a
> Conjugate Gradient (CG) solver. Subsequently, I solved for the exact
> eigenvalues, and to my satisfaction, I obtained results that aligned with
> those obtained from MATLAB.
>
> If anyone has insights into why solving for the reciprocal yields different
> results, I would greatly appreciate your input on this matter.

Najwa,
I'm glad you figured it out because I don't really have a good idea about what
ARPACK does. Typically,
AA x = \lambda M x
is solved in exactly this way because M may be a matrix that is singular. In
many applications (not sure whether yours is one of those), M is a matrix that
can have a large null-space -- for example, if you are computing eigenvalues
of the Stokes operator, in some applications you have that M = [M_u 0 ; 0 0],
that is, it has a large null block on all pressures. This matrix is not
invertible, whereas AA is. By convention, the invertible matrix is kept on the
left side of the eigenvalue equation.

Best
W.

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


--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/e448210c-be8d-4460-8b41-27a4425f7accn%40googlegroups.com.

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/9418C7C6-D6E9-4BFE-96CC-EAB9C9C122D5%40gmail.com.

Reply via email to