1 Introduction

Let \(\Omega \subset \mathbb {R}^d\), \(d \ge 2\), be a bounded Lipschitz domain with polygonal boundary \(\Gamma := \partial \Omega \). To present the main ideas and our first numerical results, we consider the Poisson problem with inhomogeneous Dirichlet boundary data g, i.e.,

$$\begin{aligned} \Delta u=0\quad \text {in }\Omega ,\qquad u=g\quad \text {on }\Gamma . \end{aligned}$$
(1)

Throughout the paper, we assume that \(d \in \{2,3\}\). However, all results can easily be extended to higher dimensions. For the numerical solution of (1), we employ the boundary element method (BEM); see, e.g., [27, 42, 44]. Again for the ease of presentation, let us consider an indirect ansatz based on the single-layer potential

$$\begin{aligned} ({\widetilde{V}}\phi )(x) := \int _{\Gamma } G(x-y) \, \phi (y) \,\mathrm{d}{y} = u(x) \quad \text {for all } x\in \Omega \end{aligned}$$
(2)

with unknown integral density \(\phi \), where, for \(z \in \mathbb {R}^d \backslash \{0\}\), \(G(z) = -\frac{1}{2\pi } \, \log |z|\) for \(d = 2\) resp. \(G(z) = \frac{1}{4\pi } |z|^{-1}\) for \(d = 3\) denotes the fundamental solution of the Laplacian. Taking the trace on \(\Gamma \), the potential ansatz leads to the weakly-singular integral equation

$$\begin{aligned} (V \phi )(x) = g(x) \quad \text {for almost all } x\in \Gamma , \end{aligned}$$
(3)

where the integral representation of \(g=V\phi \) coincides with that of \(u={\widetilde{V}}\phi \) (at least for bounded densities) but is now evaluated on \(\Gamma \) (instead of inside \(\Omega \)). For ellipticity of the operator V, we suppose that \(\mathrm{diam}(\Omega ) < 1\) in case of \(d = 2\), which can always be achieved by scaling. Given a triangulation \({\mathcal {F}}^\Gamma _h\) of the boundary \(\Gamma \), the latter equation is solved by the lowest-order BEM and provides some piecewise constant approximation \(\phi _h\), i.e.,

$$\begin{aligned} \phi \approx \phi _h\in {\mathcal {P}}^0({\mathcal {F}}^\Gamma _h), \end{aligned}$$
(4)

where the precise discretization (e.g., Galerkin BEM, collocation, etc.) will not be exploited by our analysis. However, as a BEM inherent characteristic, we obtain an approximation of the potential \(u \approx u_h:= {\widetilde{V}} \phi _h\), which satisfies the Laplace problem

$$\begin{aligned} \Delta u_h= 0 \quad \text {in } \Omega . \end{aligned}$$
(5)

Note that here—contrary to the usual notations—\(u_{h}\) is not a discrete function but computed by an integral operator applied to a discrete function, i.e., \(u_h\) is data sparse. We emphasize that (5) is the key argument for the error identity

$$\begin{aligned}&\max _{\begin{array}{c} \varvec{\tau }\in {\mathsf {L}}^2(\Omega )\\ \mathrm{div\,}\varvec{\tau }=0 \end{array}} \Big (2\,\langle g-u_h|_{\Gamma }\,,\,\varvec{n} \cdot \varvec{\tau }|_{\Gamma }\rangle _{\Gamma } -\Vert \varvec{\tau }\Vert _{{\mathsf {L}}^2(\Omega )}^2\Big )\nonumber \\&\quad =\big \Vert \nabla (u-u_h)\big \Vert _{{\mathsf {L}}^2(\Omega )}^2 \!=\!\!\!\min _{\begin{array}{c} w\in {\mathsf {H}}^1(\Omega )\\ w|_{\Gamma }=g-u_h|_{\Gamma } \end{array}} \Vert \nabla w\Vert _{{\mathsf {L}}^2(\Omega )}^2, \end{aligned}$$
(6)

where \(\langle \cdot \,,\,\cdot \rangle _{\Gamma }\) denotes the extended \({\mathsf {L}}^2(\Gamma )\) scalar product (see Theorem 4 below). The identities (6) generate a posteriori error estimates of the functional type that are independent of the discretization and provide fully guaranteed lower and upper bounds for the unknown error without any constants at all. In general, these functional type a posteriori estimates involve only constants in basic functional inequalities associated with the concrete problem (e.g., Poincaré–Friedrichs type or trace inequalities) and are applicable for any approximation from the admissible energy class (see [1, 2, 37, 39] or the monograph [40] and the references cited therein). In particular, the equations (6) have also been used in [40] for the analysis of errors arising in the Trefftz method.

From (6), constant-free (i.e., with known constant 1) lower and upper bounds for the unknown potential error \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\) can be obtained by choosing arbitrary instances of \(\varvec{\tau }\) and w. In the present work, we compute these bounds by solving problems in a suitable boundary layer \(S \subset \Omega \) along \(\Gamma \) by use of the finite element method (FEM). Moreover, these bounds are then employed to drive an adaptive mesh-refinement for the triangulation \({\mathcal {F}}^{\Gamma }_h\) of \(\Gamma \) and, as novelty, also quantify the accuracy \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\) of the BEM induced potential \(u_h= {\widetilde{V}} \phi _h\) in each step of the adaptive algorithm. In particular, the latter quantification is essentially constant-free (up to data oscillations terms arising for the FEM majorant) and can thus also be used as reasonable stopping criterion for adaptive BEM computations. Especially for practical applications, this is an important step forward, since there exist neither a posteriori error estimates with constant 1 nor estimates for physically relevant errors. While available results focus on the density \(\phi _h\) (see, e.g., [9, 11, 12, 17, 23, 36] for some prominent results or the surveys [10, 20] and the references therein), estimating rather the energy error of \(u_h\) circumvents, in particular, BEM-natural challenges like the localization of non-integer Sobolev norms. It is quite natural that these serious advantages of the proposed error estimation strategy are associated with certain technical complications that arise because we need to generate a volume mesh at least for some boundary layer \(S \subset \Omega \) along \(\Gamma \) on which we solve auxiliary FEM problems. However, the ratio between the number of degrees of freedom (DoF) for obtaining the error estimates and the BEM DoF remains bounded, so that additional computational expenditures remain limited. Moreover, examples show that very good error bounds can be obtained when the ratio is between one and three. Finally, we note that the generation of the volume mesh appears to be a standard problem for FEM mesh generation, where usually, like in computer aided design (CAD), only the surface \(\Gamma \) is given.

Outline. The remainder of this work is organized as follows: In Section 2, we collect the necessary notations as well as the fundamental properties of (Galerkin) BEM. In Section 3, we formulate our approach for functional a posteriori error estimation. Theorem 4 states the error identity (6). Theorem 5 provides a computable upper bound on (6) by means of an \({\mathsf {H}}^1\)-conforming FEM approach as well as a computable lower bound on (6) by means of an \({\mathsf {H}}(\mathrm{div})\)-conforming mixed FEM approach. Section 4 shows how these findings can be used to steer an adaptive mesh-refinement. Algorithm 10 formulates such a strategy with reliable error control on \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\). In Section 5, we employ the proposed adaptive algorithm to underpin our theoretical findings by some numerical experiments with lowest-order Galerkin BEM in 2D. Section 6 concludes the work with natural extensions of our approach (even covered by our analytical results) like higher-order BEM, alternative BEM discretizations like collocation, direct BEM formulations, and error control for exterior domain problems (where \(\Omega \) is unbounded), underlining the independence of our error estimators of the actual problem and approximation method. The final Section 7 summarizes the contributions of the present work and addresses possible topics for future research.

2 Preliminaries and notation

2.1 Domains and function spaces

Throughout this paper, let \(\Omega \subset \mathbb {R}^d\), \(d\in \{2,3\}\), be a bounded Lipschitz domain (i.e., locally below the graph of some Lipschitz function) with boundary \(\Gamma = \partial \Omega \) and exterior unit normal vector field \({\varvec{n}}\). For all numerical results involving discretisations, we assume that \(\Gamma \) is a polygon. We denote by \(\langle \cdot \, , \, \cdot \rangle _{{\mathsf {L}}^2(\Xi )}\) and \(\Vert \cdot \Vert _{{\mathsf {L}}^2(\Xi )}\) the standard inner product and norm in \({\mathsf {L}}^2(\Xi )\), respectively, where, e.g., \(\Xi \in \{\Omega ,\Gamma \}\). Based on \({\mathsf {L}}^2(\Omega )\), we define the Hilbert spaces

$$\begin{aligned} {\mathsf {H}}^1(\Omega )&:= \big \{\varphi \in {\mathsf {L}}^2(\Omega ) \,:\, \nabla \varphi \in {\mathsf {L}}^2(\Omega ) \big \},\\ {\mathsf {H}}(\mathrm{div},\Omega )&:= \big \{\varvec{\sigma }\in {\mathsf {L}}^2(\Omega ) \,:\, \mathrm{div\,}\varvec{\sigma }\in {\mathsf {L}}^2(\Omega ) \big \}. \end{aligned}$$

The corresponding inner products and (induced) norms are \(\langle \cdot \, , \, \cdot \rangle _{{\mathsf {H}}^1(\Omega )}\) and \(\Vert \cdot \Vert _{{\mathsf {H}}^1(\Omega )}\) resp. \(\langle \,\cdot \, \, , \, \,\cdot \,\rangle _{{\mathsf {H}}(\mathrm{div},\Omega )}\) and \(\Vert \cdot \Vert _{{\mathsf {H}}(\mathrm{div},\Omega )}\). Moreover, introducing the scalar trace operator \((\cdot )|_{\Gamma }:{\mathsf {H}}^1(\Omega )\rightarrow {\mathsf {L}}^2(\Gamma )\), our analysis also employs the closed subspace of \({\mathsf {H}}^1(\Omega )\)

$$\begin{aligned} {\mathsf {H}}^1_0(\Omega ) :=\big \{\varphi \in {\mathsf {H}}^1(\Omega ) \,:\, \varphi |_{\Gamma }=0 \big \} \end{aligned}$$

and the trace space \({\mathsf {H}}^{1/2}(\Gamma ) := \big \{\varphi |_\Gamma \! \,:\, \!\varphi \in H^1(\Omega ) \big \}\) equipped with the natural quotient norm

$$\begin{aligned} \Vert f\Vert _{{\mathsf {H}}^{1/2}(\Gamma )}&:= \inf \big \{\Vert \varphi \Vert _{{\mathsf {H}}^1(\Omega )}\! \,:\, \!\varphi \in {\mathsf {H}}^1(\Omega ) \text { with } \varphi |_{\Gamma } = f \big \}\quad \text {for all } f\in {\mathsf {H}}^{1/2}(\Gamma ). \end{aligned}$$

A standard construction (see the subsequent Remark 1) yields a harmonic extension operator \(\widehat{(\cdot )} : {\mathsf {H}}^{1/2}(\Gamma ) \rightarrow {\mathsf {H}}^1(\Omega )\) which satisfies \(\Vert \nabla {\widehat{f}}\Vert _{{\mathsf {L}}^2(\Omega )}\le \Vert f\Vert _{{\mathsf {H}}^{1/2}(\Gamma )}\) for all \(f\in {\mathsf {H}}^{1/2}(\Gamma )\).

Remark 1

In fact, the minimal extension \(\varphi \in {\mathsf {H}}^1(\Omega )\) of \(f \in {\mathsf {H}}^{1/2}(\Gamma )\) satisfies \(\Vert f\Vert _{{\mathsf {H}}^{1/2}(\Gamma )} = \Vert \varphi \Vert _{{\mathsf {H}}^1(\Omega )}\) and can be found as the unique weak solution of

$$\begin{aligned} - \Delta \varphi + \varphi = 0 \quad \text {in } \Omega , \qquad \varphi |_{\Gamma } = f \quad \text {on } \Gamma . \end{aligned}$$
(7)

The ansatz \({\widehat{f}}=\varphi +\varphi _{0}\) with \(\varphi _{0}\in {\mathsf {H}}^1_0(\Omega )\) solving \(\Delta \varphi _{0}=-\varphi \) yields a harmonic extension \({\widehat{f}}\in {\mathsf {H}}^1(\Omega )\) of \(f\in {\mathsf {H}}^{1/2}(\Gamma )\), i.e.,

$$\begin{aligned} \Delta {\widehat{f}} = 0 \quad \text {in } \Omega , \qquad {\widehat{f}}|_{\Gamma } = f \quad \text {on } \Gamma . \end{aligned}$$
(8)

From \(\Vert \nabla {\widehat{f}}\Vert _{{\mathsf {L}}^2(\Omega )}^2 =\langle \nabla {\widehat{f}} \, , \, \nabla \varphi \rangle _{{\mathsf {L}}^2(\Omega )}\), it follows that \(\Vert \nabla {\widehat{f}}\Vert _{{\mathsf {L}}^2(\Omega )}\le \Vert \nabla \varphi \Vert _{{\mathsf {L}}^2(\Omega )}\le \Vert f\Vert _{{\mathsf {H}}^{1/2}(\Gamma )}\). \(\square \)

Finally, we need the dual space \({\mathsf {H}}^{-1/2}(\Gamma ) := {\mathsf {H}}^{1/2}(\Gamma )'\) equipped with the natural norm

$$\begin{aligned} \Vert f\Vert _{{\mathsf {H}}^{-1/2}(\Gamma )} := \sup _{0\ne \psi \in {\mathsf {H}}^{1/2}(\Gamma )} \frac{\langle \psi \,,\,f\rangle _{\Gamma }}{\Vert \psi \Vert _{{\mathsf {H}}^{1/2}(\Gamma )}}, \end{aligned}$$

where the \({\mathsf {H}}^{1/2}(\Gamma ) \times {\mathsf {H}}^{-1/2}(\Gamma )\)-duality product \(\langle \cdot \,,\,\cdot \rangle _{\Gamma }\) extends, as usual, the \({\mathsf {L}}^2(\Gamma )\) scalar product \(\langle \cdot \, , \, \cdot \rangle _{{\mathsf {L}}^2(\Gamma )}\). We stress that \(\Gamma = \partial \Omega \) and hence \({\mathsf {H}}^{1/2}(\Gamma )=\widetilde{{\mathsf {H}}}^{1/2}(\Gamma )\). We recall the Gelfand triple \({\mathsf {H}}^{1/2}(\Gamma )\subset {\mathsf {L}}^2(\Gamma )\subset {\mathsf {H}}^{-1/2}(\Gamma )\) and refer to [8] for the fact that \({\mathsf {H}}^{-1/2}(\Gamma )\) can also be characterised as the range of normal traces \(\varvec{n} \cdot (\varvec{\cdot })|_{\Gamma }:{\mathsf {H}}(\mathrm{div},\Omega )\rightarrow {\mathsf {H}}^{-1/2}(\Gamma )\) of \({\mathsf {H}}(\mathrm{div},\Omega )\)-vector fields, i.e.,

$$\begin{aligned} {\mathsf {H}}^{-1/2}(\Gamma ) = \big \{\varvec{n} \cdot \varvec{\sigma }|_{\Gamma } \,:\, \varvec{\sigma }\in {\mathsf {H}}(\mathrm{div},\Omega ) \big \}. \end{aligned}$$

Definition 2

(Boundary layer) A subset \(S \subset \Omega \) is called a boundary layer, if it is a Lipschitz domain with \(\Gamma \subset \partial S\), which admits a conforming triangulation \({\mathcal {T}}_h^S\) into simplices. We then define \(\Gamma ^{c}:=\partial S \setminus \Gamma \). In particular, we define the corresponding induced triangulation of \(\Gamma \) by

$$\begin{aligned} {\mathcal {F}}^{\Gamma }_h :={\mathcal {T}}^S_h|_{\Gamma } :=\big \{F \,:\, F\subset \Gamma \text { and }F\text { is a face of some simplex } T\in {\mathcal {T}}^S_h \big \}. \end{aligned}$$
(9)

For \(q\in \mathbb {N}_{0}\) and \({\mathcal {P}}^{q}\) being the space of polynomials of degree q, we define

$$\begin{aligned} {\mathcal {P}}^{q}({\mathcal {T}}^S_h)&:=\big \{\varphi _h\in {\mathsf {L}}^\infty (S) \,:\, \varphi _h|_{T}\in {\mathcal {P}}^{q} \text { for all }T\in {\mathcal {T}}^S_h \big \},\\ {\mathcal {P}}^{q}({\mathcal {F}}^{\Gamma }_h)&:=\big \{\psi _h\in {\mathsf {L}}^\infty (\Gamma ) \,:\, \psi _h|_{F}\in {\mathcal {P}}^{q} \text { for all }F\in {\mathcal {F}}^{\Gamma }_h \big \}. \end{aligned}$$

Moreover, for \(p \in \mathbb {N}\), we employ the standard \({\mathsf {H}}^1\)-conforming FEM spaces

$$\begin{aligned} {\mathcal {S}}^p({\mathcal {T}}^S_h):= & {} \big \{\varphi _h\in {\mathsf {C}}^{0}({\overline{S}}) \,:\, \varphi _h|_{T}\in {\mathcal {P}}^p \text { for all }T\in {\mathcal {T}}^S_h \big \} \subset {\mathsf {H}}^1(S), \\ {\mathcal {S}}^p_{0}({\mathcal {T}}^S_h):= & {} \big \{\varphi _h \in {\mathcal {S}}^p({\mathcal {T}}_h^S) \,:\, \varphi _h|_{\partial S} = 0 \big \}\subset {\mathsf {H}}^1_0(S), \\ {\mathcal {S}}^p_{\Gamma ^c}({\mathcal {T}}^S_h):= & {} \big \{\varphi _h \in {\mathcal {S}}^p({\mathcal {T}}_h^S) \,:\, \varphi _h|_{\Gamma ^c} = 0 \big \}. \end{aligned}$$

Let \({\mathcal {F}}^S_h\) denote the set of all interior faces, i.e., all \(F\in {\mathcal {F}}^S_h\) admit unique \(T_{+},\, T_{-}\in {\mathcal {T}}^S_h\) with \(F = T_{+} \cap T_{-}\). For \(q\in \mathbb {N}_{0}\), we define the \({\mathsf {H}}(\mathrm{div})\)-conforming Raviart–Thomas space

$$\begin{aligned} {{\mathsf {RT}}}^{q} ({\mathcal {T}}^S_h)&= \big \{\varvec{\sigma }_h\in {\mathsf {L}}^\infty (S) \,:\, \forall \, T\in {\mathcal {T}}^S_h\quad \exists \, ({\varvec{a}} ,b)\in {\mathcal {P}}^{q}(\mathbb {R}^d)^{d} \times {\mathcal {P}}^{q}(\mathbb {R}^d) \quad \forall \, x\in T \\&\quad \varvec{\sigma }_h(x) = {\varvec{a}}(x) + b(x) \, x \quad \text { and }\quad \forall \, F\in {\mathcal {F}}^S_h\quad {\varvec{n}}_F \cdot [\varvec{\sigma }_h]_F = 0 \big \} \subset {\mathsf {H}}(\mathrm{div},S), \end{aligned}$$

where \({\varvec{n}}_F\) is a normal vector for the face \(F\in {\mathcal {F}}^S_h\) and \([\varvec{\sigma }_h]_F := \varvec{\sigma }_h|_{T_+} - \varvec{\sigma }_h|_{T_-}\) denotes the jump of \(\varvec{\sigma }_h\) across F. Based on that, we let

$$\begin{aligned} {{\mathsf {R}}}^{q}_{\Gamma ^{c}} ({\mathcal {T}}^S_h) := \big \{\varvec{\sigma }_h\in {\mathsf {RT}}^{q} ({\mathcal {T}}^S_h) \,:\, \varvec{n} \cdot \varvec{\sigma }_h|_{\Gamma ^{c}} = 0 \big \}. \end{aligned}$$

Remark 3

In the proofs of Section 3 below, we exploit that for arbitrary \(v_h \in {\mathcal {S}}^p_{\Gamma ^c}({\mathcal {T}}_h^S)\) and \(\varvec{\sigma }_h \in {\mathsf {RT}}^{q}_{\Gamma ^c}({\mathcal {T}}_h^S)\) the definitions

$$\begin{aligned} {\check{v}}_h := {\left\{ \begin{array}{ll} v_h &{}\,{in }\,S \\ 0 &{}{in }\, \Omega \setminus S\end{array}\right. } \qquad {and} \qquad \check{\varvec{\sigma }}_h :={\left\{ \begin{array}{ll} \varvec{\sigma }_h &{} {in } \, S \\ 0 &{} {in }\,\Omega \,{\setminus }\, S\end{array}\right. } \end{aligned}$$
(10)

provide conforming extensions \({\check{v}}_h \in {\mathsf {H}}^1(\Omega )\) and \(\check{\varvec{\sigma }}_h \in {\mathsf {H}}(\mathrm{div},\Omega )\). In particular, we will implicitly identify \(v_h\) (resp. \(\varvec{\sigma }_h\)) with its zero-extension \({\check{v}}_h\) (resp. \(\check{\varvec{\sigma }}_h\)). \(\square \)

2.2 General problem setting

From now on, we assume that \(\Omega \), \(\Gamma \), and a boundary layer S together with \(\Gamma ^{c}\) and corresponding FEM spaces are given. Let \(g\in {\mathsf {H}}^{1/2}(\Gamma )\) and let \(u\in {\mathsf {H}}^1(\Omega )\) be the unique solution of the homogeneous Dirichlet–Laplace problem

$$\begin{aligned} \Delta u&= 0 \quad \text {in } \Omega , \end{aligned}$$
(11a)
$$\begin{aligned} u&= g \quad \text {on } \Gamma . \end{aligned}$$
(11b)

In particular, we have \(\nabla u\in {\mathsf {H}}(\mathrm{div},\Omega )\) with \(\mathrm{div\,}\nabla u=0\). Note that \(u=\widehat{g}\in {\mathsf {H}}^1(\Omega )\) is the unique harmonic extension of g with \(\Vert \nabla u\Vert _{{\mathsf {L}}^2(\Omega )}\le \Vert g\Vert _{{\mathsf {H}}^{1/2}(\Gamma )}\); see (8).

2.3 Weakly-singular integral equation

The single-layer potential (2) provides a continuous linear operator \({\widetilde{V}}: {\mathsf {H}}^{-1/2}(\Gamma ) \rightarrow {\mathsf {H}}^1(\Omega )\). Moreover, its concatenation with the trace defines a continuous linear operator \(V:{\mathsf {H}}^{-1/2}(\Gamma )\rightarrow {\mathsf {H}}^{1/2}(\Gamma )\), which is elliptic on \({\mathsf {H}}^{-1/2}(\Gamma )\) (under the scaling condition \(\mathrm{diam}(\Omega ) < 1\) for \(d = 2\)). Hence, the Lax–Milgram lemma guarantees existence and uniqueness of \(\phi \in {\mathsf {H}}^{-1/2}(\Gamma )\) such that

$$\begin{aligned} \langle V\phi \,,\,\psi \rangle _{\Gamma } =\langle g\,,\,\psi \rangle _{\Gamma } \quad \text {for all }\psi \in {\mathsf {H}}^{-1/2}(\Gamma ). \end{aligned}$$
(12)

According to the Hahn–Banach theorem, the latter variational formulation is equivalent to the identity \(V \phi = g\) in \({\mathsf {H}}^{1/2}(\Gamma )\) from (3). For details on elliptic boundary integral equations, we refer, e.g., to the monographs [30, 34].

2.4 Galerkin boundary element method

Given a triangulation \({\mathcal {F}}^{\Gamma }_h\) of \(\Gamma \), the lowest-order Galerkin BEM seeks \(\phi _h\in {\mathcal {P}}^0({\mathcal {F}}^{\Gamma }_h)\), which solves the discretized weak form

$$\begin{aligned} \langle V\phi _h \, , \, \psi _h\rangle _{{\mathsf {L}}^2(\Gamma )} =\langle g \, , \, \psi _h\rangle _{{\mathsf {L}}^2(\Gamma )} \quad \text {for all }\psi _h\in {\mathcal {P}}^0({\mathcal {F}}^{\Gamma }_h). \end{aligned}$$
(13)

The Lax–Milgram lemma also applies to the conforming Galerkin discretization and proves existence and uniqueness of \(\phi _h\in {\mathcal {P}}^0({\mathcal {F}}^{\Gamma }_h)\). We note that in the discrete version (13) of (12) the \({\mathsf {H}}^{1/2}(\Gamma ) \times {\mathsf {H}}^{-1/2}(\Gamma )\) duality product coincides, in fact, with the \({\mathsf {L}}^2(\Gamma )\) scalar product. For details on the (Galerkin) boundary element method, we refer, e.g., to the monographs [27, 42, 44].

3 Functional a posteriori BEM error estimation

In this section, we prove the error identity (6) and provide efficiently computable upper and lower bounds for the potential error \(\Vert \nabla (u - u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\), where \(u \in {\mathsf {H}}^1(\Omega )\) solves (11) and \(u_h := {\widetilde{V}} \phi _h\) is defined in (2).

3.1 Functional error identity

The fact that the error \(u-u_h\) satisfies (11a) exactly is a powerful tool. However, the consideration of the potential \(u_h\) from a BEM comes with a drawback: it is not a discrete function and lacks further a priori knowledge like the Galerkin orthogonality, which is obviously never available for any approximation \(u_h := {\widetilde{V}} \phi _h \approx u \in {\mathsf {H}}^1(\Omega )\). Functional a posteriori error estimates are eminently suitable for the BEM, since they do not require any such a priori assumption. On top of that, for problems with homogeneous (volume) right-hand sides, they provide constant-free error identities. For the Laplacian, the key argument is the Dirichlet principle:

$$\begin{aligned} \text {Harmonic functions are minimisers of the Dirichlet energy}\, \Vert \nabla w\Vert _{{\mathsf {L}}^2(\Omega )}^2. \end{aligned}$$

Note that the boundary residual \(g-u_h|_{\Gamma }\in {\mathsf {H}}^{1/2}(\Gamma )\) is essential for both the majorant \(\mathbf {\overline{{\mathfrak {M}}}}\) and the minorant \(\mathbf {\underline{{\mathfrak {M}}}}\), see (14) in Theorem 4 for definitions, and comprises all relevant information about the error.

Theorem 4

(Functional a posteriori error identities) Let \(g\in {\mathsf {H}}^{1/2}(\Gamma )\) and let \(u \in {\mathsf {H}}^1(\Omega )\) be the unique solution of (11). For any approximation \(v\in {\mathsf {H}}^1(\Omega )\) with \(\Delta v=0\), the equalities (6) hold true. More precisely,

$$\begin{aligned} \max _{\begin{array}{c} \varvec{\tau }\in {\mathsf {L}}^2(\Omega ) \\ \mathrm{div\,}\varvec{\tau } = 0 \end{array}} \mathbf {\underline{\mathfrak {M}}}(\varvec{\tau };v|_{\Gamma },g) = \big \Vert \nabla (u-v)\big \Vert _{{\mathsf {L}}^2(\Omega )}^2 = \min _{\begin{array}{c} w\in {\mathsf {H}}^1(\Omega ) \\ w|_{\Gamma } = g - v|_{\Gamma } \end{array}} \mathbf {\overline{\mathfrak {M}}}(\nabla w), \end{aligned}$$
(14a)

where

$$\begin{aligned} \mathbf {\underline{\mathfrak {M}}}(\varvec{\tau };v|_{\Gamma },g)&:= 2 \,\langle g-v|_{\Gamma }\,,\,\varvec{n} \cdot \varvec{\tau }|_{\Gamma }\rangle _{\Gamma } - \Vert \varvec{\tau }\Vert _{{\mathsf {L}}^2(\Omega )}^2, \nonumber \\&\mathbf {\overline{\mathfrak {M}}}(\nabla w) := \Vert \nabla w\Vert _{{\mathsf {L}}^2(\Omega )}^2. \end{aligned}$$
(14b)

The unique maximiser is \(\underline{\varvec{\tau }} = \nabla (u-v)\). The unique minimiser is \({{\overline{w}}} = u - v\).

Proof

The proof is split into two parts.

  • Upper bound: Let \({\widetilde{w}}\in {\mathsf {H}}^1(\Omega )\) with \(\widetilde{w}|_{\Gamma } = u|_{\Gamma } = g\). Since we have \(\Delta (u-v)=0\) and \(u-{\widetilde{w}}\in {\mathsf {H}}^1_0(\Omega )\), integration by parts shows that

    $$\begin{aligned} \big \Vert \nabla (u-v)\big \Vert _{{\mathsf {L}}^2(\Omega )}^2 = \underbrace{\big \langle \nabla (u-\widetilde{w}) \, , \, \nabla (u-v)\big \rangle _{{\mathsf {L}}^2(\Omega )}}_{=0} + \big \langle \nabla ({\widetilde{w}}-v) \, , \, \nabla (u-v)\big \rangle _{{\mathsf {L}}^2(\Omega )}. \end{aligned}$$

    This yields \(\Vert \nabla (u-v)\Vert _{{\mathsf {L}}^2(\Omega )} \le \Vert \nabla ({\widetilde{w}}-v)\Vert _{{\mathsf {L}}^2(\Omega )}\). The substitution \(w:={\widetilde{w}} - v\) proves that

    $$\begin{aligned} \big \Vert \nabla (u-v)\big \Vert _{{\mathsf {L}}^2(\Omega )} \le \inf _{\begin{array}{c} w\in {\mathsf {H}}^1(\Omega ) \\ w|_{\Gamma } = g - v|_{\Gamma } \end{array}} \Vert \nabla w\Vert _{{\mathsf {L}}^2(\Omega )}. \end{aligned}$$

    The unique infimum is attained at \(w = u-v\).

  • Lower bound: In any Hilbert space \({\mathcal {H}}\) with inner product \(\langle \cdot \, , \, \cdot \rangle _{{\mathcal {H}}}\) and induced norm \(\Vert \cdot \Vert _{{\mathcal {H}}}\), it holds that

    $$\begin{aligned} \Vert a\Vert _{{\mathcal {H}}}^2 = \max _{b\in {\mathcal {H}}} \left( 2 \,\langle a \, , \, b\rangle _{{\mathcal {H}}} - \Vert b\Vert _{{\mathcal {H}}}^2 \right) \quad \text {for all } a\in {\mathcal {H}}, \end{aligned}$$

    where the maximum is unique and attained for \(b = a\). Since

    $$\begin{aligned} \nabla (u-v)\in {\mathcal {H}} :=\big \{\varvec{\sigma }\in {\mathsf {H}}(\mathrm{div},\Omega ) \,:\, \mathrm{div\,}\varvec{\sigma }=0 \big \}, \end{aligned}$$

    we have

    $$\begin{aligned} \big \Vert \nabla (u-v)\big \Vert _{{\mathsf {L}}^2(\Omega )}^2 = \big \Vert \nabla (u-v)\big \Vert _{{\mathcal {H}}}^2&= \max _{\begin{array}{c} \varvec{\tau }\in {\mathsf {L}}^2(\Omega ) \\ \mathrm{div\,} \varvec{\tau } = 0 \end{array}} \Big (2 \,\big \langle \nabla (u-v) \, , \, \varvec{\tau }\big \rangle _{{\mathsf {L}}^2(\Omega )} - \Vert \varvec{\tau }\Vert _{{\mathsf {L}}^2(\Omega )}^2 \Big )\\&= \max _{\begin{array}{c} \varvec{\tau }\in {\mathsf {L}}^2(\Omega ) \\ \mathrm{div\,} \varvec{\tau } = 0 \end{array}} \Big ( \, 2 \,\langle g-v|_{\Gamma }\,,\,\varvec{n} \cdot \varvec{\tau }|_{\Gamma }\rangle _{\Gamma } - \ \Vert \varvec{\tau }\Vert _{{\mathsf {L}}^2(\Omega )}^2 \Big ). \end{aligned}$$

    In particular, the maximum is attained for \(\varvec{\tau } = \nabla (u-v)\). This concludes the proof.

\(\square \)

To ease the readability, the remainder of this chapter focusses on our numerical setup. For the functional analytic framework in a Sobolev space setting, which might be of independent interest, we refer to the appendix of the extended preprint [32] of this work.

3.2 Computable error bounds

We aim at error bounds obtained by solving FEM problems on a boundary layer \(S \subset \Omega \). For the maximization problem in (14), the constraint \(\mathrm{div\,} \varvec{\tau } = 0\) can be realized by a mixed formulation (see also [32, Lemma 15] of the extended preprint of this work). However, the boundary condition \(w|_{\Gamma } = g - v|_{\Gamma }\) cannot be satisfied exactly by any piecewise polynomial solution \(w_h\) corresponding to (14). Therefore, the upper bound involves an additional oscillation term given by a discretisation operator \(J_h\), which will be the \({\mathsf {L}}^2(\Gamma )\)-orthogonal projection in the numerical experiments of Sections 5 and 6 below.

Theorem 5

(Computable bounds via boundary layer) Let \(v\in {\mathsf {H}}^1(\Omega )\) with \(\Delta v=0\). Let \(p\in \mathbb {N}\) and let \(J_h: {\mathsf {H}}^{1/2}(\Gamma ) \rightarrow {\mathcal {S}}^p({\mathcal {F}}_h^{\Gamma }) :=\big \{\varphi _h|_{\Gamma } \,:\, \varphi _h \in {\mathcal {S}}^p({\mathcal {T}}^S_h) \big \}\) be an arbitrary projection operator. Moreover, let \(w_h\in {\mathcal {S}}^p({\mathcal {T}}^S_h)\) be the unique solution of

$$\begin{aligned} \langle \nabla w_h \, , \, \nabla \varphi _h\rangle _{{\mathsf {L}}^2(S)} = 0 \quad \text {for all }\, \varphi _h\in {\mathcal {S}}^p_{0}({\mathcal {T}}^S_h) \ \text { with } \ w_h|_{\partial S} = {\left\{ \begin{array}{ll} J_h(g - v|_{\Gamma }) \, &{} \!\text {on } \Gamma ,\\ 0 &{} \!\text {on } \Gamma ^{c}. \end{array}\right. } \end{aligned}$$
(15)

For \(q\in \mathbb {N}_{0}\), let the pair \((\varvec{\tau }_h,\omega _h)\in {\mathsf {RT}}^{q}_{\Gamma ^{c}} ({\mathcal {T}}^S_h) \times {\mathcal {P}}^{q}({\mathcal {T}}^S_h)\) be the unique solution of

$$\begin{aligned} \langle \varvec{\tau }_h \, , \, \varvec{\sigma }_h\rangle _{{\mathsf {L}}^2(S)} + \langle \mathrm{div\,} \varvec{\sigma }_h \, , \, \omega _h\rangle _{{\mathsf {L}}^2(S)}&= \langle g - v|_{\Gamma } \, , \, \varvec{n} \cdot \varvec{\sigma }_h|_{\Gamma }\rangle _{{\mathsf {L}}^2(\Gamma )}, \end{aligned}$$
(16a)
$$\begin{aligned} \langle \mathrm{div\,}\varvec{\tau }_h \, , \, \psi _h\rangle _{{\mathsf {L}}^2(S)}&= 0 \end{aligned}$$
(16b)

for all pairs \((\varvec{\sigma }_h,\psi _h)\in \mathsf {RT}^{q}_{\Gamma ^{c}} ({\mathcal {T}}^S_h) \times {\mathcal {P}}^{q}({\mathcal {T}}^S_h)\). Then, it holds that

$$\begin{aligned}&2 \,\langle g - v|_{\Gamma } \, , \, \varvec{n} \cdot \varvec{\tau }_h|_{\Gamma }\rangle _{{\mathsf {L}}^2(\Gamma )} - \Vert \varvec{\tau }_h\Vert _{{\mathsf {L}}^2(S)}^2 \le \Vert \nabla (u-v)\Vert _{{\mathsf {L}}^2(\Omega )}^2 \end{aligned}$$
(17a)
$$\begin{aligned}&\le \Vert \nabla w_h\Vert _{{\mathsf {L}}^2(S)} + \big \Vert (1-J_h) (g-v|_{\Gamma })\big \Vert _{{\mathsf {H}}^{1/2}(\Gamma )}. \end{aligned}$$
(17b)

Proof

It is well-known that (15) admits a unique solution \(w_h\in {\mathcal {S}}^p({\mathcal {T}}^S_h)\), being the natural FEM discretization of an homogeneous Dirichlet–Laplace problem with inhomogeneous Dirichlet conditions; see, e.g., [5, 7, 41]. To prove the upper bound (17b), let \({\widehat{f}}_h\in {\mathsf {H}}^1(\Omega )\) be the (unique) harmonic extension of \(f_h:=(1-J_h)(g - v|_{\Gamma })\); see Remark 1. Then, Theorem 4 and \(\Vert \nabla {\widehat{f}}_h\Vert _{{\mathsf {L}}^2(\Omega )}\le \Vert f_h\Vert _{{\mathsf {H}}^{1/2}(\Gamma )}\) lead to

$$\begin{aligned} \big \Vert \nabla (u-v)\big \Vert _{{\mathsf {L}}^2(\Omega )}&=\min _{\begin{array}{c} w\in {\mathsf {H}}^1(\Omega ) \\ w|_{\Gamma } = g - v|_{\Gamma } \end{array}} \Vert \nabla w\Vert _{{\mathsf {L}}^2(\Omega )}\\&\le \min _{\begin{array}{c} w\in {\mathsf {H}}^1(\Omega ) \\ w|_{\Gamma } = g - v|_{\Gamma } \end{array}} \big \Vert \nabla (w-{\widehat{f}}_h)\big \Vert _{{\mathsf {L}}^2(\Omega )} + \Vert \nabla {\widehat{f}}_h\Vert _{{\mathsf {L}}^2(\Omega )} \\&\le \min _{\begin{array}{c} w\in {\mathsf {H}}^1(\Omega ) \\ w|_{\Gamma } = J_h(g - v|_{\Gamma }) \end{array}} \Vert \nabla w\Vert _{{\mathsf {L}}^2(\Omega )} + \Vert f_h\Vert _{{\mathsf {H}}^{1/2}(\Gamma )}, \end{aligned}$$

where we have finally employed the substitution \(w-{\widehat{f}}_h\leadsto w\). Since the zero-extension of \(w_h\) belongs to \({\mathsf {H}}^1(\Omega )\) according to Remark 3 and satisfies the correct boundary condition, this proves the computable upper bound (17b).

For existence and uniqueness of (16), we refer, e.g., to [6, 8]. Since \(\mathrm{div\,} \varvec{\tau }_h \in {\mathcal {P}}^q({\mathcal {T}}_h^S) \subset {\mathsf {L}}^2(\Omega )\) by definition of \(\mathsf {RT}^{q}({\mathcal {T}}_h^S)\), it follows from (16b) that \(\varvec{\tau }_h \in \mathsf {RT}^{q}_{\Gamma ^c}({\mathcal {T}}_h^S) \subset {\mathsf {H}}(\mathrm{div},S)\) with \(\mathrm{div\,} \varvec{\tau }_h = 0\) in S. According to Remark 3, the zero-extension of \(\varvec{\tau }_h\) belongs to \({\mathsf {H}}(\mathrm{div},\Omega )\) with \(\mathrm{div\,} \varvec{\tau }_h = 0\) in \(\Omega \). The computable lower bound (17a) thus follows from Theorem 4. \(\square \)

In order to circumvent the implementation of the constraint \(\mathrm{div\,} \varvec{\tau } = 0\), it is also an option to reformulate the maximization problem in (14) by means of potentials. While the 3D case involves vector potentials, for 2D such an approach is particularly attractive due to the possible use of scalar potentials. In the following, we thus concentrate on \(d = 2\) (and refer, for \(d = 3\), to the appendix of the extended preprint [32] of this work). To this end, we recall the definitions of the 2D curl operators

$$\begin{aligned} \mathbf{curl} \,\, \varphi =\begin{bmatrix} -\partial _2\varphi \\ \partial _1\varphi \end{bmatrix} \quad \text {for } \varphi : \Omega \rightarrow \mathbb {R}\quad \text {resp.} \quad \mathrm{curl} \,\, \varvec{\varphi }= \partial _1 \varvec{\varphi }_2 - \partial _2 \varvec{\varphi }_1 \quad \text {for } \varvec{\varphi }: \Omega \rightarrow \mathbb {R}^2. \end{aligned}$$

Note that \(\mathrm{div\,}{} \mathbf{curl} \, \, \varphi = 0.\) For \(\varphi \in {\mathsf {H}}^1(\Omega )\), we thus have \(\mathbf{curl} \, \, \varphi \in {\mathsf {H}}(\mathrm{div},\Omega )\) so that the Neumann trace \(\varvec{n} \cdot \mathbf{curl} \,\,\varphi |_{\Gamma }\in {\mathsf {H}}^{-1/2}(\Gamma )\) is well-defined. In particular, we have

$$\begin{aligned} \langle \nabla \varphi \, , \, \nabla \psi \rangle _{{\mathsf {L}}^2(\Omega )} =\langle \mathbf {curl}\,\varphi \, , \, \mathbf {curl}\,\psi \rangle _{{\mathsf {L}}^2(\Omega )} \quad \text {for all }\varphi ,\psi \in {\mathsf {H}}^1(\Omega ). \end{aligned}$$

Corollary 6

(Computable lower bound via boundary layer—\({\mathsf {H}}^1\)-conforming) Suppose that \(d=2\). Let \(v\in {\mathsf {H}}^1(\Omega )\) with \(\Delta v=0\). For \(p \in \mathbb {N}\), let \({\widetilde{w}}_h\in {\mathcal {S}}^p_{\Gamma ^{c}}({\mathcal {T}}_h^S)\) be the unique solution of

$$\begin{aligned} \langle \nabla {\widetilde{w}}_h \, , \, \nabla \varphi _h\rangle _{{\mathsf {L}}^2(S)} =\langle g-v|_{\Gamma } \, , \, \varvec{n} \cdot \mathbf {curl}\, \, \varphi _h|_{\Gamma }\rangle _{{\mathsf {L}}^2(\Gamma )} \quad \text {for all }\varphi _h\in {\mathcal {S}}^p_{\Gamma ^{c}}({\mathcal {T}}^S_h). \end{aligned}$$
(18)

Then, it holds that

$$\begin{aligned} 2\langle g-v|_{\Gamma } \, , \, \varvec{n} \cdot \mathbf {curl}\, \, \widetilde{w}_h|_{\Gamma }\rangle _{{\mathsf {L}}^2(\Gamma )} -\Vert \nabla \widetilde{w}_h\Vert _{{\mathsf {L}}^2(S)}^2 \le \big \Vert \nabla (u-v)\big \Vert _{{\mathsf {L}}^2(\Omega )}^2. \end{aligned}$$
(19)

Proof

It is well-known that (18) admits a unique solution \({\widetilde{w}}_h \in {\mathcal {S}}^p_{\Gamma ^{c}}({\mathcal {T}}_h^S)\) being the natural FEM discretization of a mixed Dirichlet–Neumann–Laplace problem; see, e.g., [7]. According to Remark 3, the zero-extension of \(\widetilde{w}_h\) belongs to \({\mathsf {H}}^1(\Omega )\) and hence \(\widetilde{\varvec{\tau }}_h:=\mathbf{curl} \, \, {\widetilde{w}}_h \in {\mathsf {H}}(\mathrm{div},\Omega )\) satisfies that \(\mathrm{div\,}\widetilde{\varvec{\tau }}_h=0\) with \(\varvec{n} \cdot \mathbf{curl} \, \, {\widetilde{w}}_h|_{\Gamma } = \varvec{n} \cdot \widetilde{\varvec{\tau }}_h|_{\Gamma }\) and \(\Vert \widetilde{\varvec{\tau }}_h\Vert _{{\mathsf {L}}^2(\Omega )} = \Vert \mathbf{curl} \, \, {\widetilde{w}}_h\Vert _{{\mathsf {L}}^2(\Omega )} = \Vert \nabla {\widetilde{w}}_h\Vert _{{\mathsf {L}}^2(\Omega )}\). The claim thus follows from Theorem 4. \(\square \)

4 Adaptive algorithm

Fig. 1
figure 1

Example geometry \(\Omega = (0,1/2)^2\) with FEM triangulation \({\mathcal {T}}_h\) (gray, left), induced BEM mesh \({{\mathcal {F}}^\Gamma _h}\) on \({\Gamma = \partial \Omega }\) (red), generated boundary layer S with mesh \({{\mathcal {T}}_h^S}\) (blue), and interior boundary \({\Gamma ^c}\) (green), illustrated from left to right

4.1 Triangulations and mesh-refinement

In our numerical experiments, we start from a conforming simplicial triangulation \({\mathcal {T}}_h\) such that \(\Gamma \subset \bigcup _{T \in {\mathcal {T}}_h}T \subseteq {{\overline{\Omega }}}\). We obtain the boundary layer \(S \subset \Omega \) as the second-order patch of \(\Gamma \) with respect to \({\mathcal {T}}_h\), i.e.,

$$\begin{aligned} {\mathcal {T}}_h^S&:= \big \{T\in {\mathcal {T}}_h \,:\, \exists \, T'\in {\mathcal {T}}_h, \quad T' \cap \Gamma \ne \emptyset \ne T \cap T' \big \} \text { and } \nonumber \\ S&:= \mathrm{interior}\Big ( \bigcup _{T\in {\mathcal {T}}_h^S} T \Big ). \end{aligned}$$
(20)

Moreover, recall the BEM mesh \({\mathcal {F}}_h^\Gamma := {\mathcal {T}}_h^S|_\Gamma = {\mathcal {T}}_h|_\Gamma \) from (9). These definitions are illustrated in Fig. 1.

For (local) mesh-refinement, we employ newest 2D vertex bisection [31, 45]; see also [25, Section 5.2] for a short but precise statement of the algorithm and the MATLAB implementation we build on. The adaptive strategy will only mark elements of \({\mathcal {T}}_h^S\), but refinement will be done with respect to the full triangulation \({\mathcal {T}}_h\). In particular, we stress that the second-order patch S will generically change, if the triangulation \({\mathcal {T}}_h\) is refined; see, e.g., Fig. 2. In this way, we guarantee that the number of degrees of freedom with respect to \({\mathcal {T}}_h^S\) will increase proportionally to those with respect to \({\mathcal {F}}^\Gamma _h\); see also Tables 2, 3, 4 and 5 below, where \(\#{\mathcal {F}}^\Gamma _h\) denotes the number of BEM elements, while \(\#{\mathcal {T}}_h^S\) denotes the number of FEM elements in the boundary layer \(S \subset \Omega \).

4.2 Data oscillations

The upper bound (17b) in Theorem 5 involves the data approximation term \(\big \Vert (1-J_h) (g-u_h|_{\Gamma })\big \Vert _{{\mathsf {H}}^{1/2}(\Gamma )}\), where \(u_h:= {\widetilde{V}} \phi _h\). Besides the fact that we still have to specify the operator \(J_h: {\mathsf {H}}^{1/2}(\Gamma ) \rightarrow {\mathcal {S}}^p({\mathcal {F}}_h^\Gamma )\) from Theorem 5, we note that the nonlocal nature of the \({\mathsf {H}}^{1/2}(\Gamma )\)-norm makes this term hardly computable.

In the following, we choose

$$\begin{aligned} J_h: {\mathsf {L}}^2(\Gamma ) \rightarrow {\mathcal {S}}^p({\mathcal {F}}^{\Gamma }_h) = \big \{\varphi _h|_{\Gamma } \,:\, \varphi _h\in {\mathcal {S}}^p({\mathcal {T}}_h) \big \}, \end{aligned}$$
(21a)

as the \({\mathsf {L}}^2(\Gamma )\)-orthogonal projection onto \({\mathcal {S}}^p({\mathcal {F}}^{\Gamma }_h)\), which is uniquely determined by

$$\begin{aligned} \langle J_h\varphi \, , \, \psi _h\rangle _{{\mathsf {L}}^2(\Gamma )} = \langle \varphi \, , \, \psi _h\rangle _{{\mathsf {L}}^2(\Gamma )} \quad \text {for all } \varphi \in {\mathsf {L}}^2(\Gamma ) \text { and all } \psi _h \in {\mathcal {S}}^p({\mathcal {F}}_h^\Gamma ). \end{aligned}$$
(21b)

For \(d = 2\), it follows under mild conditions on \({\mathcal {F}}^{\Gamma }_h\) that \(J_h\) is \({\mathsf {H}}^1(\Gamma )\)-stable, i.e.,

$$\begin{aligned} \Vert \nabla J_hf\Vert _{{\mathsf {L}}^2(\Gamma )} \le C_{\mathsf {stab}}\Vert \nabla f\Vert _{{\mathsf {L}}^2(\Gamma )} \quad \text {for all }f\in {\mathsf {H}}^1(\Gamma ); \end{aligned}$$
(22)

see [15]. We note that these conditions are automatically satisfied for \({\mathcal {F}}^{\Gamma }_h = {\mathcal {T}}_h|_{\Gamma }\), since \({\mathcal {T}}_h\) is only refined by newest vertex bisection. For \(d = 3\), the \({\mathsf {H}}^1(\Gamma )\)-stability (22) is known for low-order FEM (on the 2D manifold \(\Gamma \)); see [31] for \(p = 1\) and [26] for \(p \in \{1, \dots , 12\}\). We recall the following result from [4]:

Lemma 7

If the \({\mathsf {L}}^2(\Gamma )\)-orthogonal projection \(J_h: {\mathsf {L}}^2(\Gamma ) \rightarrow {\mathcal {S}}^p({\mathcal {F}}_h^\Gamma )\) from (21) is \({\mathsf {H}}^1(\Gamma )\)-stable (22), then it holds for all \(f\in {\mathsf {H}}^1(\Gamma )\) that

$$\begin{aligned}&C_{\mathsf {osc}}^{-1}\big \Vert (1-J_h)f\big \Vert _{{\mathsf {H}}^{1/2}(\Gamma )} \le \min _{f_h\in {\mathcal {S}}^p({\mathcal {F}}_h^\Gamma )} \big \Vert f-f_h\big \Vert _{{\mathsf {H}}^{1/2}(\Gamma )} \\&\quad \le C_{\mathsf {osc}}\min _{f_h\in {\mathcal {S}}^p({\mathcal {F}}_h^\Gamma )} \big \Vert h^{1/2}\nabla _{\Gamma }(f-f_h)\big \Vert _{{\mathsf {L}}^2(\Gamma )}, \end{aligned}$$

where \(h\in {\mathsf {L}}^\infty (\Omega )\) is the local mesh-width function defined by \(h|_{F} := \mathrm{diam}(F)\) for all \(F\in {\mathcal {F}}^{\Gamma }_h\). The constant \(C_{\mathsf {osc}} > 0\) depends only on \(C_{\mathsf {stab}}\) and the shape regularity of \({\mathcal {T}}_h\).

Provided that the given Dirichlet boundary data satisfy \(g\in {\mathsf {H}}^1(\Gamma )\), the foregoing lemma allows to dominate the data approximation term by

$$\begin{aligned}&C_{\mathsf {osc}}^{-2} \big \Vert (1-J_h) (g-u_h|_{\Gamma })\big \Vert _{{\mathsf {H}}^{1/2}(\Gamma )}\nonumber \\&\quad \le \big \Vert h^{1/2}\nabla _{\Gamma } ((1-J_h)(g-u_h|_{\Gamma }))\big \Vert _{{\mathsf {L}}^2(\Gamma )} =:\mathrm{osc}_h, \end{aligned}$$
(23)

where \(\mathrm{osc}_h\) is, in fact, computable, while the constant \(C_{\mathsf {osc}}\) is generic and hardly accessible. With \(v=u_h\), the upper bound (17b) becomes

$$\begin{aligned} \begin{aligned} \big \Vert \nabla (u-u_h)\big \Vert _{{\mathsf {L}}^2(\Omega )}&\le \Vert \nabla w_h\Vert _{{\mathsf {L}}^2(S)} + \big \Vert (1-J_h) (g-u_h|_{\Gamma })\big \Vert _{{\mathsf {H}}^{1/2}(\Gamma )} \\&\le \Vert \nabla w_h\Vert _{{\mathsf {L}}^2(S)} + C_{\mathsf {osc}}^2 \, \mathrm{osc}_h, \end{aligned} \end{aligned}$$
(24)

where \(w_h\in {\mathcal {S}}^p({\mathcal {T}}^S_h)\) solves (15). For the use in the adaptive algorithm, we note that

$$\begin{aligned} \mathrm{osc}_h^2&= \! \sum _{T \in {\mathcal {T}}_h^S}\! \mathrm{osc}_h(T)^2, \text { where } \nonumber \\ \mathrm{osc}_h(T)^2&:= \!\! \sum _{\begin{array}{c} F \in {\mathcal {F}}_h^\Gamma \\ F \subset T \end{array}} \! \mathrm{diam}(F) \, \Vert \nabla _{\Gamma } ((1 \!-\! J_h) (g \!-\! u_h|_{\Gamma }))\Vert _{{\mathsf {L}}^2(F)}^2. \end{aligned}$$
(25)

Remark 8

In our numerical experiments, we will consider \(p = 1\) as well as \(p = 2\) to compute the uppermost bound in (24). Since the lower bound (17a) is independent of the data approximation, we did only implement the lowest-order case \(q = 0\). \(\square \)

Remark 9

Instead of the \({\mathsf {L}}^2(\Gamma )\)-orthogonal projection, one can also employ the Scott–Zhang projector; see [5, 21]. Then, Lemma 7 as well as (23) hold accordingly. For \(d = 2\), one can also employ nodal projection. While generic \({\mathsf {H}}^{1/2}(\Gamma )\)-functions do not have to be continuous and Lemma 7 fails, one can still prove (23); see [21, 22]. \(\square \)

4.3 Adaptive algorithm

The above discussed estimates and relations yield the following adaptive algorithm, whose performance is verified in a series of numerical tests presented in the next section.

Algorithm 10

Let \(p\in \mathbb {N}\) and let \(0 < \theta \le 1\) be a fixed marking parameter. Let \({\mathcal {T}}_h\) be a conforming initial triangulation of \(\Omega \). Let \(\varepsilon > 0\) be the tolerance for the energy error \(\big \Vert \nabla (u-u_h)\big \Vert _{{\mathsf {L}}^2(\Omega )}\) with \(u_h= {\widetilde{V}} \phi _h\). Then, perform the following steps (i)-(ix):

  1. (i)

    Extract the BEM triangulation \({\mathcal {F}}^{\Gamma }_h = {\mathcal {T}}_h|_{\Gamma }\) from (9).

  2. (ii)

    Extract the patch \(S \subset \Omega \) of \(\Gamma \) and the corresponding triangulation \({\mathcal {T}}_h^S\) from (20).

  3. (iii)

    Compute the BEM solution \(\phi _h\in {\mathcal {P}}^0({\mathcal {F}}^{\Gamma }_h)\) of (13).

  4. (iv)

    Compute \(J_h(g - u_h|_{\Gamma })\) together with its oscillations \(\mathrm{osc}_h(T)\) of (25) for all \(T \in {\mathcal {T}}_h\).

  5. (v)

    Compute the FEM solution \(w_h\in {\mathcal {S}}^p({\mathcal {T}}^S_h)\) of (15) for the majorant (17b).

  6. (vi)

    Compute the error indicators

    $$\begin{aligned} \eta _h(T)&= {\left\{ \begin{array}{ll} \displaystyle \Vert \nabla w_h\Vert _{{\mathsf {L}}^2(T)} &{} \text {for } T\in {\mathcal {T}}_h^S,\\ 0 &{} \text {for } T\in {\mathcal {T}}_h\setminus {\mathcal {T}}_h^S. \end{array}\right. } \end{aligned}$$
    (26)
  7. (vii)

    If \(\mathbf {\overline{\mathfrak {M}}}(\nabla w_h) = \sum _{T\in {\mathcal {T}}_h^S} \eta _h(T)^2 \le \varepsilon ^2\), then break.

  8. (viii)

    Otherwise, determine a set \({\mathcal {M}}_h \subseteq {\mathcal {T}}_h^S\) of minimal cardinality such that

    $$\begin{aligned} \theta \sum _{T\in {\mathcal {T}}_h^S} \big [ \eta _h(T)^2 + \mathrm{osc}_h(T)^2 \big ]&\le \sum _{T\in {\mathcal {M}}_h} \big [ \eta _h(T)^2 + \mathrm{osc}_h(T)^2 \big ]. \end{aligned}$$
    (27)
  9. (ix)

    Refine (at least) all \(T \in {\mathcal {M}}_h \subseteq {\mathcal {T}}_h\) by newest vertex bisection to obtain a new triangulation \({\mathcal {T}}_h\).

Remark 11

(Evaluation of \({u_h = {\widetilde{V}} \phi _h}\)) A subtle point in our approach is the computation of \(J_h(g - u_h|_\Gamma )\) to solve the auxiliary FEM problem (15) and the computation of \(\mathrm{osc}_h\) from (23) to compute the upper bound (24) in Theorem 5. Similarly, the solution of the auxiliary FEM problem (16) and the computation of the lower bound (17a) require to compute \(\langle g - u_h|_{\Gamma } \, , \, \varvec{n} \cdot \varvec{\sigma }_h|_{\Gamma }\rangle _{{\mathsf {L}}^2(\Gamma )}\) for the basis functions \(\varvec{\sigma }_h \in \mathsf {RT}^{q}_{\Gamma ^{c}} ({\mathcal {T}}^S_h)\) (and analogous comments apply for the alternative lower bound (18)–(19) from Corollary 6). All of this is subtle, since \(u_h = {\widetilde{V}} \phi _h\) is not a discrete function (but data sparse, since \(\phi _h\) is discrete). At these points, our implementation follows the approach of [3], which can briefly be sketched as follows:

  1. (i)

    Note that, due to the mapping properties of the single-layer potential, \(u_h = {\widetilde{V}}\phi _h\) is continuous (since \(\phi _h \in {\mathsf {L}}^\infty (\Gamma )\)), and that, at least for affine boundaries in 2D and piecewise polynomial \(\phi _h\), closed formulae for point evaluations \(u_h(x) = \widetilde{V}\phi _h(x)\) at arbitrary \(x \in \mathbb {R}^2\) are known.

  2. (ii)

    To compute \(J_h(g - u_h|_\Gamma ) \in {\mathcal {S}}^p({\mathcal {F}}^{\Gamma }_h)\), we approximate \(g - u_h|_\Gamma \approx q \in {\mathcal {P}}^{p'}({\mathcal {F}}^{\Gamma }_h)\) by a \({\mathcal {F}}^{\Gamma }_h\)-piecewise interpolation polynomial q of degree \(p' > p\). Replacing \(g - u_h|_\Gamma \approx q\) in (21) so that all arising integrals can be computed exactly (by quadrature), we approximate \(J_h(g - u_h|_\Gamma ) \approx J_h q\). Moreover, we approximate the local contributions of \(\mathrm{osc}_h\) from (25) via \(\Vert \nabla _{\Gamma } ((1 - J_h) (g \!-\! u_h|_{\Gamma }))\Vert _{{\mathsf {L}}^2(F)}^2 \approx \Vert \nabla _{\Gamma } (q - J_h q)\Vert _{{\mathsf {L}}^2(F)}^2\), where again the right-hand side can be computed exactly by means of quadrature which only relies on point evaluations of q(x) (and hence \(g - u_h|_\Gamma \)).

  3. (iii)

    It is an empirical observation in [3] that \(p' := p + 1\) is sufficiently accurate. If \(g - u_h|_\Gamma \) is smooth, one can even show that the quadrature error is of higher order. Moreover, one can optimize the interpolation nodes (per element) and the quadrature nodes (to compute the approximate integrals in (21) and (23)) to minimize the number of (expensive) point evaluations of \(u_h = {\widetilde{V}} \phi _h\).

  4. (iv)

    Similar ideas must also be used for any BEM error estimator which involves the residual (see, e.g., [3]). By means of matrix compression techniques like planel clustering or \({\mathcal {H}}\)-matrices (see, e.g., [28] and the references therein), one can even lower the cost of the point evaluations of \(u_h = {\widetilde{V}} \phi _h\). However, this is not exploited by our current implementation.

  5. (v)

    Analogous ideas are used to compute the lower error bounds of Theorem 5 resp. Corollary 6.

\(\square \)

Remark 12

(Comments on the minorant)

  1. (i)

    We stress that a reliable adaptive algorithm requires only a computable upper error bound. From that perspective, the minorant should be viewed as an option for eventual practical applications, which might be computed in one final step, i.e., after having achieved the error tolerance by the stopping criterion of Algorithm 10(vii). If desired, as in [43], the minorant can then be improved by solving (16) or (18) adaptively (by only a few post-processing steps), while \(u_h\) is fixed and the additional mesh refinement of \({\mathcal {T}}_h^S\) (resp. \({\mathcal {T}}_h)\) is only steered by the minorant.

  2. (ii)

    Another option is to include the computation of the lower bound into each step of the algorithm to provide guaranteed intervals for the error: For instance, computing the FEM solution \((\varvec{\tau }_h,\phi _h)\in \mathsf {RT}^{0}_{\Gamma ^{c}}({\mathcal {T}}_h^S) \times {\mathcal {P}}^{0}({\mathcal {T}}^S_h)\) of (16), we can also assemble the discrete minorant

    $$\begin{aligned} \mathbf {\underline{\mathfrak {M}}}_h(\varvec{\tau }_h;u_h|_{\Gamma },g)&= 2 \, \langle g - u_h|_{\Gamma } \, , \, {\varvec{n}}\cdot \varvec{\tau }_h|_{\Gamma }\rangle _{{\mathsf {L}}^2(\Gamma )} - \ \Vert \varvec{\tau }_h\Vert _{{\mathsf {L}}^2(S)}^2 \end{aligned}$$
    (28)

    from Theorem 5. Then again, at least in terms of Algorithm 10, the minorant is computed on a mesh (and in particular on the boundary layer S) steered by the majorant alone; see Fig. 2. This procedure already leads to a satisfying minorant (see all experiments in Sect. 5), but obviously not to the most accurate minorant possible.

  3. (iii)

    The latter approach can be improved in several ways: First, one can solve (15) and (16) (resp. (18)) by adaptive FEM on separate (generically) different boundary layers. Second, one can consider higher-order elements for the auxiliary FEM problems. Finally, another option is to include the local contributions of (28),

    $$\begin{aligned} \nu _{h}(T):=2 \, \langle g - u_h|_{\Gamma } \, , \, {\varvec{n}}\cdot \varvec{\tau }_h|_{\Gamma }\rangle _{{\mathsf {L}}^2(\Gamma \cap T)} - \ \Vert \varvec{\tau }_h\Vert _{{\mathsf {L}}^2(T)}^2 \end{aligned}$$
    (29)

    for all \(T\in {\mathcal {T}}_{h}^S\), into the marking procedure. Figure 5 visualizes some results, where (instead of the marking strategy in Algorithm 10(viii)) the mesh is now steered by the size of the confidence interval of the error, i.e., \(\eta _h(T) + \mathrm{osc}_h(T) - \nu _h(T)\), and the minorant improves. Overall, all these approaches are computationally more costly and only make sense, if sharp confidence intervals of the error are needed during the full runtime of the adaptive algorithm. In our understanding of reliable algorithms, there are not many practical situations in which the minorant becomes relevant before the final solution \(u_h\) has been computed and fixed. \(\square \)

5 Numerical experiments

This section reports on some 2D numerical experiments to underline the accuracy of the introduced error estimates and the performance of the proposed adaptive strategy from Algorithm 10. All computations are done in MatlabFootnote 1 , where we build on the toolbox Hilbert from [3] for the lowest-order BEM, on [25] for \({\mathcal {P}}^1\)-FEM (\(p=1\) in (21)) resp. [24] for \({\mathcal {P}}^2\)-FEM (\(p=2\) in (21)), and on [6] for the lowest-order \(\mathsf {RT}\)-FEM. Throughout, we consider Algorithm 10 for uniform mesh-refinement (i.e., \(\theta = 1\)) as well as for adaptive mesh-refinement (i.e., \(0< \theta < 1\)).

Fig. 2
figure 2

Adaptively generated meshes in Example 5.1 for \(p=1\) and \(\theta = 0.6\). We indicate the boundary layer S (blue), the boundary \(\varvec{\Gamma }\) (red), and the interior boundary \({\Gamma ^c = \partial S \setminus \Gamma }\) (green). The triangles \({T \in {\mathcal {T}}_h^S} \subset {\mathcal {T}}_h\) are indicated in blue. The triangles \({{T \in {\mathcal {T}}_h \backslash {\mathcal {T}}_h^S}}\) are indicated in gray

Fig. 3
figure 3

Comparison of adaptive mesh-refinement with \(\theta = 0.4\) (solid) vs. uniform mesh-refinement (dashed) in Example 5.1. The majorant is computed by \({\mathcal {P}}^1\)-FEM (left) and \({\mathcal {P}}^2\)-FEM (right). We compare the potential error \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\), the majorant \(\Vert \nabla w_h\Vert _{{\mathsf {L}}^2(\Omega )}\) from (17b), the data oscillations \(\mathrm{osc}_h\) from (23), and the minorant \(\mathbf {\underline{\mathfrak {M}}}(\varvec{\tau }_h)^{1/2}\) from (28)

Table 1 Uniform mesh-refinement in Example 5.1
Table 2 Adaptive mesh-refinement with \(\theta = 0.4\) in Example 5.1
Fig. 4
figure 4

Influence of the marking parameter \(\theta \in \{0.2, 0.4, 0.6, 0.8\}\) on adaptive mesh-refinement in Example 5.1. The majorant is computed by \({\mathcal {P}}^1\)-FEM (left) and \({\mathcal {P}}^2\)-FEM (right). We compare the potential error (solid) \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\) as well as the majorant (dashed) \(\Vert \nabla w_h\Vert _{{\mathsf {L}}^2(\Omega )}\) from (17b)

Fig. 5
figure 5

Left: Comparison of two versions of the minorant by either solving (16) with \(\mathsf {RT}^{0}\)-elements or (18) with \({\mathcal {P}}^1\)-elements on both \({\mathcal {T}}_{h}^{S}\) and \({\mathcal {T}}_{h}\) with respect to the adaptive mesh-refinement with \(\theta = 0.4\) in Example 5.1. We observe that solving on full \({\mathcal {T}}_h\) instead of the boundary layer \({\mathcal {T}}_h^S\) leads only to a marginal improvement of the minorant. Right: We compute two versions of the triple (majorant, error, minorant) in Example 5.1 with \(\theta = 0.4\). First, we repeat the computations obtained by Algorithm 10 (solid lines). In the second case, we add the local contributions \(-\nu _{h}\) of the minorant from (29) to the error indicator in (27), i.e., the minorant is now part of the adaptive mesh-refinement strategy (dashed)

Example 5.1

(Smooth potential in square domain) We consider problem (1) with prescribed exact solution

$$\begin{aligned} u(x) = \cosh (x_1) \, \cos (x_2) \quad \text {for all } x \in \Omega := (0, 1/2)^2 \end{aligned}$$
(30)

on the square domain \(\Omega \) with diameter \(\mathrm{diam}(\Omega ) = \sqrt{1/2}\). We start Algorithm 10 with an initial triangulation \({\mathcal {T}}_h\) of \(\Omega \) into \(\#{\mathcal {T}}_h = 128\) right triangles.

Even though u as well as its Dirichlet data \(g = u|_{\Gamma }\) are smooth, we note that the sought integral density \(\phi \in {\mathsf {H}}^{-1/2}(\Gamma )\) of the indirect formulation (3) has no physical meaning and usually lacks smoothness (by inheriting the generic singularities from the interior as well as the exterior domain problem). Consequently, one may expect that uniform mesh-refinement (on the boundary) will not reveal the optimal convergence behavior \(\Vert \phi -\phi _h\Vert _{{\mathsf {H}}^{-1/2}(\Gamma )} = {\mathcal {O}}(h^{3/2}) = {\mathcal {O}}(N^{-3/2})\), where \(N = \#{\mathcal {F}}_h^\Gamma \) is the number of elements of a uniform mesh \({\mathcal {F}}_h^\Gamma \) of \(\Gamma \) and 3/2 is the best possible convergence rate for a piecewise constant approximation \(\phi \approx \phi _h\in {\mathcal {P}}^0({\mathcal {F}}^{\Gamma }_h)\).

The initial meshes and some adaptively generated meshes are visualized in Fig. 2. Figure 3 shows the resulting potential error and the computed minorant (17a) and majorant (17b), as well as the corresponding data oscillations (23) for \(p = 1\) resp. \(p=2\). Here, the potential error \(\Vert \nabla ( u - u_h )\Vert _{{\mathsf {L}}^2(\Omega )} \approx \Vert \nabla I_h( u - u_h )\Vert _{{\mathsf {L}}^2(\Omega )}\) is computed by numerical quadrature. More precisely, we employ the \({\mathcal {P}}^2\)-nodal interpolant \(I_h : C({{\overline{\Omega }}}) \rightarrow {\mathcal {S}}^2({\mathcal {T}}_h^{\mathrm{unif}})\) on a (three times) uniform refinement \({\mathcal {T}}_h^{\mathrm{unif}}\) of the finest adaptive mesh \({\mathcal {T}}_h\). We stress that the plot neglects the non-accessible constant \(C_{\mathsf {osc}}\) from (23). The results for \(p = 1\) and \(p = 2\) are similar. For uniform mesh-refinement, we obtain the expected reduced order of convergence. For adaptive mesh-refinement, we regain the optimal order of convergence. Moreover, for adaptive mesh-refinement, we see that the majorant is, in fact, a sharp estimate for the (in general unknown) potential error.

The computed minorant is less accurate. With reference to Remark 12, we stress that the minorant is always computed with lowest-order Raviart-Thomas elements on the same boundary layer as the majorant (which is obtained by adaptivity driven by the majorant). In Fig. 5, we even see that the minorant hardly enhances when the mixed problem (16) is solved on the full domain \({\mathcal {T}}_{h}\). In our view, this indicates that the numerical treatment of the boundary residual \(g-u_{h}|_{\Gamma }\) and its oscillations is a key-point for accuracy, i.e., one should consider higher-order elements for the minorant.

The empirical values for uniform (resp. adaptive) mesh-refinement are also provided in Table 1 (resp. Table 2). In particular, we note that the ratio between the FEM DoF for obtaining the error estimates and the BEM DoF remains bounded, so that additional computational expenditures remain limited. The same observation is made if we compare the corresponding expenditures in terms of CPU time. Figure 4 compares the numerical results for different choices of the adaptivity parameter \(\theta \in \{0.2, 0.4, 0.6, 0.8\}\). We observe that any choice of \(\theta \) regains, in fact, the optimal convergence rate.

Fig. 6
figure 6

Adaptively generated meshes in Example 5.2 for \(p=1\) and \(\theta = 0.6\); see Fig. 2 for the color code

Fig. 7
figure 7

Comparison of adaptive vs. uniform mesh-refinement in Example 5.2. The majorant is computed by \({\mathcal {P}}^1\)-FEM. Left: We compare the potential error \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\), the majorant \(\Vert \nabla w_h\Vert _{{\mathsf {L}}^2(\Omega )}\) from (17b), the data oscillations \(\mathrm{osc}_h\) from (23), and the minorant \(\mathbf {\underline{\mathfrak {M}}}(\varvec{\tau }_h)^{1/2}\) from (28) for uniform (dashed) and adaptive mesh-refinement (solid) with \(\theta = 0.4\). Right: We compare the potential error (solid) and the majorant (dashed) for adaptive mesh-refinement for various choices of \(\theta \)

Example 5.2

(Smooth potential in L-shaped domain) We consider problem (1) with prescribed exact solution

$$\begin{aligned} u(x)&= \cosh (x_1) \, \cos (x_2) \nonumber \\ \quad \text {for all } x \in \Omega&:= (0, 1/2)^2 \backslash \big ( [(1/4,1/2]\times [0,1/4] \big ) \end{aligned}$$
(31)

on the L-shaped domain \(\Omega \) with diameter \(\mathrm{diam}(\Omega ) = \sqrt{1/2}\). We start Algorithm 10 with an initial triangulation \({\mathcal {T}}_h\) of \(\Omega \) into \(\#{\mathcal {T}}_0 = 384\) right triangles.

As in Sect. 5.1, the potential u is smooth, but the sought density \(\phi \) of the indirect BEM formulation lacks regularity. The initial meshes as well as some adaptively generated meshes are visualized in Fig. 6. Figure 7 visualizes some numerical results for uniform and adaptive mesh-refinement, where we proceed as in Sect. 5.1. Since \(p = 1\) and \(p = 2\) lead to similar results (not displayed), we only report the results for \(p = 1\).

As expected from theory, the shape of \(\Omega \) does not impact the functional error estimates: Overall, the results obtained correspond to those from Sect. 5.1, where uniform mesh-refinement leads to a suboptimal convergence behavior, which is cured by means of the proposed adaptive strategy.

Fig. 8
figure 8

Adaptively generated meshes in Example 5.3 for \(p=1\) and \(\theta = 0.6\); see Fig. 2 for the color code

Fig. 9
figure 9

Comparison of adaptive vs. uniform mesh-refinement in Example 5.3. The majorant is computed by \({\mathcal {P}}^1\)-FEM. Left: We compare the potential error \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\), the majorant \(\Vert \nabla w_h\Vert _{{\mathsf {L}}^2(\Omega )}\) from (17b), the data oscillations \(\mathrm{osc}_h\) from (23), and the minorant \(\mathbf {\underline{\mathfrak {M}}}(\varvec{\tau }_h)^{1/2}\) from (28) for uniform (dashed) and adaptive mesh-refinement (solid) with \(\theta = 0.4\). Right: We compare the potential error (solid) and the majorant (dashed) for adaptive mesh-refinement for various choices of \(\theta \)

Example 5.3

(Non-smooth potential in L-shaped domain) We consider problem (1) with prescribed exact solution

$$\begin{aligned} u(x)&= r^{2/3} \cos (2\varphi /3) \nonumber \\ \quad \text {for all } x \in \Omega&:= (0, 1/2)^2 \backslash \big ( [(1/4,1/2]\times [0,1/4] \big ) \end{aligned}$$
(32)

given in standard polar coordinates \(x=x(r,\varphi )\) on the L-shaped domain \(\Omega \) with diameter \(\mathrm{diam}(\Omega ) = \sqrt{1/2}\). We start Algorithm 10 with an initial triangulation \({\mathcal {T}}_0\) of \(\Omega \) into \(\#{\mathcal {T}}_0 = 384\) right triangles.

Unlike Sects. 5.1 and 5.2, the potential u is non-smooth at (0, 0). The initial meshes as well as some adaptively generated meshes are visualized in Fig. 8. Numerical convergence results are visualized in Fig. 9. Moreover, Table 3 provides some empirical values for adaptive mesh-refinement. Our observations are the same as in Sects. 5.1 and  5.2 and underline that the functional error bounds do not rely on any a priori smoothness of the unknown potential u: While uniform mesh-refinement leads to a suboptimal convergence behavior, the proposed adaptive strategy regains the optimal convergence rate.

Figure 10 provides some estimator competition. We consider the functional error estimator proposed in the present work, the residual estimator \(\mu _R\) from [9, 11, 12], the \(h-h/2\) error estimator \(\mu _H\) from [23], the two-level error estimator \(\mu _T\) from [17, 29, 36], and Faermann’s residual estimator \(\mu _F\) from [18, 19]. For lowest-order BEM, all these estimators are provided by the Matlab toolbox Hilbert [3]. We recall that

$$\begin{aligned} \mu _T \simeq \mu _H \lesssim \Vert \phi - \phi _h\Vert _{{\mathsf {H}}^{-1/2}(\Gamma )} \simeq \mu _F \lesssim \mu _R, \end{aligned}$$

where the constants hidden in \(\simeq \) and \(\lesssim \) depend only on \(\Gamma \); see, e.g., [10, 16]. In addition, we stress that the converse estimate \(\Vert \phi - \phi _h\Vert _{{\mathsf {H}}^{-1/2}(\Gamma )} \lesssim \mu _T \simeq \mu _H\) is equivalent to a saturation assumption [16]. Moreover, as mentioned earlier, there always holds the bound \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )} \lesssim \Vert \phi - \phi _h\Vert _{{\mathsf {H}}^{-1/2}(\Gamma )}\), where the hidden constant depends on \(\Gamma \). We consider Algorithm 10 (with \(\theta = 0.4\)), where instead of \(\eta _h(T)\) from (26), we use \(\eta _h(T)^2 := \sum _{F \in {\mathcal {F}}_h^\Gamma , F \subset T} \mu _h(F)^2\), where \(\mu _h(F)\) denote the local contributions of \(\mu _h \in \{\mu _R, \mu _H, \mu _T, \mu _F\}\). Figure 10 provides the numerical results. All adaptive strategies yield optimal decay \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )} = {\mathcal {O}}(N^{-3/2})\) with \(N = \#{\mathcal {F}}_h^\Gamma \). At the same time, we also see that the proposed functional estimator provides the most accurate bound on the potential error \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\).

6 Extension of the analysis

So far, we have considered functional a posteriori error estimation for an indirect BEM formulation (12) discretized by Galerkin BEM (13). The following sections address some obvious extensions of our analysis. While the subsequent numerical experiments (as well as those from Sect. 5) focus on \(d = 2\), we again stress that the theoretical results also apply to arbitrary dimensions, in particular to \(d = 3\). However, 3D experiments are beyond the scope of this work and left to future research.

6.1 Collocation BEM

It is worth noting that all results of Sect. 3 hold, in particular, for any \(v = {\widetilde{V}}\phi _h\) with arbitrary \(\phi _h \in {\mathsf {H}}^{-1/2}(\Gamma )\). Consequently, the computable bounds of Theorem 5 (resp. Corollary 6) hold for any approximation \(\phi _h \approx \phi \). In particular, Algorithm 10 can also be applied to (e.g., lowest-order) collocation BEM, where \(\phi _h \in {\mathcal {P}}^0({\mathcal {F}}_h^\Gamma )\) is determined by collocation conditions

$$\begin{aligned} (V\phi _h)(x_F) = g(x_F) \quad \text {for all } F \in {\mathcal {F}}_h^\Gamma , \end{aligned}$$
(33)

where \(x_F \in F\) is an appropriate collocation node (e.g., the center of mass). We stress that well-posedness of collocation BEM is non-obvious (see, e.g., [13, 14, 35]). However, this does not affect our developed functional a posteriori error bounds.

Table 3 Adaptive mesh-refinement with \(\theta = 0.4\) in Example 5.3
Fig. 10
figure 10

Numerical results for adaptive mesh-refinement (\(\theta = 0.4\)) in Example 5.3 for different a posteriori BEM error estimators. Left: We plot both the potential error \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\) (solid) as well as the corresponding error estimator (dashed), which drives the adaptive strategy. Our functional estimator is the majorant \(\Vert \nabla w_h\Vert _{{\mathsf {L}}^2(\Omega )}\) from (17b) based on P1-FEM. Right: For either estimator \(\mu _h\), we plot the quotient \(\mu _h / \Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\) to visualize the accuracy of the estimator with respect to the potential error

6.2 Other BEM ansatz spaces

With the same argument as for collocation BEM, one can replace the discrete BEM ansatz space \({\mathcal {P}}^0({\mathcal {F}}_h^\Gamma ) \ni \phi _h\) by an arbitrary discrete space \({\mathcal {P}}_h \subseteq {\mathsf {H}}^{-1/2}(\Gamma )\) (e.g., higher-order piecewise polynomials, splines, isogeometric NURBS, etc.). For \(r \in \mathbb {N}_0\) and \({\mathcal {P}}_h = {\mathcal {P}}^r({\mathcal {F}}_h^\Gamma )\), we expect that the choices \(p = r + 1\) and \(q = r\) will lead to accurate computable upper and lower bounds in Theorem 5. The numerical validation of this expectation is, however, beyond the scope of the present work.

Fig. 11
figure 11

Numerical results for adaptive mesh-refinement (\(\theta = 0.4\)) in Example 6.4 (left) and Example 6.5 (right). We plot the potential error \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\), the majorant \(\Vert \nabla w_h\Vert _{{\mathsf {L}}^2(\Omega )}\) from (17b) based on \({\mathcal {P}}^1\)-FEM, the data oscillations \(\mathrm{osc}_h\) from (38), and the minorant \(\mathbf {\underline{\mathfrak {M}}}(\varvec{\tau }_h)^{1/2}\) from (28)

Table 4 Adaptive mesh-refinement with \(\theta = 0.4\) in Example 6.4
Table 5 Adaptive mesh-refinement with \(\theta = 0.4\) in Example 6.5

6.3 Direct BEM approach

The indirect BEM approach makes ansatz (12) for the unknown solution of (11). Unlike this, the direct BEM approach is based on the Green’s third identity: Any solution of (11) can be written as the sum of a single-layer and a double-layer potential, i.e.,

$$\begin{aligned} u(x)&= [{\widetilde{V}}\phi ](x) - [{\widetilde{K}} g](x)\nonumber \\&:= [\widetilde{V}\phi ](x) - \int _{\Gamma } \partial _{{\varvec{n}}(y)} G(x-y) \, g(y) \,\mathrm{d}{y} \quad \text {for all } x\in \Omega , \end{aligned}$$
(34)

where \(g = u|_{\Gamma } \in {\mathsf {H}}^{1/2}(\Gamma )\) is the trace of u (i.e., the Dirichlet data) and \(\phi = \varvec{n} \cdot \nabla u|_{\Gamma } \in {\mathsf {H}}^{-1/2}(\Gamma )\) is the normal derivative (i.e., the Neumann data). Taking the trace of this identity and respecting the jump properties of the double-layer potential (see, e.g., [27, 30, 34, 42, 44]), one sees that

$$\begin{aligned} g = V\phi - (K - 1/2) g \quad \text {in } H^{1/2}(\Gamma ), \end{aligned}$$

where K formally coincides with \({\widetilde{K}}\), but is evaluated for \(x \in \Gamma \) instead. Elementary calculations then lead to the variational formulation

$$\begin{aligned} \langle V\phi \,,\,\psi \rangle _{\Gamma } =\langle (K+1/2) g\,,\,\psi \rangle _{\Gamma } \quad \text {for all }\psi \in {\mathsf {H}}^{-1/2}(\Gamma ). \end{aligned}$$
(35)

We stress that the factor 1/2 is only valid almost everywhere on \(\Gamma \) and hence correct for the variational formulation and Galerkin BEM, while collocation BEM would require a modification at corners (and additionally along edges in 3D); see [30, 34, 44].

Usual implementations approximate \(g \approx g_h \in {\mathcal {S}}^p({\mathcal {F}}_h^\Gamma )\) so that the integral operators in (35) are only evaluated for discrete functions. Overall, the lowest-order Galerkin BEM formulation then reads

$$\begin{aligned} \langle V \phi _h \, , \, \psi _h\rangle _{{\mathsf {L}}^2(\Gamma )} = \langle (K+1/2) \, g_h \, , \, \psi _h\rangle _{{\mathsf {L}}^2(\Gamma )} \quad \textit{for all } \psi _h\in {\mathcal {P}}^0({\mathcal {F}}^\Gamma _h). \end{aligned}$$
(36)

As above, the Lax–Milgram lemma proves that (35) (resp. (36)) admit unique solutions \(\phi \in {\mathsf {H}}^{-1/2}(\Gamma )\) (resp. \(\phi _h \in {\mathcal {P}}^0({\mathcal {F}}^\Gamma _h)\)). Moreover, the computed density \(\phi _h\) is now indeed an approximation of the Neumann data \(\varvec{n} \cdot \nabla u|_{\Gamma } = \partial _{{\varvec{n}}} u|_{\Gamma } = \phi \approx \phi _h\). Defining

$$\begin{aligned} u_h(x)&= [{\widetilde{V}}\phi _h](x) - [{\widetilde{K}} g_h](x) \quad \text {for } x \in \Omega , \end{aligned}$$
(37)

one obtains an approximation \(u_h\) of the solution \(u = \widetilde{V}\phi - {\widetilde{K}} g\) of (11) (resp. (34)). We stress that \(u_h|_\Gamma = V\phi _h + (1/2 - K) g_h\) so that the data oscillation term in the upper bound of Theorem 5 reads

$$\begin{aligned} \Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}&\le \!\!\!\!\min _{\begin{array}{c} w \in {\mathsf {H}}^1(\Omega ) \\ w|_\Gamma = J_h(g-u_h|_\Gamma ) \end{array}} \!\!\!\!\! \Vert \nabla w\Vert _{{\mathsf {L}}^2(\Omega )} \nonumber \\&\quad + \Vert (1-J_h) \big (g - V\phi _h - (1/2 - K)g_h\big )\Vert _{{\mathsf {H}}^{1/2}(\Gamma )} \nonumber \\&\le \!\!\!\!\min _{\begin{array}{c} w \in {\mathsf {H}}^1(\Omega ) \\ w|_\Gamma = J_h(g-u_h|_\Gamma ) \end{array}} \!\!\!\!\! \Vert \nabla w\Vert _{{\mathsf {L}}^2(\Omega )} + C_{\mathsf {osc}}^2 \, \mathrm{osc}_h, \end{aligned}$$
(38a)

where \(J_h : {\mathsf {L}}^2(\Gamma ) \rightarrow {\mathcal {S}}^1({\mathcal {F}}_h^\Gamma )\) is the \({\mathsf {L}}^2(\Gamma )\)-orthogonal projection and

$$\begin{aligned} \mathrm{osc}_h&:= \Vert h^{1/2}\nabla _\Gamma \big [ (1-J_h) \big (g - V\phi _h - (1/2 - K)g_h\big )\big ]\Vert _{{\mathsf {L}}^2(\Gamma )}; \end{aligned}$$
(38b)

see Sect. 4.2. In our implementation, we also employed \(g_h = J_h g \in {\mathcal {S}}^1({\mathcal {F}}_h^\Gamma )\).

Example 6.4

(Direct BEM for smooth potential in square domain) We consider the setting (30) from Sect. 5.1. Applying the direct BEM approach (35), we know that \(\phi _h \approx \phi = \varvec{n} \cdot \nabla u|_{\Gamma }\), where \(\phi \) (as well as the potential u) is smooth. In this particular situation, we know that uniform mesh-refinement would already lead to the optimal convergence behavior (not displayed). The same is observed for the proposed adaptive strategy, where we even observe that the majorant \(\Vert \nabla w_h\Vert _{{\mathsf {L}}^2(\Omega )}\) from (17b) as well as the minorant \(\mathbf {\underline{\mathfrak {M}}}(\varvec{\tau }_h)^{1/2}\) from (28) provide sharp error bounds for the potential error \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\); see Fig. 11 (left) as well as Table 4.

Example 6.5

(Direct BEM for non-smooth potential in L-shaped domain) We consider the setting (32) from Sect. 5.3. Applying the direct BEM approach (35), we know that \(\phi _h \approx \phi = \varvec{n} \cdot \nabla u|_{\Gamma }\), where \(\phi \) (as well as the potential u) is only non-smooth with a singularity at (0, 0). Also for this case, the proposed adaptive strategy regains the optimal convergence rate; see Fig. 11 (right) as well as Table 5. Even though the quotient \(\Vert \nabla w_h\Vert _{{\mathsf {L}}^2(\Omega )} / \mathbf {\underline{\mathfrak {M}}}(\varvec{\tau }_h)^{1/2}\) of the computable upper and lower bound is larger than for the smooth problem of Sect. 6.4, we observe that the lower bound is, in fact, much more accurate for the direct BEM than for the indirect BEM computations from Sect. 5.

Fig. 12
figure 12

Adaptively generated meshes (\(\theta =0.6\)) in Example 6.7. We indicate the boundary layer S (blue), the boundary \({\Gamma }\) (red), and the interior boundary \({\Gamma ^c = \partial S \setminus \Gamma }\) (green); see Fig. 2 for the color code

Fig. 13
figure 13

Comparison of adaptive vs. uniform mesh-refinement in Example 6.7, The majorant is computed by \({\mathcal {P}}^1\)-FEM. Left: Since the potential error \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\) is unknown and \(\mathrm{osc}_h = 0\), we only compare the majorant \(\Vert \nabla w_h\Vert _{{\mathsf {L}}^2(\Omega )}\) from (17b) and the minorant \(\mathbf {\underline{\mathfrak {M}}}(\varvec{\tau }_h)^{1/2}\) from (28) for uniform (dashed) and adaptive mesh-refinement (solid) with \(\theta = 0.4\). Right: We compare the majorant for adaptive mesh-refinement for various choices of \(\theta \)

6.4 Exterior domains

One particular strength of BEM is that it naturally allows to consider also exterior domain problems formulated on unbounded Lipschitz domains \(\Omega ^c := \mathbb {R}^d \backslash {{\overline{\Omega }}}\). In this case, the homogeneous Dirichlet–Laplace problem subject to given inhomogeneous boundary data g reads

$$\begin{aligned} \Delta u = 0 \quad \text {in } \Omega ^c, \qquad u = g \quad \text {on } \Gamma , \end{aligned}$$
(39a)

supplemented by the radiation (decay) condition (for \(|x| \rightarrow \infty \))

$$\begin{aligned} u(x) = {\mathcal {O}}(\log |x|) \quad \text {for } d = 2 \qquad \text {resp.} \qquad u(x) = {\mathcal {O}}(1/|x|) \quad \text {for } d = 3. \end{aligned}$$
(39b)

We note that the latter radiation condition is naturally incorporated into the potential operators (due to the choice of the fundamental solution with right decay) arising in BEM, e.g., any single-layer potential \({\widetilde{V}}\phi _h\) satisfies (39b).

We note that the functional error identities from Theorem 4 (with \(\Omega \) being replaced by the exterior domain \(\Omega ^c\)) remain valid (in principal) for any

$$\begin{aligned} v \in {\mathsf {L}}^2_{\mathsf {loc}}(\overline{\Omega ^c}) :=\big \{\varphi \,:\, \varphi |_{\Xi \,\cap \,\Omega ^{c}}\in {\mathsf {L}}^2(\Xi \,\cap \,\Omega ^{c}) \text { for all compact }\Xi \subset \mathbb {R}^{d} \big \} \end{aligned}$$

with \(\nabla v \in {\mathsf {L}}^2(\Omega ^c)\) and \(\Delta v = 0\). More precisely, a proper solution theory for (39) is available in the weighted Sobolev space \({\mathsf {H}}^{1}_{-1}(\Omega ^c)\) defined by, e.g., for \(d=3\),

$$\begin{aligned} {\mathsf {H}}^{1}_{-1}(\Omega ^c) :=\big \{\varphi \,:\, \varphi (\cdot )/|\cdot | \in {\mathsf {L}}^2(\Omega ^c),\;\nabla \varphi \in {\mathsf {L}}^2(\Omega ^c) \big \}; \end{aligned}$$

see, e.g., [33, 38], where also functional a posteriori error estimates for corresponding exterior domain problems for the Poisson equation \(-\Delta u=f\) have been proved. Consequently, the computable upper and lower bounds of Theorem 5 (resp. Corollary 6) hold (with appropriate modifications) for any approximation \(\phi _h \approx \phi \) and \(v := {\widetilde{V}} \phi _h\). In particular, Algorithm 10 can also be applied to BEM for exterior domain problems.

Example 6.7

(Direct BEM for exterior problem) To illustrate the latter observation, we consider the exterior domain

$$\begin{aligned} \Omega ^c := \mathbb {R}^2 \backslash {{\overline{\Omega }}},\qquad \Omega = (0, 1/2)^2 \backslash \big ([(1/4,1/2]\times [0,1/4] \big ), \end{aligned}$$

where \(\Omega \) is the L-shaped domain from Sect. 5.2. We consider (39) with constant Dirichlet data

$$\begin{aligned} g = 1 = (1/2 - K)1 \quad \text {on } \Gamma , \end{aligned}$$
(40)

where K is the double-layer integral operator. Consequently, the corresponding indirect BEM formulation (12) turns out to be a direct BEM formulation for the exterior domain problem [34, 42], where all data oscillation terms vanish. Thus, one can expect that the sought density \(\phi \in {\mathsf {H}}^{-1/2}(\Gamma )\) has singularities at the convex corners of \(\Omega \) (but not at the reentrant corner).

We employ Algorithm 10 (with Galerkin BEM). The initial mesh \({\mathcal {T}}_h\) with \(\#{\mathcal {T}}_h = 416\) right triangles is a triangulation of \((-1/4,3/4)^2 \backslash {{\overline{\Omega }}} \subset \Omega ^{c}\); see Fig. 12. Some numerical results are shown in Fig. 13. Since the exact potential u is unknown, we cannot compute the potential error \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\). However, adaptive mesh-refinement leads to the optimal convergence behavior of majorant and minorant (and hence also of \(\Vert \nabla (u-u_h)\Vert _{{\mathsf {L}}^2(\Omega )}\)).

7 Conclusion

We have presented, for the first time, functional error estimates for BEM. Not only that the presented estimates are independent of the specific discretization method (i.e., Galerkin or collocation), they also provide guaranteed upper and lower bounds for the unknown energy error. This is in contrast to existing techniques, which usually contain generic constants. The error bounds are obtained by solving auxiliary variational problems by FEM on a boundary layer \(S \subset \Omega \). One possible disadvantage of our approach is that it needs a volume mesh for S to solve the auxiliary FEM problems. However, this appears to be a standard problem for FEM mesh generation.

In the paper, we consider the Dirichlet problem of the Laplace equation, but the approach is expected to generalize to other boundary value problems. In the considered case, the upper error bound is based on the Dirichlet principle, while the lower error bound is based either on a variational problem in terms of a potential (scalar stream function in 2D and vector potential in 3D) or a mixed problem (in 2D and 3D). The upper bound is localized and drives an adaptive refinement of the boundary mesh. Since S contains always two layers of elements, it geometrically shrinks towards the boundary during refinement. This way, the ratio between the FEM DoF for obtaining the error estimates and the BEM DoF remains bounded. We have examined various 2D test problems on square and L-shaped domains, with and without singular potential, including exterior problems. The proposed adaptive algorithm exhibited excellent performance. In all cases, the optimal convergence rates could be achieved.

Ongoing work concerns the further analysis of the oscillations of \(g-u_{h}|_{\Gamma }\) and the implementation of higher-order \({\mathsf {L}}^2\)-projections, which may overcome the lack of accuracy of the majorant and minorant observed in our numerical experiments for very coarse BEM meshes. An implementation of the proposed algorithm in 3D and the extension to electromagnetic problems is also the subject of future research.