# Interface to kernel-independent FMM-like assembler

**URL:** <https://bempp.discourse.group/t/interface-to-kernel-independent-fmm-like-assembler/67>\
**Category:** Bempp\
**Created:** [20 February 2021 12:21 UTC](https://bempp.discourse.group/t/interface-to-kernel-independent-fmm-like-assembler/67 "2021-02-20T12:21:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![piman](https://avatars.discourse-cdn.com/v4/letter/p/a9a28c/32.png) [@piman](https://bempp.discourse.group/u/piman)\
**Post date:** [20 February 2021 12:21 UTC](https://bempp.discourse.group/t/interface-to-kernel-independent-fmm-like-assembler/67/1 "2021-02-20T12:21:30Z")

</div>

Dear bempp-cl team,

I’m thinking of using a kernel-independent FFM-like assembler to speed up EM simulation, such as [h2tools] ([Bitbucket](https://bitbucket.org/muxas/h2tools/src/master/)). To apply it, I need a function that calculates a submatrix of matrix A based on given rows and columns (sinks and sources in FMM terms). Does bempp support this interface or can it be implemented?

Thanks for any answer.

---

<div class="post-metadata">

**Author:** ![timo](https://yyz2.discourse-cdn.com/free1/user_avatar/bempp.discourse.group/timo/32/7_2.png) [@timo](https://bempp.discourse.group/u/timo)\
**Post date:** [4 March 2021 16:48 UTC](https://bempp.discourse.group/t/interface-to-kernel-independent-fmm-like-assembler/67/2 "2021-03-04T16:48:01Z")

</div>

Hi, that’s difficult to do. We provide interfaces to Exafmm as FMM library. It uses the kernel-independent FMM. However, while it works for EM simulations, the performance is not yet optimal. At the moment, we need several FMM passes to evaluate a single Maxwell kernel. We are currently working on optimisiing this. If you have a simple e-field or m-field problem it does not matter much and is still fine. But for complex transmission problems with a number of operators involved, this puts a drag on performance.

---

<div class="post-metadata">

**Author:** ![piman](https://avatars.discourse-cdn.com/v4/letter/p/a9a28c/32.png) [@piman](https://bempp.discourse.group/u/piman)\
**Post date:** [28 May 2021 08:24 UTC](https://bempp.discourse.group/t/interface-to-kernel-independent-fmm-like-assembler/67/3 "2021-05-28T08:24:41Z")

</div>

Thank you for your answer. May be the interface like this is available in bem++ 3.3.4? It looks necessary for hmatrix assembly.

---

<div class="post-metadata">

**Author:** ![piman](https://avatars.discourse-cdn.com/v4/letter/p/a9a28c/32.png) [@piman](https://bempp.discourse.group/u/piman)\
**Post date:** [28 May 2021 11:28 UTC](https://bempp.discourse.group/t/interface-to-kernel-independent-fmm-like-assembler/67/4 "2021-05-28T11:28:55Z")

</div>

Don`t you consider to use H2-matrices instead of FMM?  
They also have linear complexity, but provides summation over the grid elements at the assembling stage. While FMM require repeat of summation at each application of the matrix to vector. For 6 quadrature points on barycentrically refinemented mesh application of H2-matrix can be more then 10 times faster in my opinion.
