The Boundary Element Method

In the previous post the Helmholtz equation was solved using the Finite Element Method (FEM), where the whole domain ฮฉ is divided into elements. The Boundary Element Method (BEM) instead first rewrites the Helmholtz equation as an integral equation that lives only on the boundary ฮ“=๐œ•ฮฉ [1]. As a result, only the boundary has to be divided into elements, which is particularly attractive for exterior problems, such as the sound radiated from a vibrating object into free space, where the domain ฮฉ in theory is infinite.

The building blocks are the same as in the previous post: the unknown functions are approximated as ๐‘(๐ฑ)โ‰ˆ๐“(๐ฑ)๐ฉ, the elements are parameterized by local coordinates ๐ฎโˆˆโ„’๏ธ€๐‘’, the element localization matrices ๐‹๐‘’ pick out the local values ๐ฉ๐‘’=๐‹๐‘’๐ฉ, and integrals over the elements are approximated by a quadrature rule. The only difference in these building blocks is that the elements are now surface elements ฮ“๐‘’ instead of volume elements ฮฉ๐‘’. What changes is the equation being discretized and the approach used to discretize it.

1. The Kirchhoff-Helmholtz integral equation

For time-harmonic problems the pressure can be written as ๐‘(๐ฑ,๐‘ก)=Re{๐‘(๐ฑ)๐‘’๐›ผ๐‘–๐œ”๐‘ก}, where ๐›ผ=ยฑ1 is the sign of the chosen time dependency. Inserting this into the wave equation results in the Helmholtz equation

ฮ”๐‘(๐ฑ)+๐‘˜2๐‘(๐ฑ)=0,๐ฑโˆˆฮฉ,

(1)

which looks independent of ๐›ผ. This can cause confusion when the time dependency is not stated explicitly, as the relation between the normal derivative of the pressure and the normal velocity ๐‘ฃ๐ง does depend on ๐›ผ

๐œ•๐‘๐œ•๐ง(๐ฑ)=๐‘ (๐›ผ)๐‘˜๐‘ฃ๐ง(๐ฑ),๐‘ (๐›ผ)=โˆ’๐›ผ๐‘–๐œŒ0๐‘0,๐ฑโˆˆฮ“,

(2)

where the normal ๐ง points into the domain ฮฉ, i.e. out of a vibrating object, and ๐‘ (๐›ผ) is introduced for simplicity, similarly to [2]. Note that this is opposite to the previous post, where the boundary term of the integration by parts used the outward normal of ฮฉ.

In three dimensions the Greenโ€™s function, which will come in handy soon enough, is given by

๐บ(๐ฑ,๐ฒ)=exp(โˆ’๐›ผ๐‘–๐‘˜โ€–๐ฑโˆ’๐ฒโ€–2)4๐œ‹โ€–๐ฑโˆ’๐ฒโ€–2,๐ฑ,๐ฒโˆˆโ„3.

(3)

It is the solution of the Helmholtz equation with a point source

ฮ”๐บ(๐ฑ,๐ฒ)+๐‘˜2๐บ(๐ฑ,๐ฒ)=โˆ’๐›ฟ(๐ฑโˆ’๐ฒ),

(4)

where ๐›ฟ is the Dirac delta function, while the sign ๐›ผ makes the waves of ๐บ travel outwards from the source. The Greenโ€™s function takes two inputs, ๐ฑ and ๐ฒ, commonly referred to as the target location (๐ฑ) and the source location (๐ฒ), or simply the target(s) and source(s).

The derivation of the integral equation starts in the same way as the FEM: we multiply the Helmholtz equation with a test function ๐‘ž and integrate over the domain

โˆซฮฉ๐‘ž(๐ฒ)(ฮ”๐‘(๐ฒ)+๐‘˜2๐‘(๐ฒ))d๐ฒ=0.

(5)

The difference is that we now integrate by parts twice, moving both derivatives from ๐‘ onto ๐‘ž. Writing the normal derivative of ๐‘ in terms of the normal velocity, it follows that

โˆซฮฉ๐‘(๐ฒ)(ฮ”๐‘ž(๐ฒ)+๐‘˜2๐‘ž(๐ฒ))d๐ฒ+โˆซฮ“๐œ•๐‘ž๐œ•๐ง(๐ฒ)๐‘(๐ฒ)d๐‘†๐ฒโˆ’๐‘ (๐›ผ)๐‘˜โˆซฮ“๐‘ž(๐ฒ)๐‘ฃ๐ง(๐ฒ)d๐‘†๐ฒ=0,

where the signs of the boundary terms are due to ๐ง pointing into ฮฉ. For exterior problems the boundary also includes a sphere at infinity, whose integral vanishes when ๐‘ satisfies the Sommerfeld radiation condition below. Choosing the test function as the Greenโ€™s function, ๐‘ž(๐ฒ)=๐บ(๐ฑ,๐ฒ), the volume integral collapses due to (4), and we are left with the Kirchhoff-Helmholtz integral equation

๐œ(๐ฑ)๐‘(๐ฑ)โˆ’โˆซฮ“๐œ•๐บ(๐ฑ,๐ฒ)๐œ•๐ง(๐ฒ)๐‘(๐ฒ)d๐‘†๐ฒ+๐‘ (๐›ผ)๐‘˜โˆซฮ“๐บ(๐ฑ,๐ฒ)๐‘ฃ๐ง(๐ฒ)d๐‘†๐ฒ=0,

(6)

where ๐œ(๐ฑ) is the so-called integral free term depending on the geometry at ๐ฑ. For ๐ฑ in the interior of ฮฉ it is equal to one, in which case (6) gives the pressure at ๐ฑ from the values of ๐‘ and ๐‘ฃ๐ง on the boundary. For ๐ฑ on a smooth part of the boundary it is equal to 1/2, while at corners and edges it takes values between 0 and 1. Setting ๐ฑโˆˆฮ“ makes (6) an equation involving only functions on the boundary: a boundary integral equation.

The time dependency still enters (6) through ๐บ and ๐‘ (๐›ผ). Changing ๐›ผ conjugates the Greenโ€™s function and flips the sign of ๐‘ (๐›ผ), so a sign error in either of them results in a solution of the wrong problem. Finally, the derivation assumes that ๐‘ satisfies the Sommerfeld radiation condition

lim๐‘Ÿโ†’โˆž๐‘Ÿ(๐‘‘โˆ’1)/2(๐œ•๐‘๐œ•๐‘Ÿ+๐›ผ๐‘–๐‘˜๐‘)=0,

(7)

where ๐‘‘ is the dimension, meaning that no waves come in from infinity. In the FEM this condition has to be imposed by truncating the domain with an artificial boundary, whereas in the BEM it is built into the Greenโ€™s function, so that the solution of (6) satisfies it automatically.

2. Collocation

As in the FEM, we multiply (6) with a test function ๐œ‘, this time integrating over the boundary,

โˆซฮ“๐œ‘(๐ฑ)(๐œ(๐ฑ)๐‘(๐ฑ)โˆ’โˆซฮ“๐œ•๐บ(๐ฑ,๐ฒ)๐œ•๐ง(๐ฒ)๐‘(๐ฒ)d๐‘†๐ฒ+๐‘ (๐›ผ)๐‘˜โˆซฮ“๐บ(๐ฑ,๐ฒ)๐‘ฃ๐ง(๐ฒ)d๐‘†๐ฒ)d๐‘†๐ฑ=0.

(8)

Choosing ๐œ‘(๐ฑ)โ‰ˆ๐šโŠค๐“(๐ฑ)โŠค would result in a Galerkin BEM. The integrals of the Galerkin BEM are, however, double surface integrals with a singular integrand, which makes them expensive to compute. Instead, the most common approach is the so-called collocation approach, where the test function is a sum of Dirac delta functions placed at the collocation points ๐ญ1,โ€ฆ,๐ญ๐‘›โˆˆฮ“

๐œ‘(๐ฑ)=๐šโŠค[๐›ฟ(๐ฑโˆ’๐ญ1)๐›ฟ(๐ฑโˆ’๐ญ2)โ‹ฎ๐›ฟ(๐ฑโˆ’๐ญ๐‘›)],

(9)

where ๐šโˆˆโ„‚๐‘› is again a vector of arbitrary coefficients. The collocation points are in most cases chosen as the interpolation nodes of the basis functions, so that the cardinal property ๐“(๐ญ๐‘—)๐ฉ=๐‘๐‘— can be used. Inserting ๐œ‘ into (8), the sifting property of the Dirac delta function evaluates the outer integral at the collocation points, so that (8) becomes ๐šโŠค๐ซ=0 with

๐ซ=[๐œ(๐ญ1)๐‘(๐ญ1)โ‹ฎ๐œ(๐ญ๐‘›)๐‘(๐ญ๐‘›)]โˆ’[โˆซฮ“๐œ•๐บ(๐ญ1,๐ฒ)๐œ•๐ง(๐ฒ)๐‘(๐ฒ)d๐‘†๐ฒโ‹ฎโˆซฮ“๐œ•๐บ(๐ญ๐‘›,๐ฒ)๐œ•๐ง(๐ฒ)๐‘(๐ฒ)d๐‘†๐ฒ]+๐‘ (๐›ผ)๐‘˜[โˆซฮ“๐บ(๐ญ1,๐ฒ)๐‘ฃ๐ง(๐ฒ)d๐‘†๐ฒโ‹ฎโˆซฮ“๐บ(๐ญ๐‘›,๐ฒ)๐‘ฃ๐ง(๐ฒ)d๐‘†๐ฒ].

In its current form the unknowns are still functions, which a computer cannot be tasked to find. Instead, we insert the approximations ๐‘(๐ฒ)โ‰ˆ๐“(๐ฒ)๐ฉ and ๐‘ฃ๐ง(๐ฒ)โ‰ˆ๐“(๐ฒ)๐ฏ๐ง and handle the three vectors one at a time. For the first vector, the cardinal property of the basis functions gives

[๐œ(๐ญ1)๐‘(๐ญ1)โ‹ฎ๐œ(๐ญ๐‘›)๐‘(๐ญ๐‘›)]โ‰ˆ[๐œ(๐ญ1)๐“(๐ญ1)๐ฉโ‹ฎ๐œ(๐ญ๐‘›)๐“(๐ญ๐‘›)๐ฉ]=[๐œ(๐ญ1)๐‘1โ‹ฎ๐œ(๐ญ๐‘›)๐‘๐‘›]=diag(๐œป)๐ฉ,

(10)

where ๐œป=[๐œ(๐ญ1)โ€ฆ๐œ(๐ญ๐‘›)]โŠค. For the two integrals, the coefficients ๐ฉ and ๐ฏ๐ง do not depend on ๐ฒ and can be moved outside of the integrals

[โˆซฮ“๐œ•๐บ(๐ญ1,๐ฒ)๐œ•๐ง(๐ฒ)๐‘(๐ฒ)d๐‘†๐ฒโ‹ฎโˆซฮ“๐œ•๐บ(๐ญ๐‘›,๐ฒ)๐œ•๐ง(๐ฒ)๐‘(๐ฒ)d๐‘†๐ฒ]โ‰ˆ[โˆซฮ“๐œ•๐บ(๐ญ1,๐ฒ)๐œ•๐ง(๐ฒ)๐“(๐ฒ)d๐‘†๐ฒโ‹ฎโˆซฮ“๐œ•๐บ(๐ญ๐‘›,๐ฒ)๐œ•๐ง(๐ฒ)๐“(๐ฒ)d๐‘†๐ฒ]โŸ๐…๐ฉ,

(11)

[โˆซฮ“๐บ(๐ญ1,๐ฒ)๐‘ฃ๐ง(๐ฒ)d๐‘†๐ฒโ‹ฎโˆซฮ“๐บ(๐ญ๐‘›,๐ฒ)๐‘ฃ๐ง(๐ฒ)d๐‘†๐ฒ]โ‰ˆ[โˆซฮ“๐บ(๐ญ1,๐ฒ)๐“(๐ฒ)d๐‘†๐ฒโ‹ฎโˆซฮ“๐บ(๐ญ๐‘›,๐ฒ)๐“(๐ฒ)d๐‘†๐ฒ]โŸ๐†๐ฏ๐ง,

(12)

where each entry of the vectors is a row vector, as ๐“(๐ฒ) is, so that ๐… and ๐† are ๐‘›ร—๐‘› matrices. Collecting the terms, ๐šโŠค๐ซ=0 becomes

๐šโŠค((diag(๐œป)โˆ’๐…)๐ฉ+๐‘ (๐›ผ)๐‘˜๐†๐ฏ๐ง)โ‰ˆ0.

(13)

As this has to hold for all ๐šโˆˆโ„‚๐‘›, the term inside the parentheses must vanish, and the collocation BEM therefore reads

(diag(๐œป)โˆ’๐…)๐ฉ+๐‘ (๐›ผ)๐‘˜๐†๐ฏ๐ง=๐‡๐ฉ+๐‘ (๐›ผ)๐‘˜๐†๐ฏ๐งโ‰ˆ๐ŸŽ,

(14)

where we simply defined ๐‡=diag(๐œป)โˆ’๐… for the sake of convenience. In a typical problem ๐ฏ๐ง is known (e.g. from the vibration of a structure) and (14) is solved for ๐ฉ.

3. Computing the matrices

While (14) is easily stated, it does not mention how to actually compute ๐… and ๐†. The procedure is the same as for the mass and stiffness matrices in the previous post: the boundary integral is split into a sum over the elements, each element integral is moved to local coordinates, and the result is approximated by a quadrature rule. On element ๐‘’ the pressure is interpolated as ๐‘(๐ฒ๐‘’(๐ฎ))โ‰ˆ๐“๐‘’(๐ฎ)๐‹๐‘’๐ฉ, so that the ๐‘˜th row of ๐… becomes

โˆซฮ“๐œ•๐บ(๐ญ๐‘˜,๐ฒ)๐œ•๐ง(๐ฒ)๐“(๐ฒ)d๐‘†๐ฒโ‰ˆโˆ‘๐‘’=1๐‘(โˆซโ„’๏ธ€๐‘’๐œ•๐บ(๐ญ๐‘˜,๐ฒ๐‘’(๐ฎ))๐œ•๐ง(๐ฒ๐‘’(๐ฎ))๐“๐‘’(๐ฎ)jacobian(ฮ“๐‘’,๐ฎ)d๐ฎ)๐‹๐‘’โ‰ˆโˆ‘๐‘’=1๐‘(โˆ‘๐‘–=1๐‘„(๐ญ๐‘˜,๐‘’)๐œ•๐บ(๐ญ๐‘˜,๐ฒ๐‘’(๐ฎ๐‘–))๐œ•๐ง(๐ฒ๐‘’(๐ฎ๐‘–))๐“๐‘’(๐ฎ๐‘–)jacobian(ฮ“๐‘’,๐ฎ๐‘–)๐‘ค๐‘–)๐‹๐‘’,

(15)

where the first approximation is due to the geometry being approximated by the elements, and the second is due to the quadrature. The ๐‘˜th row of ๐† is computed in the same way, with ๐บ(๐ญ๐‘˜,๐ฒ) in place of its normal derivative. The jacobian describes the local deformation of the map from local to global coordinates. For the curve elements of 2D problems this is a change of length, while for the surface elements of 3D problems it is a change of area

2D:jacobian(ฮ“๐‘’,๐‘ข)=โ€–๐—๐‘’d๐๐‘’(๐‘ข)d๐‘ขโ€–2(length deformation),3D:jacobian(ฮ“๐‘’,๐ฎ)=โ€–(๐—๐‘’๐œ•๐๐‘’(๐ฎ)๐œ•๐‘ข1)ร—(๐—๐‘’๐œ•๐๐‘’(๐ฎ)๐œ•๐‘ข2)โ€–2(area deformation).

(16)

The new difficulty compared to the FEM is that the Greenโ€™s function is singular at ๐ฒ=๐ญ๐‘˜, so a standard quadrature rule is inaccurate on the elements that contain, or lie close to, the collocation point. This is why (15) highlights that the number of quadrature points ๐‘„(๐ญ๐‘˜,๐‘’) can depend on both the collocation point and the element. For the elements containing ๐ญ๐‘˜, special techniques are needed, such as splitting the element at ๐ญ๐‘˜ and using a transformation whose jacobian cancels the 1/๐‘Ÿ singularity.

Exampleย 1: Pulsating sphere

Example 1 (Pulsating sphere)ย ย  A sphere of radius ๐‘Ž whose surface moves uniformly with the normal velocity ๐‘ฃ0 radiates the pressure ๐‘(๐‘Ÿ)=๐ดexp(โˆ’๐›ผ๐‘–๐‘˜๐‘Ÿ)/๐‘Ÿ. Matching the radial velocity at ๐‘Ÿ=๐‘Ž gives the analytical surface pressure

๐‘(๐‘Ž)=๐œŒ0๐‘0๐‘ฃ0๐›ผ๐‘–๐‘˜๐‘Ž1+๐›ผ๐‘–๐‘˜๐‘Ž.

(17)

To compute it with the BEM we use BoundaryIntegralEquations.jl, which assembles ๐… and ๐† as in (15), including the special quadrature for the elements close to the collocation points. The sphere is meshed with continuous quadratic triangles, both for the geometry (๐๐‘’) and for the pressure and normal velocity (๐“๐‘’), and the collocation points are the interpolation nodes. The package uses the time dependency exp(โˆ’๐‘–๐œ”๐‘ก), i.e. ๐›ผ=โˆ’1, and the normals of the mesh point into the sphere. The latter flips the sign of the matrix returned as ๐…, and the package returns 1โˆ’๐œ instead of ๐œ.

julia
1
using BoundaryIntegralEquations, LinearAlgebra
2
## Physical parameters. The sphere pulsates with the normal velocity vโ‚€.
3
a = 1.0 # Radius of the sphere
4
ฯ = 1.21 # Density of air
5
c = 343.0 # Speed of sound
6
vโ‚€ = 1.0 # Normal velocity of the surface
7
s = im*ฯ*c # s(ฮฑ) for the time dependency exp(-iฯ‰t), i.e. ฮฑ = -1
8
## Mesh: 464 quadratic triangles with 930 nodes
9
pkg_dir = pkgdir(BoundaryIntegralEquations)
10
mesh_file = joinpath(pkg_dir, "examples", "meshes", "sphere_1m_coarse")
11
mesh = load3dTriangularComsolMesh(mesh_file)
12
vโ‚™ = fill(vโ‚€, size(mesh.sources, 2))
13
## Solving (diag(ฮถ) - F)p = -s k G vโ‚™ for each wavenumber.
14
# The normals of the mesh point into the sphere, so the F of the package
15
# is -F, and the integral free term of the exterior problem is ฮถ = 1 - C.
16
ka = range(0.05, 5, length=100)
17
p_bem = map(ka) do kai
18
k = kai/a
19
F, G, C = assemble_parallel!(mesh, k, mesh.sources; progress=false)
20
H = Diagonal(1 .- C) + F
21
p = H \ (-s*k*G*vโ‚™)
22
sum(p)/length(p) # The surface pressure is constant; average it.
23
end
24
## The analytical surface pressure of the pulsating sphere.
25
p_analytical = @. ฯ*c*vโ‚€*(-im*ka)/(1 - im*ka)
Figureย 1: The surface pressure of the pulsating sphere normalized by ๐œŒ0๐‘0๐‘ฃ0, analytical and computed with the BEM using 464 quadratic elements.

4. Acceleration methods

A considerable downside of the BEM is that ๐‡,๐†โˆˆโ„‚๐‘›ร—๐‘› are dense, unlike the sparse mass and stiffness matrices of the FEM. The memory used to store them therefore scales as ๐’ช๏ธ€(๐‘›2), and a direct solve of (14) is ๐’ช๏ธ€(๐‘›3), rendering the direct application of the method unusable for large ๐‘›. This is somewhat offset by the fact that only the boundary is discretized, but for large problems it is a serious limitation. However, various methods have been developed that reduce the memory and the cost of a matrix-vector product to ๐’ช๏ธ€(๐‘›log๐‘›) or even ๐’ช๏ธ€(๐‘›) by exploiting the rank structure of the problem. As these methods only define the matrix-vector products, (14) must then be solved by an iterative method, the most common being the generalized minimal residual method (GMRES) [3], [4], [5].

The aim of this section is to show how the matrix-vector products with ๐† and ๐… can be computed in ๐’ช๏ธ€(๐‘›) (or ๐’ช๏ธ€(๐‘›log๐‘›)) time using the fast multipole method (FMM) or hierarchical matrices (โ„‹๏ธ€-matrices). To do so, we start by assuming that all elements are integrated using the same ๐‘„ quadrature points.11 This results in inaccurate integrals for the elements close to the collocation point, which are fixed by a near-field correction below. Multiplying the ๐‘˜th row of ๐† with a vector ๐ณ it follows that

(โˆซฮ“๐บ(๐ญ๐‘˜,๐ฒ)๐“(๐ฒ)d๐‘†๐ฒ)๐ณโ‰ˆ(โˆ‘๐‘’=1๐‘โˆ‘๐‘–=1๐‘„๐บ(๐ญ๐‘˜,๐ฒ๐‘’(๐ฎ๐‘–))jacobian(ฮ“๐‘’,๐ฎ๐‘–)๐‘ค๐‘–๐“๐‘’(๐ฎ๐‘–)๐‹๐‘’)๐ณ=(โˆ‘๐‘—=1๐‘๐‘„๐บ(๐ญ๐‘˜,๐ฒ๐‘—)jacobian(ฮ“๐‘’(๐‘—),๐ฎ๐‘—)๐‘ค๐‘—๐“๐‘’(๐‘—)(๐ฎ๐‘—)๐‹๐‘’(๐‘—)โŸ๐‘—th row of๐‚)๐ณ=[๐บ(๐ญ๐‘˜,๐ฒ1)๐บ(๐ญ๐‘˜,๐ฒ2)โ€ฆ๐บ(๐ญ๐‘˜,๐ฒ๐‘๐‘„)]๐‚๐ณ,

(18)

where the subscript ๐‘— refers to an ordering of the quadrature points of all elements, and ๐‘’(๐‘—) returns the element that quadrature point ๐‘— lies on. The matrix ๐‚โˆˆโ„๐‘๐‘„ร—๐‘› is extremely sparse and can be thought of as a map from the values ๐ณ at the collocation points to the coefficients ๐œ=๐‚๐ณ at the quadrature points ๐ฒ๐‘—. The same approach applies to ๐…, where the normal derivative is written as ๐ง(๐ฒ๐‘—)โŠคโˆ‡๐ฒ๐บ(๐ญ๐‘˜,๐ฒ๐‘—)

(โˆซฮ“๐œ•๐บ(๐ญ๐‘˜,๐ฒ)๐œ•๐ง(๐ฒ)๐“(๐ฒ)d๐‘†๐ฒ)๐ณโ‰ˆ[๐ง(๐ฒ1)โŠคโˆ‡๐ฒ๐บ(๐ญ๐‘˜,๐ฒ1)โ€ฆ๐ง(๐ฒ๐‘๐‘„)โŠคโˆ‡๐ฒ๐บ(๐ญ๐‘˜,๐ฒ๐‘๐‘„)]๐‚๐ณ.

(19)

Applying (18) or (19) directly for all ๐‘› rows results in products that scale as ๐’ช๏ธ€(๐‘๐‘„๐‘›), which could hurt more than we gain, as ๐‘๐‘„โ‰ณ๐‘›. The point is that the dense part of the product, a sum of Greenโ€™s functions over the points ๐ฒ๐‘—, is exactly what the FMM and โ„‹๏ธ€-matrices accelerate. Doing so blindly, however, keeps the inaccurate integration of the elements close to the collocation points. To fix this, a sparse near-field correction ๐’ is added, which subtracts the inaccurate integration using only ๐‘„ quadrature points and adds the accurate one. Applying (18) or (19) for all rows at the same time can therefore be thought of as

๐€=๐๐‚+๐’,๐€,๐’โˆˆโ„‚๐‘›ร—๐‘›,๐โˆˆโ„‚๐‘›ร—๐‘๐‘„,๐‚โˆˆโ„๐‘๐‘„ร—๐‘›,

(20)

where ๐ is the dense part approximated by either the FMM or an โ„‹๏ธ€-matrix (see (22) and (23) below), ๐‚ is the coefficient map, and ๐’ is the near-field correction. As ๐’ and ๐‚ are highly sparse, both their assembly and their products scale as ๐’ช๏ธ€(๐‘›๐œ) with ๐œโ‰ช๐‘›. Using an approximation of ๐ whose product scales linearly in time and memory therefore results in a representation of ๐€ that scales similarly.

To compute ๐’ efficiently, its sparsity pattern must be known in advance. For collocation this could, for example, be the elements neighboring each interpolation node, as shown in Figureย 2. For discontinuous elements, whose nodes lie inside the elements, the support of each basis function is a single element (panel (b)). While this works well in many cases, it fails when elements that are not neighbors are geometrically close, as is the case for e.g. thin structures.

Figureย 2: The support of the basis function of a node (red point) is shown in red. In some cases the near-field correction is extended to also include the blue elements.

4.1. The fast multipole method

The FMM can be used to accelerate sums of the Greenโ€™s function (๐†) as well as of its normal derivative (๐…) [6], [7], [8]. Throughout the years, many good resources explaining the intricacies of the FMM have been written. For a gentle introduction I recommend the short course by Greengard and the pedestrian introduction by Ying [9], while the books by Gumerov and Duraiswami [10] and Liu [11] give a more detailed look with an emphasis on the BEM. Ying also has a wonderful introductory talk. Given these resources, the details of the FMM are left out here, and we focus on the connection to the BEM. For this, it is enough to think of the FMM as a way of speeding up sums of the form

๐‘ข(๐ญ๐‘˜)=โˆ‘๐‘—=1๐‘๐‘„๐บ(๐ญ๐‘˜,๐ฒ๐‘—)๐‘๐‘—,๐‘ข(๐ญ๐‘˜)=โˆ‘๐‘—=1๐‘๐‘„๐ง(๐ฒ๐‘—)โŠคโˆ‡๐ฒ๐บ(๐ญ๐‘˜,๐ฒ๐‘—)๐‘๐‘—,

(21)

where the ๐‘—th term is left out when ๐ญ๐‘˜=๐ฒ๐‘—. Looking back at (18) and (19), this is exactly what is computed for each row of ๐† and ๐…, with the coefficients ๐œ=๐‚๐ณ. For a fixed precision, applying the FMM to all ๐‘› collocation points scales as ๐’ช๏ธ€(๐‘›+๐‘๐‘„) at low frequencies, and as ๐’ช๏ธ€((๐‘›+๐‘๐‘„)log(๐‘›+๐‘๐‘„)) for the wideband methods needed at high frequencies. Many FMM libraries exist, such as ExaFMM, ScalFMM and FMM3D, the last of which has a Julia interface. For 2D problems, the companion library FMM2D can be used from Julia through FMM2D.jl.22 I maintain this Julia package.

4.2. Hierarchical matrices

The โ„‹๏ธ€-matrix approach differs from the FMM in that it does not accelerate the sums directly [12], [13]. Instead, it approximates the matrix that corresponds to computing the sums for all ๐‘› collocation points at the same time. For ๐† this is the matrix

๐=[๐บ(๐ญ1,๐ฒ1)๐บ(๐ญ1,๐ฒ2)โ€ฆ๐บ(๐ญ1,๐ฒ๐‘๐‘„)๐บ(๐ญ2,๐ฒ1)๐บ(๐ญ2,๐ฒ2)โ€ฆ๐บ(๐ญ2,๐ฒ๐‘๐‘„)โ‹ฎโ‹ฎโ‹ฑโ‹ฎ๐บ(๐ญ๐‘›,๐ฒ1)๐บ(๐ญ๐‘›,๐ฒ2)โ€ฆ๐บ(๐ญ๐‘›,๐ฒ๐‘๐‘„)],

(22)

where the approximation is based on the fact that subblocks of the matrix corresponding to points far from each other are well approximated by low-rank matrices. For ๐… the matrix is

๐=[๐ง(๐ฒ1)โŠคโˆ‡๐ฒ๐บ(๐ญ1,๐ฒ1)โ€ฆ๐ง(๐ฒ๐‘๐‘„)โŠคโˆ‡๐ฒ๐บ(๐ญ1,๐ฒ๐‘๐‘„)โ‹ฎโ‹ฑโ‹ฎ๐ง(๐ฒ1)โŠคโˆ‡๐ฒ๐บ(๐ญ๐‘›,๐ฒ1)โ€ฆ๐ง(๐ฒ๐‘๐‘„)โŠคโˆ‡๐ฒ๐บ(๐ญ๐‘›,๐ฒ๐‘๐‘„)].

(23)

How the hierarchical low-rank approximation is computed is outside the scope of this post, but the interested reader can look at [14], [15], [16], of which [14] is my preferred introduction. Furthermore, a wonderful lecture series by Alex Barnett, Adrianna Gillman and Per-Gunnar Martinsson from the 2014 CBMS-NSF Conference: Fast Direct Solvers for Elliptic PDEs can be found online. There are many implementations of hierarchical matrices, such as HLIBpro, HLib and H2Lib, and in Julia KernelMatrices.jl [17], HssMatrices.jl and HMatrices.jl implement various formats with different properties. A longer list can be found here. An often mentioned strength of โ„‹๏ธ€-matrices is that their LU factorization can be computed efficiently, which is useful when iterative solvers converge slowly, e.g. near resonances, although the ranks, and thereby the cost, grow with the frequency. However, an LU factorization cannot be applied directly to the form of (20).

4.3. The interpolated factored Green function

A more recent approach is the interpolated factored Green function (IFGF) method [18]. An advantage of the IFGF is that it does not need the split into low and high frequencies required by the FMM, while at the same time being easily parallelized, as it does not rely on the fast Fourier transform [19]. However, as opposed to the purely algebraic โ„‹๏ธ€-matrices, the IFGF is based on interpolation. It therefore requires that the matrix is generated by a function that can be evaluated at any pair of points (๐ฑ,๐ฒ). Unfortunately, this is not the case for ๐…, as its entries depend on the normal, which is computed from the local coordinates ๐ฎ of the elements. A workaround is to approximate the full gradient of the Greenโ€™s function with the IFGF, as it can be evaluated at any (๐ฑ,๐ฒ), and then compute the normal derivative from it. A simple implementation of the method can be found in IFGF.jl.

Cite this post

bibtex
@misc{paltorp2026bemintroduction,
author = {Paltorp, Mikkel},
title = {{The Boundary Element Method}},
year = {2026},
month = may,
url = {https://mipals.github.io/pdf/2026/05-12-bem-introduction/bem-introduction.pdf},
note = {Blog post}
}

Bibliography

  • [1] M. Paltorp, โ€œComputational Improvements in the Boundary Element Method for Acoustics including Viscothermal Dissipation,โ€ Doctoral dissertation, 2023. [Online]. Available: https://orbit.dtu.dk/files/349939384/PhD_thesis_-_162_sider_-_41_farvede.pdf
  • [2] S. Marburg, โ€œThe Burton and Miller Method: Unlocking Another Mystery of its Coupling Parameter,โ€ Journal of Computational Acoustics, vol. 24, no. 1, p. 1550016, 2016, doi: 10.1142/S0218396X15500162.
  • [3] Y. Saad and M. H. Schultz, โ€œGMRES: A Generalized Minimal Residual Algorithm for Solving Nonsymmetric Linear Systems,โ€ SIAM Journal on Scientific and Statistical Computing, vol. 7, no. 3, pp. 856โ€“869, 1986, doi: 10.1137/0907058.
  • [4] S. Marburg and S. Schneider, โ€œPerformance of iterative solvers for acoustic problems. Part I. Solvers and effect of diagonal preconditioning,โ€ Engineering Analysis with Boundary Elements, vol. 27, no. 7, pp. 727โ€“750, 2003, doi: 10.1016/s0955-7997(03)00025-0.
  • [5] S. Schneider and S. Marburg, โ€œPerformance of iterative solvers for acoustic problems. Part II. Acceleration by ILU-type preconditioner,โ€ Engineering Analysis with Boundary Elements, vol. 27, no. 7, pp. 751โ€“757, 2003, doi: 10.1016/s0955-7997(03)00016-x.
  • [6] L. Greengard and V. Rokhlin, โ€œA Fast Algorithm for Particle Simulations,โ€ Journal of Computational Physics, vol. 73, no. 2, pp. 325โ€“348, 1987, doi: 10.1016/0021-9991(87)90140-9.
  • [7] L. Greengard and V. Rokhlin, โ€œA new version of the Fast Multipole Method for the Laplace equation in three dimensions,โ€ Acta Numerica, vol. 6, pp. 229โ€“269, 1997, doi: 10.1017/S0962492900002725.
  • [8] H. Cheng, L. Greengard, and V. Rokhlin, โ€œA Fast Adaptive Multipole Algorithm in Three Dimensions,โ€ Journal of Computational Physics, vol. 155, no. 2, pp. 468โ€“498, 1999, doi: 10.1006/jcph.1999.6355.
  • [9] L. Ying, โ€œA pedestrian introduction to fast multipole methods,โ€ Science China Mathematics, vol. 55, no. 5, pp. 1043โ€“1051, 2012, doi: 10.1007/s11425-012-4392-0.
  • [10] N. A. Gumerov and R. Duraiswami, Fast Multipole Methods for the Helmholtz Equation in Three Dimensions. Elsevier, 2005. doi: 10.1016/B978-0-08-044371-3.X5000-5.
  • [11] Y. Liu, Fast Multipole Boundary Element Method: Theory and Applications in Engineering. Cambridge University Press, 2009. doi: 10.1017/CBO9780511605345.
  • [12] P.-G. Martinsson, Fast Direct Solvers for Elliptic PDEs. Society for Industrial, Applied Mathematics, 2019. doi: 10.1137/1.9781611976045.
  • [13] P.-G. Martinsson and V. Rokhlin, โ€œA fast direct solver for boundary integral equations in two dimensions,โ€ Journal of Computational Physics, vol. 205, no. 1, pp. 1โ€“23, 2005, doi: 10.1016/j.jcp.2004.10.033.
  • [14] J. Ballani and D. Kressner, โ€œMatrices with Hierarchical Low-Rank Structures,โ€ Lecture Notes in Mathematics, vol. 2173, pp. 161โ€“209, 2016.
  • [15] M. Bebendorf, Hierarchical Matrices: A Means to Efficiently Solve Elliptic Boundary Value Problems. Springer, 2008.
  • [16] W. Hackbusch, Hierarchical Matrices: Algorithms and Analysis. Springer, 2015.
  • [17] C. J. Geoga, M. Anitescu, and M. L. Stein, โ€œScalable Gaussian Process Computations Using Hierarchical Matrices,โ€ Journal of Computational and Graphical Statistics, vol. 29, no. 2, pp. 227โ€“237, 2020, doi: 10.1080/10618600.2019.1652616.
  • [18] C. Bauinger and O. P. Bruno, โ€œโ€œInterpolated Factored Green Functionโ€ Method for accelerated solution of Scattering Problems,โ€ Journal of Computational Physics, vol. 430, p. 110095, 2021, doi: 10.1016/j.jcp.2020.110095.
  • [19] C. Bauinger and O. P. Bruno, โ€œMassively parallelized interpolated factored Green function method,โ€ Journal of Computational Physics, vol. 475, p. 111837, 2023, doi: 10.1017/CBO9780511605345.