Matrix Free alternatives in dealii

105 views
Skip to first unread message

Felipe Ponce

unread,
May 18, 2024, 1:38:26 AM5/18/24
to deal.II User Group
I am implementing a Fast Multipole Method (FMM) in deal ii.

I do not want to store a dense matrix, but lower rank matrices and to use matrix free methods. By now, I store the elements of the low-rank matrices, and I want to retrieve them to compute the action of the operator in a vector.

What is the easiest way to implement a matrix free solver with GMRES (non-symmetric matrix)?

I have considered the MatrixFree class and also the Trilinos Wrapper. However, the MatrixFree class seems to be implemented for parallel computing the elements of the matrix on the fly (I am happy with a look-up table), and Trilinos is a bit scary for me (I can try if no other option). Am I forced to use parallel computing to get access to Matrix Free algorithms in deal ii?

Luca Heltai

unread,
May 18, 2024, 2:46:36 AM5/18/24
to dea...@googlegroups.com
Dear Felipe,

Gmres (and all other iterative methods) in deal.Ii is already matrix free. It never accesses the matrix , only its matrix vector method.  

FMM has already been implemented in deal.II and it is available in the repository pi-BEM. Take a look there for inspiration. 

If you know how to compute the action of your fmm method, just assign it to a LinearOperator object ‘vmult’ function, and then call gmres with that:

auto FMM = linear_operator(exemplar_matrix);

FMM.vmult = [&](auto &dst, const auto &src) {
// call here what you need to set dst equal to the action of FMM on src
}

Now you can use FMM with gmres. 

Best,
Luca. 

Il giorno 18 mag 2024, alle ore 07:38, Felipe Ponce <fepo...@gmail.com> ha scritto:


--
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/58416b47-4e76-426e-81f5-a37dc4dae150n%40googlegroups.com.

Felipe Ponce

unread,
May 23, 2024, 9:07:25 AM5/23/24
to dea...@googlegroups.com
Dear Heltai,

 It is really helpful. I was also drawing inspiration from deal ii tutorial step 34. In pi-BEM, I guess the more relevant file for me is bem_fma.

Thank you so much!

Reply all
Reply to author
Forward
0 new messages