Only the boundary needs a mesh. My kind of laziness.
I only care about my shell's surface, too.
Only the boundary matters. Ask any shell.
An infinite domain? I'd never reach the end. Luckily the boundary is enough.
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 , where is the sign of the chosen time dependency. Inserting this into the wave equation results in the Helmholtz equation
(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
(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
(3)
It is the solution of the Helmholtz equation with a point source
(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
(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
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
(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 , 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
(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,
(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
(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 with
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
(10)
where . For the two integrals, the coefficients and do not depend on and can be moved outside of the integrals
(11)
(12)
where each entry of the vectors is a row vector, as is, so that and are matrices. Collecting the terms, becomes
(13)
As this has to hold for all , the term inside the parentheses must vanish, and the collocation BEM therefore reads
(14)
where we simply defined 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
(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
(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 singularity.
Exampleย 1: Pulsating sphere
Example 1 (Pulsating sphere)ย ย A sphere of radius whose surface moves uniformly with the normal velocity radiates the pressure . Matching the radial velocity at gives the analytical surface pressure
(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 , i.e. , and the normals of the mesh point into the sphere. The latter flips the sign of the matrix returned as , and the package returns instead of .
1using BoundaryIntegralEquations, LinearAlgebra2## Physical parameters. The sphere pulsates with the normal velocity vโ.3a = 1.0 # Radius of the sphere4ฯ = 1.21 # Density of air5c = 343.0 # Speed of sound6vโ = 1.0 # Normal velocity of the surface7s = im*ฯ*c # s(ฮฑ) for the time dependency exp(-iฯt), i.e. ฮฑ = -18## Mesh: 464 quadratic triangles with 930 nodes9pkg_dir = pkgdir(BoundaryIntegralEquations)10mesh_file = joinpath(pkg_dir, "examples", "meshes", "sphere_1m_coarse")11mesh = load3dTriangularComsolMesh(mesh_file)12vโ = 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 package15# is -F, and the integral free term of the exterior problem is ฮถ = 1 - C.16ka = range(0.05, 5, length=100)17p_bem = map(ka) do kai18 k = kai/a19 F, G, C = assemble_parallel!(mesh, k, mesh.sources; progress=false)20 H = Diagonal(1 .- C) + F21 p = H \ (-s*k*G*vโ)22 sum(p)/length(p) # The surface pressure is constant; average it.23end24## The analytical surface pressure of the pulsating sphere.25p_analytical = @. ฯ*c*vโ*(-im*ka)/(1 - im*ka)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 , and a direct solve of (14) is , 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 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 ) 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
(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
(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.
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
(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 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
(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
(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
@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.