Keywords

1 Introduction

The Boundary Element Methods (BEM) are efficient methods to solve partial differential equations. They are based on a boundary integral formulation which allow to reduce the discretization of the problem to the boundary and therefore reduce the costs in comparison with classic methods such as finite differences or finite elements. In this contribution, we will focus on Helmholtz problem [10].

While BEM’s unknowns are lying on the surface of the scatterer, using representation formulas [10], it is possible to compute the solution of the problem in any point (even off the boundary). A common way [13] to visualize the scattering in an arbitrary domain is to define an a priori Cartesian grid, compute with the representation formula the radiated field in each vertex of the grid and use a linear interpolation to approximate the solution. The problem is that many information are lost due to linear interpolation. Therefore, to keep a good accuracy of the approximation, a huge number of interpolation points is needed. As a consequence, the costs (CPU time and memory) to evaluate the integral representation explode. High order interpolation allows much better approximation. Furthermore, as an asymptotic behaviour of the kernel is known, the use of a combination of high order and plane waves can be used to improve the approximation of the solution [3, 6, 9]. Finally, as standard visualization softwares are unable to visualize such high order polynomials nor plane waves functions, we combine this with an algorithm to visualize high order functions in any visualization software [8].

This paper is organized as follows. In Sect. 2, Helmholtz problem and the BEM formulation used to solve it are given. In Sect. 3, we give a method and an algorithm to get a correct visualization of high-order solutions. In Sect. 4, we propose a methodology to adaptively subdivide the domain and reconstruct radiated Helmholtz fields. Section 5 is devoted to numerical examples to show the potential of our method. Finally, conclusions and future works are given in the last section.

2 Formulation of the Scattering Problem

We consider the scattering of an incident wave w (for instance a plane wave) from an object \({\varOmega }_s\). This problem is modeled by Helmholtz equation [10]

$$\begin{aligned} \left\{ \begin{array}{ll} \displaystyle \varDelta u + k^2 u = 0, \, &{}\text{ in }\,\, \mathbb {R}^d \backslash \overline{\varOmega }_s, \\ \displaystyle u = 0, &{}\text{ on }\,\, \varGamma = \partial \overline{\varOmega }_s, \\ \lim \limits _{\left|{x}\right| \rightarrow \infty } \left|{x}\right| (\partial _{\left|{x}\right|} (u-w)(x) - i k (u-w)(x)) = 0, \end{array} \right. \end{aligned}$$
(1)

where \(\varDelta \) denotes the laplacian, k is the wave number, d is the dimension of the problem (\(d=2\) or 3), n is the unit outward normal and u is the total acoustic field. The second equation in (1) is the Dirichlet boundary condition. The third equation in (1) is the Sommerfeld radiation condition [10] so (1) is well-posed in the unbounded domain \(\mathbb {R}^d \backslash \overline{\varOmega }_s\).

An integral formulation is used to solve the well-posed problem (1). First, we parametrize the solution of (1) from the Cauchy data (\(q:= \frac{\partial u}{\partial n}\)) by using the single layer operator \(\mathcal {S}\) [10] defined by

$$\begin{aligned} \mathcal {S} q(x) = \int _{\varGamma } G(x,y) q(y) d\gamma _y, \qquad \forall x \notin \varGamma , \end{aligned}$$

where G is the fundamental solution of Helmholtz Eq. (1):

$$\begin{aligned} G(x,y) = \left\{ \begin{array}{ll} \frac{i}{4}H^{(1)}_0(k \left|{x-y}\right|), \, &{}\text{ if }\,\, d = 2, \\ \displaystyle \frac{e^{i k \left|{x-y}\right|}}{4 \pi \left|{x-y}\right|}, \, &{}\text{ if }\,\, d = 3, \\ \end{array} \right. \end{aligned}$$
(2)

and \(H^{(1)}_0\) is the Hankel function of first kind and order 0 [1]. Then, the solution is given by

$$\begin{aligned} u(x) = w(x) + \mathcal {S} q(x), \qquad \forall x \notin \varGamma . \end{aligned}$$
(3)

To determine the solution u over the domain, we need to compute the density q. The boundary condition is therefore used to get the integral formulation. In the case of a homogeneous Dirichlet boundary condition, (3) is reduced to

$$\begin{aligned} u(x) = w(x) + \int _{\varGamma } G(x,y) q(y) d \gamma _y , \qquad \text{ in }\,\, \mathbb {R}^d \backslash \overline{\varOmega }_s, \end{aligned}$$
(4)

In the case of Neumann or more general boundary conditions, the densities q and \(\varphi := u_{|\varGamma }\) are computed by integral formulations constructed from appropriate trace formulas of (3). For more details, one can refer to [10]. In all cases, the representation formula (3) is obtained by convolution with corresponding kernels.

Fig. 1.
figure 1

Representation of several radiated fields with low order functions (a) and (c) and high order functions (b) and (d) (\(\L ^{\infty }\) interpolation error under 1%).

Figure 1 plots several radiated fields and shows the advantages of high order interpolation. In the first two cases, the lengths of the square to visualize are equal to the wavelength. If a Cartesian grid is defined, 289 d.o.f are needed to interpolate the field with low order functions to get 0.95% interpolation error in \(L^{\infty }\)-norm whereas with functions of order 6 and 49 d.o.f. (shown as white points in the figure) the error is 0.23 %. In a larger domain, (the two last cases of Fig. 1), 2401 d.o.f are needed to get 0.95% interpolation error in \(L^{\infty }\)-norm whereas with functions of order 13 and 196 d.o.f., the error is 0.45 %. Thus, to get an approximation under 1%, high order interpolation needs much less degrees of freedom. Note that in the case of high order functions, the visualization has been generated following the method described in next section and 504 (resp. 3096) elements composed the representation mesh in figure (b) (resp. (d)).

3 Construction of a Well-Suited Visualization

In this section, we present a method developed by the authors [8] to visualize a hp solution noted \(f_{num}\). Standard visualization softwares are unable to visualize and post-treat such solutions. Indeed, these softwares were originally thought and developed for low order method (finite differences, low order finite elements). Our method is based on a low order remeshing [12] which consists to transform \(f_{num}\) into a combination of linear functions defined on simple elements which will be handled by any visualization software. A representation mesh is built by means of a refinement strategy. An approximation of the solution, noted \(f_{vis}\), is constructed. A visualization error is consequently introduced due to the \(P^1\) approximation of high order functions. We define three objectives that \(f_{vis}\) has to respect to be “well-suited” in our sense:

  1. 1.

    The representation \(f_{vis}\) is defined from affine functions on simplexes.

  2. 2.

    The visualization error between \(f_{num}\) and \(f_{vis}\) is controlled in \(L^{\infty }\)-norm.

  3. 3.

    The representation \(f_{vis}\) is (locally) continuous if \(f_{num}\) is (locally) continuous.

The first objective comes from the compatibility with visualization softwares. Indeed, only piecewise affine functions on simplexes are represented without loss of accuracy by any visualization software. The second objective is linked to the need to control the error between \(f_{vis}\) and \(f_{num}\) and to the specific use of data represented. Indeed, under its picture form, the data corresponds to values mapped on elements where anyone can pick up a pointwise information. Hence, the control in \(L^{\infty }\)-norm is natural. The third objective ensures that \(f_{vis}\) does not introduce gaps when \(f_{num}\) is continuous. However, gaps can also coming from the Physics (material change) or discontinuous methods (such as Discontinuous Galerkin) and need to be well-rendered.

The function \(f_{num}\) is defined as a mapping from a subset \(\mathcal {V}\) of a given space \(\mathbb {X}\) (whose norm is noted \(\left\| \cdot \right\| _{\mathbb {X}}\)) into a space \(\mathbb {Y}\) equipped with norm \(\left\| \cdot \right\| _{\mathbb {Y}}\). The mesh of \(\mathcal {V}\) is designed by \(\mathcal {T}(\mathcal {V})\) and is assumed to be a conformal mesh of \(\mathcal {V}\). Each element \(K\in \mathcal {T}(\mathcal {V})\) is defined as the image of a given reference cell \(\widehat{K}\) by a bijective geometrical transformation \(g_K\). Hence, the numerical solution \(f_{num}\) is defined locally on any given cell \(K \in \mathcal {T}(\mathcal {V})\), such that

$$\begin{aligned} \forall x\in K, \, f_{num}^K(x)=\sum _{i=1}^{N_K} f_i^K \varphi ^K_i\left( g_K^{-1}(x)\right) , \end{aligned}$$
(5)

where \(f_{num}^K\) is the local expression of \(f_{num}\), \(f_i^K\) are the degrees of freedom and \(\varphi ^K_i\) are basis functions which are assumed to be continuous on the reference cell.

Following (5), the representation \(f_{vis}\) is defined by constructing local visualizations noted \((f^{\widetilde{K}}_{vis})_{K\in \mathcal {T}(\mathcal {V})}\). Hence, a meshing of K, noted \(\mathcal {T}(K)\), composed of simplexes is performed. The exponent \(\widetilde{K}\) recalls that an approximation of the element is therefore introduced \(\widetilde{K}:= \cup _{S\in \mathcal {T}(K)} S \ne K\). The local representation \(f^{\widetilde{K}}_{vis}\) is then constructed from affines functions on these simplexes.

We introduce a quantification of the error between \(f_{num}\) and \(f_{vis}\). To this purpose, we introduce Hausdorff distance on \(\mathbb {X}\times \mathbb {Y}\) allowing to measure the gap between the graph of two functions [8]. As Hausdorff distance involves two embedded optimizations, it is expensive to employ. Thus, we introduce the following application for any given \(K\in \mathcal {T}(\mathcal {V})\) and its associated mesh \(\mathcal {T}(K)\)

$$\begin{aligned} \varDelta _{\mathcal {T}(K)}:(f,\widetilde{f}) \in C^0(K,\mathbb {Y}) \times C^0(\widetilde{K},\mathbb {Y})&\mapsto \sup _{\hat{x}\in \widehat{K}} \max \Big (\alpha \left\| g_K(\hat{x})- P^1 g_{\mathcal {T}(K)}(\hat{x})\right\| _{\mathbb {X}}, \\&\beta \left\| \left( f\circ g_K\right) (\hat{x})-\left( \widetilde{f}\circ P^1 g_{\mathcal {T}(K)}\right) (\hat{x})\right\| _{\mathbb {Y}}\Big ), \end{aligned}$$

where the constants \(\alpha \) and \(\beta \) are two scaling parameters which allow pertinent comparisons between values on \(\mathbb {X}\) and \(\mathbb {Y}\). For any \(K \in \mathcal {T}(\mathcal {V})\), Hausdorff distance between \(f_{num}\) and \(f_{vis}\) is bounded by the a posteriori estimate \(\varDelta _{\mathcal {T}(K)}\). As this estimate is localized, it provides a tool to measure the quality of the representation \(f^{\widetilde{K}}_{vis}\) at each step of its construction. Then, the convergence of this estimate (under a prescribed tolerance) ensures that the second objective is satisfied. The method is therefore based on the construction of a mesh \(\mathcal {T}(\widehat{K})\) of the reference cell guided by the control of the errors made when the geometry is approximated by simplexes and the functions are approximated by affine functions. Then, the \(\mathbb {P}^1\) interpolation of \(g_K\), noted \(P^1 g_{\mathcal {T}(K)}\), permits to construct \(\mathcal {T}(K)\) from \(\mathcal {T}(\widehat{K})\). Finally, the values of \(f^K_{num}\) are computed at each vertex of \(\mathcal {T}(K)\) to construct the representation \(f^{\widetilde{K}}_{vis}\).

In order to guarantee the third objective, we propose an approach based on the decomposition of all boundaries elements in lower dimension and a construction of a mesh for each element. To fix a unique mesh at the interface between elements, a representation mesh of each edge is built. The mesh of each 2D element starts with the recovery of all the points on the boundary (from the meshes of the boundary) and then the interior mesh is built. The generation of the representation meshes follows a Bowyer-Watson algorithm [4, 11, 14]. It is an adaptive remeshing method guided by an a posteriori estimate which is evaluated by a global optimization algorithm known as direct [7]. The algorithm direct, acronym of dividing rectangles, is an usual branch and bound one.

Thus, all objectives are verified and an accurate visualization is possible.

4 Accurate, Adaptive and Compressed Reconstruction of Radiated Fields

Given a boundary \(\varGamma \) of a scattering object, a solution q has been computed on \(\varGamma \) by a Boundary Element Method (Sect. 2). Then, we want to visualize the radiated solution, noted u, in a domain \(\mathcal {V}\). We can approximate u by interpolation

$$\begin{aligned} u(x) \approx \sum _{j=1}^{N_{\mathcal {V}}} u(\xi _j) \phi _j(x), \qquad \forall x \in \mathcal {V}, \end{aligned}$$

where \(N_{\mathcal {V}}\) denotes the number of interpolation points, \(\left( \xi _{j}\right) _{j=1,N_{\mathcal {V}}}\) are interpolation points and \(\left( \phi _{j}\right) _{j=1,N_{\mathcal {V}}}\) are basis functions with collocation types (see hereafter). The degrees of freedom \(\left( u(\xi _{j})\right) _{j=1,N_{\mathcal {V}}}\) are therefore computed by the representation formula (4). Each computation is expensive because of the convolution by the fundamental solution G. The objective is to get a good approximation of u for a reasonable number of degrees of freedom. Then, the choice of smart basis functions (and the interpolation points) is crucial. Note that if we use an interpolation on the kernel G, instead of u, with the same basis functions and interpolation points, we get the same approximation

$$\begin{aligned} u(x) \approx \int _{\varGamma } \sum _{j=1}^{N_{\mathcal {E}}} G(\xi _j,y) \phi _j(x) q(y) d \gamma _y = \sum _{j=1}^{N_{\mathcal {E}}} \underbrace{\int _{\varGamma } G(\xi _j,y) q(y) d \gamma _y}_{u(\xi _j)}\phi _j(x), \, \forall x \in \mathcal {V}. \end{aligned}$$

Thus, to control the approximation of the solution (for any incident wave), the control of the approximation of the kernel is equivalent.

4.1 Formulation of Compressed Reconstruction of Radiated Field

The quality of the reconstructed radiated field depends on the accuracy of the kernel interpolation. For large wave number k, this function is highly oscillating. The use of directional interpolation [3, 6, 9] permits to get an improvement on this interpolation.

Directional Interpolation with One Direction. For the sake of simplicity, we show the developments with the 3D Green function [3] but the results are similar in 2D. Indeed, the Atkinson expansion [5] shows that the asymptotic behaviour of the kernel is similar in both dimensions. The function G to interpolate is given by (2). Let consider \(y \in \varGamma \) given, and \(x \in \mathbb {R}^d\) defined such that \(x = y + \alpha c + \epsilon \), where \(c \in \mathbb {R}^d\), \(\alpha \) and \(\epsilon \) are constants. Then,

$$\begin{aligned} \begin{aligned} \Vert {x-y}\Vert&= \left\langle x-y,\frac{x-y}{\Vert {x-y}\Vert }\right\rangle = \left\langle x-y,\frac{\alpha c + \epsilon }{\Vert {\alpha c + \epsilon }\Vert }\right\rangle \displaystyle \mathop {\approx }_{\frac{\epsilon }{\alpha } \rightarrow 0} \left\langle x-y,\frac{c}{\Vert {c}\Vert }\right\rangle . \end{aligned} \end{aligned}$$
(6)

We define a modified kernel \(G_c\) linked to a direction \(c \in \mathbb {R}^d\) with \(\Vert {c}\Vert = 1\)

$$\begin{aligned} G_c(x,y)= G(x,y) e^{-i k \left\langle c,x-y\right\rangle } = \frac{e^{i k \left( \Vert {x-y}\Vert - \left\langle c,x-y\right\rangle \right) }}{4 \pi \Vert {x-y}\Vert }, \qquad \forall x \in \mathcal {V}, \forall y \in \varGamma . \end{aligned}$$
(7)

Equation  (6) shows the behaviour in the case the direction is chosen such that \(x = y + \alpha c + \epsilon \) and \(\epsilon / \alpha \rightarrow 0\). The choice of the direction is therefore relevant if

$$\begin{aligned} c \approx (x-y)/\Vert {x-y}\Vert , \qquad \forall x \in \mathcal {V}, \, \forall y \in \varGamma . \end{aligned}$$
(8)

In the case this assumption holds, the quantity \(\left( \Vert {x-y}\Vert - \left\langle c,x-y\right\rangle \right) \) is reduced and therefore the oscillations of \(G_c\) are limited.

Figure 2 shows the advantage of the plane wave use. Green kernel is plotted with y taken at the origin and \(x \in \mathcal {V}\) where \( \mathcal {V}\) is a square whose abscissas and ordinates lie between \(5\lambda \) and \(6\lambda \) with \(\lambda =2 \pi / k\). A direction \(c=x_c / \Vert {x_c}\Vert \) is defined where \(x_c\) is the center of the square. A plane wave is plotted (\(e^{i k \left\langle c,x\right\rangle })\) in the same domain. A function \(G_c\) is defined according to (7). This function clearly presents less oscillations than Green function G and hence is easier to interpolate with accuracy. Thus, last figure is obtained from an interpolation of G with Lagrangian polynomials of order 4 in each direction (25 d.o.f.) combined with the directional plane wave (i.e. \(G(x,0) \approx \sum _{j=1}^{N_{\mathcal {E}}} G(\xi _j,0) \mathcal {L}_j(x) e^{i k \left\langle c,x-\xi _j\right\rangle }\)) to get an accuracy of 0.24 % \(L^{\infty }\) error on the approximation of G.

Fig. 2.
figure 2

Visualization of Green kernel G (a), a plane wave (b), the function \(G_c\) (c) and an approximation of G using a directional interpolation of G with orders 4 (d). (Color figure online)

Remark 1

The approximation of G used for Fig. 2 (d) is independent of the source term w in (1) so by comparison to Fig. 1 (d), we can extrapolate that for the same accuracy, this strategy will reduce by a factor 8 the number of d.o.f.

An approximation on \(G_c\) is introduced with \(G_c(x,y) \approx \sum _{j=1}^{N_{\mathcal {E}}} G_c(\xi _j,y) \mathcal {L}_j(x)\) where \(\left( \mathcal {L}_{j}\right) _{j=1,N_{\mathcal {V}}}\) are the Lagrangian polynomials. Then, for any \(x \in \mathcal {V}\),

$$\begin{aligned} \begin{aligned} u(x)&\approx \int _{\varGamma } \sum _{j=1}^{N_{\mathcal {E}}} G(\xi _j,y) e^{-i k \left\langle c,\xi _j - y\right\rangle } \mathcal {L}_j(x) e^{i k \left\langle c,x - y\right\rangle } q(y) d\gamma _y \\&\approx \sum _{j=1}^{N_{\mathcal {E}}} u(\xi _j) \mathcal {L}_j(x) e^{i k \left\langle c,x - \xi _j\right\rangle }. \end{aligned} \end{aligned}$$

In this case, the basis functions are chosen such that \(\phi _j(x) = \mathcal {L}_j(x) e^{i k \left\langle c,x - \xi _j\right\rangle }\) where \(x \in \mathcal {V}\). In order to verify the assumption (8), the angle between c and \((x-y)/\Vert {x-y}\Vert \) must be small. As previously, the direction c is defined as \(c=(x_c - y_c) / \Vert {x_c - y_c}\Vert \) where \(x_c\) and \(y_c\) are defined as “average” of \(\mathcal {V}\) and \(\varGamma \). If the assumption (8) is not satisfied (i.e. \(\epsilon /\alpha \) does not tend toward 0 in (6)), a subdivision of the domain \(\mathcal {V}\) (and eventually of \(\varGamma \)) is needed and multiple directions are defined.

Directional Interpolation with Multiple Directions. In order to define judicious basis functions, a subdivision of \(\mathcal {V}\) can be done. A mesh of \(\mathcal {V}\), noted \(\mathcal {T}(\mathcal {V})\), will be constructed and composed of elements \(\mathcal {E}_{\mathcal {V}}\) such that \(\mathcal {T}(\mathcal {V})\) is a conformal mesh of \(\mathcal {V}\), that is \(\cup _{\mathcal {E}_{\mathcal {V}} \in \mathcal {T}(\mathcal {V})} \, \mathcal {E}_{\mathcal {V}} = \mathcal {V}\) and without overlapping between elements. In each element \(\mathcal {E}_{\mathcal {V}}\), a local field will be therefore reconstructed with local directions and basis functions. Furthermore, a subdivision of \(\varGamma \) can be established to respect the assumption on the directions (8). The boundary \(\varGamma \) is decomposed in \(\varGamma = \cup _{\varGamma _n} \varGamma _n \) such that there is no overlapping between each part \(\varGamma _n\). For each \(\varGamma _n\) a direction \(c_n\) is then defined from two points \(x_c\) and \(y_c\) where \(x_c\) is the center of the element \(\mathcal {E}_{\mathcal {V}}\) and \(y_c\) is an “average” of \(\varGamma _n\). Furthermore, to each portion \(\varGamma _n\), we introduce a function, noted \(G^n_c\), similar to the case one direction (7)

$$\begin{aligned} G_c^n(x,y) = \frac{e^{i k \left( \Vert {x-y}\Vert - \left\langle c_n,x-y\right\rangle \right) }}{4 \pi \Vert {x-y}\Vert }, \qquad \forall x \in \mathcal {E}_{\mathcal {V}}, \forall y \in \varGamma _n. \end{aligned}$$
(9)

Using all these directions, the approximation of u is for any \(x \in \mathcal {E}_{\mathcal {V}}\),

$$\begin{aligned} \begin{aligned} u(x)&\approx \sum _{n=1}^{N_{\varGamma }} \int _{\varGamma _n} \sum _{j=1}^{N_{\mathcal {E}}} G(x,y) q(y) d\gamma _y \mathcal {L}_j(x) e^{i k \left\langle c_n,x - \xi _j\right\rangle } \\&\approx \sum _{n=1}^{N_{\varGamma }} \sum _{j=1}^{N_{\mathcal {E}}} u_{| \varGamma _n}(\xi _j) \mathcal {L}_j(x) e^{i k \left\langle c_n,x - \xi _j\right\rangle }, \end{aligned} \end{aligned}$$
(10)

where \(u_{| \varGamma _n}(\xi _j)\) is the piece of radiated field computed at an interpolation point (computed from a portion \(\varGamma _n \subset \varGamma \)). Note that for a given number of degrees of freedom, the computational cost in the integral equation code is the same with one or more directions. Indeed, at one interpolation point, the sum of all contributions is a constant and corresponds to the discretization of \(\varGamma \).

4.2 Algorithm

We propose a relevant subdivision of \(\mathcal {V}\). We assume that \(\mathcal {V}\) is an axis-parallel box (rectangle in 2D or parallelepiped in 3D), or we define an axis-parallel box including the domain to visualize. In the same way, we introduce \(\mathcal {G}\), an axis-parallel box including \(\varGamma \). For each element \(\mathcal {E}_{\mathcal {V}} \in \mathcal {T}(\mathcal {V})\), a subdivision of \(\mathcal {G}\) is constructed such that its elements, noted \(\mathcal {B}_{\mathcal {E}}\), verify \(\cup _{\mathcal {B}_{\mathcal {E}} \subset \mathcal {G}} \, \mathcal {B}_{\mathcal {E}} = \mathcal {G}\). The subscript on \(\mathcal {B}_{\mathcal {E}}\) shows the dependence on the element \(\mathcal {E}_{\mathcal {V}}\) considered. The boundary \(\varGamma \) can be decomposed, following the subdivision of \(\mathcal {G}\), such that \(\varGamma = \cup _{\varGamma _n \subset \mathcal {B}_{\mathcal {E}}} \varGamma _n \) and \(\varGamma _n = \varGamma \cap \mathcal {B}_{\mathcal {E}}\). For each portion \(\varGamma _n\) included in a box \(\mathcal {B}_{\mathcal {E}}\), a direction \(c_n\) is defined from the centers \(x_c\) and \(y_c\) of respectively \(\mathcal {E}_{\mathcal {V}}\) and \(\mathcal {B}_{\mathcal {E}}\).

figure a

In Algorithm 1, we propose a methodology to generate the subdivision of \(\mathcal {V}\) and for each element \(\mathcal {E}_{\mathcal {V}} \in \mathcal {T}(\mathcal {V})\), the subdivision of \(\mathcal {G}\) associated. Therefore, we provide a criterion to decide whether a refinement is needed or not. We fix an arbitrary constant \(R > 0\) and ask in each element to limit the oscillations of the kernel by controlling the ratio between the lengths of the element and the wavelength.

Admissibility Criterion. Two cases are considered whether or not there are directions. First, when no direction is used, we define the ratio \(r=\max (L_1,L_2) / \lambda \) where \(\lambda \) is the wavelength and \(L_1\) (resp. \(L_2\)) is the length of the element in the first (resp. second) direction. The bigger this ratio is, the more the function is possibly oscillating. An element is said admissible if its ratio is smaller than R. Otherwise, this element needs to be subdivided. However, when directions are used, for a couple \((\mathcal {E}_{\mathcal {V}},\mathcal {B}_{\mathcal {E}})\), a direction \(c_n\) is defined and we define the ratio \(\widetilde{r}=\max (L_1,L_2) / \widetilde{\lambda }\), where \(\widetilde{\lambda }=2\pi /\widetilde{k}\) and \(\widetilde{k}\) is defined by

$$\begin{aligned} \displaystyle \widetilde{k} = k \max _{(x,y) \in (\mathcal {E}_{\mathcal {V}},\mathcal {B}_{\mathcal {E}})} \left| 1 - \left\langle c_n,\frac{x-y}{\Vert {x-y}\Vert }\right\rangle \right| . \end{aligned}$$
(11)

This definition of \(\widetilde{k}\) is therefore equivalent to a wave number. Indeed, \(G_c^n\) (9) is then equivalent to \(e^{i \widetilde{k} r}/(4\pi r)\) where r is the distance between two given points. The ratio \(\widetilde{r}\) allows to quantify the oscillations after introduction of the direction.

Subdivision of the Domain. The construction of the subdivision of \(\mathcal {V}\) is based on a hierarchically partition of this domain. This partitioning is recursive and therefore a tree structure is used. Level 0 corresponds to the whole domain \(\mathcal {V}\). Tree level \(l + 1\) is obtained from level l by subdividing each leaf \(\mathcal {L}_{\mathcal {V}}\) equally into 2 children. The direction of subdivision (in the first or second direction) is chosen such that the maximum of the new ratios \(\widetilde{r}\) in the new configuration is the lowest. At the same time, a tree structure is also used to define the subdivision of \(\varGamma \) associated to each leaf \(\mathcal {L}_{\mathcal {V}}\). Let note \(\mathcal {A}_{\varGamma }\) the tree linked to \(\mathcal {L}_{\mathcal {V}}\). The leaf where the ratio is maximal is subdivided into 2 children. The same criterion is used to define in which direction the subdivision is done. When a subdivision is done on a couple, four configurations are tested (two directions possible for each leaf).

When each element respects the admissibility criterion (ratio under R), a mesh of \(\mathcal {V}\) is constructed by taking all the leafs (elements without children) of the tree of \(\mathcal {V}\). Furthermore, to each element of this mesh, from the leafs of the associated tree \(\mathcal {A}_{\varGamma }\), a subdivision of \(\varGamma \) is constructed such that \(\cup _{\mathcal {B}_{\mathcal {E}}} \mathcal {B}_{\mathcal {E}} = \mathcal {G}\).

Assignation of the Interpolation Orders. The last step of Algorithm 1 is to assign the interpolation orders and define the associated interpolation points. Let \(\mathcal {E}_{\mathcal {V}}\) be an arbitrary element whose lengths are \(L_1\) and \(L_2\). The decomposition of \(\varGamma \) is constructed from elements \(\mathcal {B}_{\mathcal {E}} \subset \mathcal {G}\) and we note \(\{\mathcal {B}_{\mathcal {E}}\}\) this set. Then, similarly to the admissibility criterion, we define two ratios \(\widetilde{r}_1=L_1 / \widetilde{\lambda }\) and \(\widetilde{r}_2= L_2 / \widetilde{\lambda }\) for the element \(\mathcal {E}_{\mathcal {V}}\) and \(\widetilde{\lambda }=2\pi /\kappa \). However, \(\kappa \) must take into account all the subdivision of \(\mathcal {G}\) and is therefore defined as

$$\begin{aligned} \displaystyle \kappa = k \, \sup _{\{\mathcal {B}_{\mathcal {E}}\}}\max _{(x,y) \in (\mathcal {E}_{\mathcal {V}},\mathcal {B}_{\mathcal {E}})} \left| 1 - \left\langle c,\frac{x-y}{\Vert {x-y}\Vert }\right\rangle \right| = \sup _{\{\mathcal {B}_{\mathcal {E}}\}} \widetilde{k}. \end{aligned}$$
(12)
Table 1. Rules to fix the order for a given accuracy \(\varepsilon \) according to the ratio length/wavelength

Finally, using a priori rules [2], according to the two ratios, the interpolation orders in both directions are fixed. The following 1D problem is used to fix these rules (some of them are reported in Table 1): For a given tolerance \(\varepsilon > 0\), find the smallest N such that

$$\begin{aligned} \left\| f - \widetilde{f}_N\right\| _{\infty ,[0,1]} \le \varepsilon , \end{aligned}$$

where \(f(x) = \sin (2 \pi r x)\), r is the ratio, \(\widetilde{f}_N(x) = \sum _{i=1}^{N+1} f(\xi _i^N) L_i^N(x)\). For each order N, the \(N+1\) 1D Chebyshev points on [0,1] are noted \((\xi _i^N)_{i=1,N+1}\) and the Lagrangian polynomials associated are noted \(L_i^N\). It ensures the control in \(L^{\infty }\)-norm of the interpolation error for a given accuracy (for instance \(\varepsilon =1\%\)).

Overall Formulation. Finally, following (10), in an element \(\mathcal {E}_{\mathcal {V}}\), the local reconstructed radiated field \(u_{rad}^{\mathcal {E}_{\mathcal {V}}}\) is

$$\begin{aligned} u_{rad}^{\mathcal {E}_{\mathcal {V}}}(x) = \sum _{i=1}^{N_{\mathcal {E}}. N_{\varGamma }^{\mathcal {E}}} u_i^{\mathcal {E}_{\mathcal {V}}} \phi _i^{\mathcal {E}_{\mathcal {V}}}(x), \qquad \forall x \in \mathcal {E}_{\mathcal {V}} \subset \mathcal {V}, \end{aligned}$$
(13)

where \(u_i^{\mathcal {E}_{\mathcal {V}}}\) are the degrees of freedom whose basis functions \(\phi _i^{\mathcal {E}_{\mathcal {V}}}\) are composed of high order polynomials and directional plane waves (10). The method explained in Sect. 3 is therefore used to visualize this field. In comparison with (5), the link between the basis functions \(\phi _i^{\mathcal {E}_{\mathcal {V}}}\), defined on the element \(\mathcal {E}_{\mathcal {V}}\), and the functions \(\varphi ^K_i\) defined on the reference cell in the previous section is given by

$$ \phi ^{\mathcal {E}_{\mathcal {V}}}_i(x)= (\varphi ^K_i \circ g^{-1}_K) (x), \qquad \forall x\in \mathcal {E}_{\mathcal {V}},$$

where \(g_K\) is the geometrical transformation between the reference cell and \(\mathcal {E}_{\mathcal {V}}\).

5 Numerical Results

Several numerical examples are presented to demonstrate the potential of the method. The first example illustrates the advantages of our strategy with a one direction interpolation application. In the second case, the domain to visualize is wider and the adaptive method proposed in Sect. 4 is used. The last example is more realistic and shows in particular the benefits of the coupling of the reconstruction with the visualization method proposed in Sect. 3.

Fig. 3.
figure 3

Some scattering of diffracted fields (a, b and c) by a disk. Except the reference, the others figures are obtained with order 5 in each direction. We compare the addition of only one direction (fig. c and e) to the case without direction (b and d).

5.1 One Directional Interpolation

The first problem is a wave propagation scattered by a disk obstacle. The radius of the obstacle is 0.9 and its center is the origin. The incident plane wave is horizontal and coming from the left. The wave number is \(k=6\pi \) so the wavelength is \(\lambda = 1/3\). The abscissas and ordinates of the domain to visualize both lie between \(5 \lambda \) and \(8 \lambda \) such that the lengths of the elements are \(3 \lambda \). We define only one direction from the center of the element and the origin (corresponding to the center of the boundary). In this case, no subdivision is done and the order prescribed by Table 1 is 5 in each direction. Thus, 36 interpolation points are defined to reconstruct the radiated field. Figure 3 compares the diffracted field obtained with and without a direction. Figure (a) is the reference field computed with a very high order to have a good accuracy. Without direction, the radiated field is very far from the reference as shown by the pointwise absolute error with more than 111 % relative error at some points. With the same points, the addition of the direction permits to have a very low error (maximum of 3%).

Fig. 4.
figure 4

Subdivision of the domain and comparison of the orders needed

5.2 Adaptive Method

For this second example, the parameters (disk, wave number k) are unchanged. However, the domain where we want to reconstruct the solution is different and larger. The abscissas (resp. ordinates) of this domain lie between 2 and 6 (resp. –4 and 4) such that its lengths are 4. It corresponds therefore to 12 wavelengths in each direction (as \(\lambda =1/3\)). We fix \(R=0.1\), then a subdivision of the domain is done and 112 elements are constructed. Figure 4 shows the subdivision of the domain and the orders needed to have the same accuracy whether there are or not directions. Figure 5 compares for the same degrees of freedom (d.o.f.), the solution obtained with or without directions. For this given subdivision, in order to have the same accuracy, the number of degrees of freedom goes from 1120 to 32508 (factor 29).

Fig. 5.
figure 5

Visualization of the diffracted field. Comparison of our method and the case without direction for the same number of d.o.f. (a-b) and for a similar accuracy (a-c).

5.3 A More Realistic Example

The last problem deals with a more realistic wave propagation. The scattering boundary is a L-shape object whose maximal length is 1. The wave number is \(k=6 \pi \). The domain we want to visualize the total radiated field is large such that its abscissas and ordinates both lie between –2 and 2. Note that in this case the scattering object is included inside the visualization domain. The adaptive method is use to subdivide this domain such that 360 elements are created and 9219 degrees of freedom (average of 25 d.o.f. by element) are used. The admissibility criterion chosen was 1/2. Then, the number of d.o.f. is relatively low as in each element and following Table 1, this number is bounded by \(6 \times 6\). Figure 6 shows the representation obtained. Note that the total field is plotted. Thus, in addition to the scattered field, the incident field is taken into account. The consequence is the addition of only one basis function which is \(e^{i \nu x}\) where \(\nu \) is the direction of the plane wave. Figure 6 (b) shows the representation mesh used to represent the solution (accuracy asked is 0.5%). The number of elements in the representation mesh is 51999 (average of 144 triangles in each element). The subdivision of the domain is also shown with ticker lines.

Fig. 6.
figure 6

Visualization of the total radiated field scattered (real (a) and absolute (b) parts) by a L-shape object

6 Conclusions

An accurate and automatic method is proposed to reconstruct radiated Helmholtz fields from boundary element solutions. An adaptive method for the visualization of such fields, in particular able to handle functions composed of high order polynomials and special functions as plane waves, is presented and used.