Coupled FE-BI

Good morning NGSolve community

I’ve been reading through the documentation and tutorials of NGSolve to see if it’s possible to couple FEM with a boundary integral method in curl-curl Maxwell’s equations (i.e. to simulate my computational FEM domain embedded in free-space, with an incoming wave-field).

It looks like all the basic tools are probably there in the Python interface (e.g. Trace() to get the right basis functions), but I’m not sure how to go about forming the double surface integrals/dense matrix part. Is this something already implemented, is it hackable, or would it require more C++ programming? Admittedly, I’m asking this having only had small play with NGSolve so far!

Alternatively, is there another way to set up this problem more suited to NGSolve that I may be overlooking?

Many thanks,


Hi Francis,

NGSolve does not include BEM, but there are people who have coupled NGSolve to bem++ (see

In principle, they are willing to share the coupling code, but they want to clean up a bit before putting it onto github.

best, Joachim

Hi Francis,
have you considered using absorbing boundary conditions (i.e. PML) on a bounded domain?
Attached is a H1 example, but it works for HCurl the same way.
If you check Visual->AnimatePeriodic you can visualize the waves :wink:


Hi Joachim and Christopher

Thank you both for your replies.

I suppose using a PML and applying an incoming wavefield this way with a complex scatterer somehow feels less natural to me (perhaps I am just being funny!), but this is a good way to start in any case.

Can you say if it’s the same team at UCL that have coupled to BEM++, or if it’s a third party?



Hi Francis,

Alexander has posted now his (3rd party) coupling-code between BEM++ and NGSolve at github:

We can help with the NGSolve side,