arXiv:2107.09797v1 [math.NA] 20 Jul 2021 6 ,1,1] 1][4,[5 0 3.I em httepaewv meth wave plane the that seems It 33]. 30, [25, [17]-[24], 15], 12, 7, pollution [6, the reduce can that the methods ample, element finite some are There ihlrewv ubr uhta h ocalled so the Helmholt that for such method numbers element wave finite large efficient with an design to topic portant onaycondition boundary sal aibepstv ucin h number The function. positive variable a usually f ysc napoiaewv ieto.W sals best a establish We d direction. is pla wave function “adaptive” approximate basis wave an an plane such each define by which we in dimensions, Then small ansatz with number. space optics wave geometrical variable the with in equation defined directions wave computing in ihlrewv ubr n eotsm ueia eut to results method. numerical Helm proposed some homogeneous the report of of and efficiency solutions numbers wave analytic large the with for tions space wave plane the naz prxmt aedrcin ln aesae etappr best space, wave plane direction, wave approximate ansatz, hr Ω where eoe h rqec n a elarge, be may and frequency the denotes yNtrlSineFudto fCiaG12071469. China of Foundation ba Science ([email protected], Natural China by 100049, Sci Beijing Mathematical of Sciences, School of 2. China; 100190, Beijing ences, LN AEMTO AE NAPOIAEWAVE APPROXIMATE ON BASED METHOD WAVE PLANE A ∈ emot qaini h ai oe nsudpoaain ti ver a is It propagation. sound in model basic the is equation Helmholtz nti ae ecnie h olwn emot qainwt impedan with equation Helmholtz following the consider we paper this In M ujc classifications subject AMS Abstract. e words. Key .LE,IME,Aaeyo ahmtc n ytm Science Systems and Mathematics of Academy ICMSEC, LSEC, 1. L IETOSFRTODMNINLHELMHOLTZ DIMENSIONAL TWO FOR DIRECTIONS 2 Ω stesuc emand term source the is (Ω) ⊂ hp QAIN IHLREWV NUMBERS WAVE LARGE WITH EQUATIONS R ( 2 nt lmn ehd 8 ,1,2,3]adtepaewv methods wave plane the and 31] 20, 13, 9, [8, methods element finite nti ae epeetadaayeahg cuaymto for method accuracy high a analyse and present we paper this In L ( sabuddLpht domain, Lipchitz bounded a is ∂ u emot qain,vral aenmes emtia optics geometrical numbers, wave variable equations, Helmholtz n = + − iκ ∆+ (∆ ( r )) IAH N EHN WANG ZEZHONG AND HU QIYA u κ ( ω, 2 ( r 1. r )) = ) 53,65N55. 65N30, . u Introduction ( κ ω, g ( ( r ω, r = ) = ) 1 c r ( ) r , ) f c ( ω > ( r ω, r ) n , eoe h ih pe,wihis which speed, light the denotes 0 ∈ e1ya.e) hswr a funded was work This [email protected]). r g κ steotnra etron vector normal out the is ) ne,Uiest fCieeAcademy Chinese of University ences, olto effect pollution ∂ ( , ∈ r Ω scle the called is ) , L r 2 ( = ( ∂ ) napplications, In Ω). ,y x, hns cdm fSci- of Academy Chinese , L ) 2 ∈ oximation prxmto of approximation a ereduced. be can Ω aenumber wave , ffc,frex- for effect, fHelmholtz of lutaethe illustrate d aeless have ods equations z ot equa- holtz etermined ewave ne im- y (1.1) ∂ Ω, ce . ω 2 pollution effect for homogeneous Helmholtz equations (and time-harmonic Maxwell equations) with constant (or piecewise constant) large wave numbers since plane wave basis functions are solutions of a homogeneous Helmholtz equation without boundary condition and can capture at the maximum the oscillating characteristic of the analytic solution of the original Helmholtz equation. In [24], a plane wave method combined with local spectral elements was proposed for the discretization of the nonhomogeneous Helmholtz equation (and time-harmonic Maxwell equations) with (piecewise) constant wave numbers. The basic ideas in this method can be described as follows. At first nonhomogeneous Helmholtz equations on small subdo- mains are discretized in the space consisting of higher order polynomials, then the resulting residue Helmholtz equation (which is homogeneous on each element) on the global solution domain is discretized by the plane wave method. By using this method, we need only to study plane wave method for Helmholtz equations that are homogeneous on every element. Then we can simply consider the homogeneous Helmholtz equation (on each element)

(∆ + κ2(r))u(ω, r)=0, r = (x, y) Ω. (1.2) ∈ Recently, the Geometric Optics Ansatz-based plane wave discontinuous Galerkin (GOPWDG) method for (1.2) was proposed in [21], in which a high accuracy L2 error of approximate solution was established for the case with a variable wave number κ(r). It is known that L2 errors of the finite element solutions of a usual elliptic equation converge to zero when h 0. However, this property does not hold → for all the methods mentioned above: the L2 errors of the finite element solutions for Helmholtz equation (1.2) (with a suitable boundary condition) do not decrease when h decreases unless hω 0 or the number of basis functions on every element → also increases. Let the mesh sizes h satisfy a basic assumption hω = O(1), and let the number of basis functions on every element be fixed. A natural question is whether the previous property can be kept for Helmholtz equations with large wave numbers? The answer is positive definite, provided that basis functions are constructed carefully. In [3, 16, 10, 11], plane wave type methods based on the geometrical optics ansatz were proposed to remove the pollution effect in the sense that the L2 errors of the approximate finite element solutions decrease when ω increases or h decreases (assuming hω = const.). The key idea is to define each basis function as the form p(r)eiκd·r, where p(r) is a polynomial and d denotes a local approximation of a wave direction vector determined by the geometric optics ansatz. In [3], assuming that a good local approximation d of every wave direction is known (for example, it has been computed by the ray tracing technique), the best L2 approximation of the resulting finite element space was derived. An important observation made in [10, 11] is that the wave directions are independent of ω, so every local approximation d can be preliminarily computed by the numerical 3 micro-local technique (NMLA) [2] based on approximate solutions of an auxiliary low-frequency problem. The approximate wave directions are incorporated as plane wave basis functions of a finite element space that is applied to the discretization of the considered high-frequency problem [10, 11]. It has been shown in [10, 11] that the L2 errors of the approximate solutions are O(ω−1/2) for the case with multiple waves as ω . It is clear that the L2 errors O(ω−1/2) of the approximate → ∞ solutions are not small unless ω is very large, which limits the applications of the method. The unsatisfactory L2 errors come from the low accuracy O(ω−1/2) of the approximate wave directions computed by the NMLA. In this paper, inspired by the ideas in [2], we design a new algorithm for com- puting local wave directions to improve their accuracy. We show that the accuracy of the computed local wave direction d as well as the best L2 approximate errors of the resulting plane wave space can achieve O(ω−1) (= O(h) if hω = const.), which is much smaller than O(ω−1/2) for a large ω. Then, by combining the ideas proposed in [24], we apply the constructed plane wave spaces to the discretization of the nonhomogeneous Helmholtz equation (1.1). We test two examples to confirm that the L2 errors of the resulting approximate solutions linearly decay when the mesh size h decreases or ω increases (choosing h such that hω = const.). The paper is organized as follows. In Section 2, we derive basic expressions of the new plane wave type basis functions by the geometrical optics ansatz. In section 3, we describe algorithms for approximately computing local wave directions and investigate the accuracies of the approximate wave directions and prove the best L2 error of the resulting finite element spaces . Finally, we report some numerical results on the proposed methods in Section 4.

2. Geometric optics ansatz-based plane wave basis functions

For a given h > 0, we divide the domain Ω into a union of quasi-uniformly polygonal elements with the size h. Let denote the resulting partition. For Th convenience, we separate ω from κ: κ(r)= ω ξ(r) with ξ(r)=1/c2(r).

2.1. Geometric optics ansatz. If the solutionp of the equation (1.2) corresponds to a simple wave, according to the geometric optics ansatz, the solution of (1.2) can be expressed as the L¨uneberg-Kline expansion [4]: r u(ω, r)= eiωφ( )A(r), (2.1) where φ is called the phase function satisfying the eikonal equation

φ(r) 2 = ξ(r), (2.2) |∇ | and A(r) is called the amplitude function that can be written as ∞ A (r) A(r)= s (2.3) (iω)s s=0 X 4 with A ∞ satisfying a recursive system of PDEs: { s}s=0 2 φ A + A ∆φ = ∆A − (2.4) ∇ · ∇ s s − s 1 for s =0, 1, , with A− 0. ··· 1 ≡ The key features of the geometric optics ansatz are: A ∞ and φ are independent of the frequency ω; •{ s}s=0 A ∞ and φ depend on c(r) (and f(r) if (1.1) is considered). •{ s}s=0 When more waves are involved in the solution of the equation (1.2), the generic solution of (1.2) should be locally defined as a finite sum of terms like (2.1). Hence, in general crossing waves, we use N(r) to denote the number of crossing waves at the position r and expresse the solution of the Helmholtz equation (1.2) as

N(r)

u(ω, r)= un(ω, r), (2.5) n=1 X where each un(ω, r) has its ansatz form as (2.1) ∞ r r A (r) u (ω, r)= A (r)eiωφn( ) = eiωφn( ) n,s . (2.6) n n (iω)s s=0 X And for the n-wave ansatz (n = 1, ,N(r)), the ω-independent phase function ··· φ (r) and A (r) ∞ satisfy the eikonal equation (2.2) and the corresponding n { n,s }s=0 system (2.4) respectively.

2.2. Construction of plane wave type basis functions. Recall that the solu- tion of (1.2) can be written as (see (2.5) and (2.6))

N(r) iωφn(r) u(ω, r)= un(ω, r), un(ω, r)= An(ω, r)e n=1 X r and the phase functions φ (r) N( ) are independent of ω. If the phase functions { n }n=1 φn(r) are known, then we need only to determine the amplitude functions An(ω, r), which can be approximated by finite element functions with smaller degrees of freedom. We need only to consider the case with a single wave. For a sufficiently large ω, by (2.1) and (2.3) we have

iωφ(r) −1 u(ω, r)= A0(r)e + O(ω ). Motivated by the above expression, we define a plane wave type basis function as ϕ(r)= p(r)eiωτ(r), where τ is a real polynomial approximately satisfying (2.2) and a is a complex polynomial defined by τ(r).

We consider a generic element K0 with the diameter h and the barycenter r0 =

(x0,y0). By the Taylor formula, φ can be written as φ(r)= φ(r ) + ( φ)(r ) (r r )+ O( r r 2). 0 ∇ 0 · − 0 | − 0| 5

Then 2 iωφ(r0) iω(∇φ)(r0)·(r−r0)+O(ωh ) −1 u(ω, r)= A0(r)e e + O(ω ). It follows by (2.2) that ( φ)(r ) 2 = ξ(r ), | ∇ 0 | 0 which means that ( φ)(r ) can be written as ( φ)(r )= ξ(r )(cos θ, sin θ) with ∇ 0 ∇ 0 0 some unknown direction angle θ [0, π). Let θ be a good approximation of θ. A ∈ h p natural idea is to choose

τ (r)= ξ(r )(cos θ sin θ ) (r r ), h 0 h h · − 0 which can be regarded as anp approximation of φ(r) φ(r ). It is easy to see that − 0 such τh(r) approximately satisfies the eikonal equation in the sense that ( τ )(r) 2 = ξ(r)+ O( r r ), r K . | ∇ h | | − 0| ∈ 0 For this linear polynomial τh, we look for a linear polynomial ph(r) such that ph(r) satisfies a similar equation with (2.4) that A0(r) meets (we can omit the constant iωφ(r0) e ). Replacing φ and A0 in (2.4) (for l = 0) by τh and ph respectively and using the fact ∆τh = 0, we can define a linear polynomial ph(r) by τ p =0, on K . ∇ h · ∇ h 0 We have two independent choices of ph(r) satisfying the above equation, namely, pτh (r) = 1+(sin θ cos θ ) (r r ) and pτh (r)=1 (sin θ cos θ ) (r r ). 1 h − h · − 0 2 − h − h · − 0 They correspond to two plane wave basis functions

τh iωτh(r) τh iωτh(r) ϕ1(r)= p1 (r)e and ϕ2(r)= p2 (r)e . For the case with more waves, we can similarly define plane wave-type basis functions. For an element K0 with the barycenter r0, define φ (r ) d := ∇ n 0 = c(r ) φ (r ) (n =1, ,N(r )). n φ (r ) 0 ∇ n 0 ··· 0 |∇ n 0 | By the eikonal equation, we have d = 1 and so it can be written as d = | n| n (cos θ cos θ )t with θ [0, π). We call d and θ n-th ray direction (or wave n n n ∈ n n direction) of the wave fronts at r0 and the direction angle of the n-th ray, respec- tively.

Let θh,n be an approximation of θn. Define d = (cos θ cos θ )t and τ = ξ(r )d (r r ), h,n h,n h,n h,n 0 h,n · − 0 which can be regarded as an approximation of φ (rp) φ (r ). Define n − n 0 pτh,n (r)=1+ d⊥ (r r ) and pτh,n (r)=1 d⊥ (r r ) 1 h,n · − 0 h − h,n · − 0 which satisfy the equation

τ pτh,n =0, on K . ∇ h,n · ∇ j 0 6

Then we define 2N(r0) plane wave basis functions on K0 as follows

τ r ϕ (ω, r)= p h,n (r)eiωτh,n( ), n =1, ,N(r ); j =1, 2 (r K ). n,j j ··· 0 ∈ 0

The core task of this article is to compute approximate direction angles θh,n (n = 1, ,N(r )). ··· 0

Remark 2.1. In most applications, there are only several rays , i.e., N(r0) is small. Then the number of the local basis functions ϕ is less than that of the { n,j } p version of the plane wave methods, so the plane wave method with the proposed − basis functions is cheaper than the p version of the plane wave methods for (1.2). − In the existing works [3] and [10], the factor ph(r) was directly chosen as complete linear polynomials, which corresponds to three independent basis functions. Here we have used the geometric optics ansatz (2.4) to reduce the number of basis functions on each element.

3. An adaptive plane wave method based on approximate direction angles

N(r0) Since the ray angles θn n=1 described in Subsection 2.2 are not known in appli- { } r cations, we hope to find a cheap way to compute good approximations θ N( 0) { h,n}n=1 of them for a large ω . An important observation made in [10, 11] is that the ray N(r0) angles θn n=1 are independent of ω, so we can use an approximate solution of { } r low-frequency problem to compute θ N( 0). { h,n}n=1 Choosing positive numbersω ˜ ω, and consider auxiliary Helmholtz equations ≪ (∆+ω ˜2ξ(r))˜u(˜ω, r)=0, r = (x, y) Ω, ∈ (3.1) ((∂n + iω˜ ξ(r))u(˜ω, r)= g(˜ω, r), r ∂Ω. ∈ The solution of (3.1) can be writtenp as

N(r) iωφ˜ n(r) u˜(˜ω, r)= u˜n(˜ω, r), u˜n(˜ω, r)= A˜n(˜ω, r)e . (3.2) n=1 X Sinceω ˜ ω (for example,ω ˜ = √ω), the Helmholtz equation (3.1) can be nu- ≪ ω˜ merically solved more cheaper than the original equation (1.2). Let uh denote an approximate solution of (3.1). ω˜ By using the approximation uh , one can probe a good approximation dh,n = (cos θh,n, sin θh,n) of the n-th ray direction dn by the method proposed in [2]. How- ever, the accuracy of the resulting approximation is unsatisfactory. In this section, inspired by the ideas in [2], we will use a different method from [2] to probe ap- r proximate ray angles θ N( 0). { h,n}n=1 Let us first introduce some common notations repeatedly used in this section. We use r to denote the space gradient operator with respect to the (x, y) ∇ 2 coordinate and r as the Hessen operator with respect to the space variable r. If ∇ 7

2 the applied variable only depends on space, we also simplify r and r as and ∇ ∇ ∇ 2 respectively. Furthermore, denote ∇ ru(r ) := ( ru(r)) r r . ∇ 0 ∇ | = 0 Consider a reference point r . For 0 < ρ 1, the circle neighborhood of r with 0 ≪ 0 radio ρ is denoted by

O(r ,ρ) := r : r r <ρ = r : r = r + r(cos θ, sin θ), r<ρ;0 θ 2π . 0 { | − 0| } { 0 ≤ ≤ } We make the following assumption on Ω.

Assumption 3.1. We assume that Ω can be decomposed into several non-overlapping simply connected polygon region. On each region, there is only one kind of medium and ξ is assumed to be sufficiently smooth. Hence N(r) is a constant on each region.

In this section we give an adaptive ray learning method for general wave solution. 3.1. Approximate ray angles θ determined from an analytic solution { n} of the low-frequency problem. For a point r O(r ,ρ), we write r = r + rd with d = (cos θ, sin θ). A circle ∈ 0 0 θ θ centered at r0 with radius ρ is denoted by

S (r ) := r : r r = ρ = r : r = r + ρd , 0 θ< 2π . ρ 0 { | − 0| } { 0 θ ≤ } We first recall the NMLA method developed in [2], which can be used to compute ray directions with low accuracy. NMLA. Setω ˜ = √ω and letu ˜(˜ω, r) be the solution of the low-frequency problem (3.1) (˜u(˜ω, r) was represented by (3.2)). Choosing r > 0 such thatωr ˜ 2 = (1). 0 0 O Define an auxiliary function (which was called impedance quantity) c(r ) U (θ) := (1 + 0 ∂ )˜u(˜ω, r + r d ), (3.3) ω˜ iω˜ r 0 0 θ which removes any possible ambiguity due to resonance [10] and improves the ro- bustness to noise for solutions of the Helmholtz equation.

The NMLA method sample the impedance quantity Uω˜ (θ) on the circle Sr0 (r0). To this end, let ( U ) denote the ℓ-th Fourier coefficient of U , namely, F ω˜ ℓ ω˜ 1 2π ( U ) = U (θ)e−iℓθdθ. F ω˜ ℓ 2π ω˜ Z0 1 Setω ˜0 = r ωr˜ 0. Then apply the filtering operator to the impedance quantity c( 0) B Uω˜ M ω˜0 iℓθ 1 ( Uω˜ )ℓe Uω˜ (θ)= ℓ F ′ (3.4) B 2Mω˜ +1 i (Jℓ(˜ω0) iJ (˜ω0)) 0 ℓ=−M ℓ Xω˜0 − where M = max(1, [˜ω ], [˜ω + (˜ω1/3 2.5)]). Notice that the number of waves ω˜0 0 0 0 − N(r ) is just the number of sharp peaks in the graph of function U (θ). 0 B ω˜ 8

iωφ˜ n(r0) Define B˜n(˜ω, r)= A˜n(˜ω, r)e . It was shown in [1] that

N(r0)

Uω˜ (θ)= B˜n(˜ω, r0)SM (θ θn), (3.5) B ω˜0 − n=1 X where S (θ)= sin([2k+1]θ/2) . As a consequence, whenω ˜ we have k [2k+1] sin(θ/2) 0 → ∞

B˜n(˜ω, r0), if θ = θn, Uω˜ (θ)= (3.6) B (0, otherwise. ∗ ˜∗ For a sufficiently largeω ˜, we compute θn and Bn(˜ω, r0) by ˜∗ ∗ Bn(˜ω, r0)= Uω˜ (θn)= max Uω˜ (θ). B θ∈(0,2π] B Then (see [1])

θ∗ θ (˜ω−1/2), B˜∗(˜ω, r ) B˜ (˜ω, r ) (˜ω−1/2). (3.7) | n − n| ∼ O | n 0 − n 0 | ∼ O As we will see, the accuracy of the approximate ray angles are lower than the expected accuracy ( (˜ω−2)), which determines the approximation error of the ray- O based FEM method. To improve the accuracy of the approximate ray angle, we propose a post- processing method where the data obtained from the NMLA is used as the initial data for a routine that tries to fit some information of the wave u(˜ω, r). Post-processing. We need to investigate how to useu ˜ (if it is known) to learn more exact ray angles. Take a sampling circle S (r ) with r satisfyingωr ˜ = (1). r1 0 1 1 O Define two dual impedance quantities on the circle Sr1 (r0) as c(r ) U +(θ)=(1+ 0 ∂ )˜u(˜ω, r + r d ), ω˜ iω˜ r 0 1 θ  (3.8)  − c(r0) U (θ)=(1 ∂r)˜u(˜ω, r0 + r1dθ). ω˜ − iω˜ 1  Setω ˜1 = r ωr˜ 1. Choosing a positive integer Mω˜1 satisfying Mω˜1 ω˜1. For c( 0) ≥ each integer l satisfying l M , define a sampling quantities by | |≤ ω˜1 + − 1 [ Uω˜ (θ)]ℓ [ Uω˜ (θ)]ℓ Uℓ = F ′ F ′ . iℓ iω˜1 (J (˜ω ) iJ (˜ω )) + J (˜ω ) − iω˜1 (J (˜ω )+ iJ (˜ω )) J (˜ω )  2 ℓ 1 − ℓ 1 ℓ 1 2 ℓ 1 ℓ 1 − ℓ 1  e Before describing the post-processing, we give an expansion of Uℓ. Set

1 i T 1 i T a−1 = ( , ) , a1 = ( , ) . e 2 −2 2 2 For n =1, ,N(r ); j = 1, 1, define the parameters ··· 0 −

b = B˜ (˜ω, r ), b = r a− rB˜ (˜ω, r ) n,0 n 0 n,j 1 j · ∇ n 0 and T 2 b = r c(r )B˜ (˜ω, r )a φ (r )a− , n,2j 1 0 n 0 −j ∇ n 0 j 9

r where B˜ (˜ω, r) = A˜ (˜ω, r)eiωφn( 0) (see the last part). Besides, for ℓ M we n n | | ≤ ω˜1 define 2 2 2 2Jℓ (˜ω1) ω˜1(Jℓ+j (˜ω1)+ Jℓ (˜ω1)) 2(ℓ + j)Jℓ+j (˜ω1)Jℓ(˜ω1) µℓ,0 = + − , µℓ,j = j +− − (j = 1) aℓ aℓ aℓ aℓ ± and 2 Jℓ+j(˜ω1) Jℓ+2j (˜ω1)Jℓ(˜ω1) µℓ,2j = ij(l + j)˜ω1 − + − (j = 1). aℓ aℓ ± Here iω˜ ′ iω˜ ′ a+ = 1 (J (˜ω ) iJ (˜ω )) + J (˜ω ), a− = 1 (J (˜ω )+ iJ (˜ω )) J (˜ω ). ℓ 2 ℓ 1 − ℓ 1 ℓ 1 ℓ 2 ℓ 1 ℓ 1 − ℓ 1 Lemma 3.1. For each integer l satisfying l M , the number U has the ex- | | ≤ ω˜1 ℓ pansion for large ω˜

N(r0) 2 e −i(l+k)θn Uℓ = bn,kµℓ,ke . (3.9) n=1 − X kX= 2 e Proof. By the Taylor expansion on r (0, ω˜−1], we have ∈ 2 A˜n(˜ω, r)= A˜n(˜ω, r0 + rdθ)= A˜n(˜ω, r0)+ r rA˜n(˜ω, r0) dθ + (r ), ∇ 2 · O dn dθ r T 2 3 φn(r)= φn(r0 + rdθ)= φn(r0)+ r · + dθ φn(r0)dθ + (r ). c(r0) 2 ∇ O By the definition ofu ˜ and using the above expansions, we deduce that

N(r0) u˜(˜ω, r + rd ) = B˜ (˜ω, r )+ r rB˜ (˜ω, r ) d 0 θ n 0 ∇ n 0 · θ n=1 X2 ωr˜ d d r T 2 i r n· θ −2 + iω˜ B˜ (˜ω, r )d φ (r )d e c( 0) + (˜ω ). 2 n 0 θ ∇ n 0 θ O Then we have 

N(r0) + 1 U (θ)= B˜ (˜ω, r )(1 + d d )+ r rB˜ (˜ω, r ) d (1 + d d + ) ω˜ n 0 n · θ 1∇ n 0 · θ n · θ iω˜ n=1 1 X  iωr˜ 1 d d +r B˜ (˜ω, r )dT 2φ (r )d [ (1 + d d )+ c(r )] eiω˜1 n· θ + (˜ω−2) 1 n 0 θ ∇ n 0 θ 2 n · θ 0 O  and

N(r0) − 1 U (θ)= B˜ (˜ω, r )(1 d d )+ r rB˜ (˜ω, r ) d (1 d d ) ω˜ n 0 − n · θ 1∇ n 0 · θ − n · θ − iω˜ n=1 1 X  iωr˜ 1 d d +r B˜ (˜ω, r )dT 2φ (r )d [ (1 d d ) c(r )] eiω˜1 n· θ + (˜ω−2). 1 n 0 θ ∇ n 0 θ 2 − n · θ − 0 O  iθ −iθ Substituting dθ = e a−1 + e a1 into the above two equalities and using the 2-D Jacobi-Anger expansion ∞ iω˜1dn·dθ ℓ −iℓθn+iℓθ e = i Jℓ(˜ω1)e , −∞ ℓ=X 10 we can directly verify that the coefficients of two Fourier transformation are

N(r0) 1 ′ [ U +(θ)] = (˜ω−2)+ b (J (˜ω ) iJ (˜ω ))e−iℓθn iℓ F ω˜ ℓ O n,0 ℓ 1 − ℓ 1 n=1  1 X ′ + b [(1 + )J (˜ω ) iJ (˜ω )]e−i(ℓ+j)θn n,j iω˜ ℓ+j 1 − ℓ+j 1 j=−1,1 1 X iω˜ ω˜ ′ +2r c(r )B˜ (˜ω, r )aT 2φ (r )a [( 1 + 1)J (˜ω )+ 1 J (˜ω )]e−iℓθn 1 0 n 0 −1∇ n 0 1 2 ℓ 1 2 ℓ 1 iω˜ ω˜ ′ + b [( 1 + 1)J (˜ω )+ 1 J (˜ω )]e−i(ℓ+2j)θn n,2j 2 ℓ+2j 1 2 ℓ+2j 1 j=−1,1 X  and

N(r0) 1 ′ [ U −(θ)] = (˜ω−2)+ b (J (˜ω )+ iJ (˜ω ))e−iℓθn iℓ F ω˜ ℓ O n,0 ℓ 1 ℓ 1 n=1  1 X ′ + b [(1 )J (˜ω )+ iJ (˜ω )]e−i(ℓ+j)θn n,j − iω˜ ℓ+j 1 ℓ+j 1 j=−1,1 1 X iω˜ ω˜ ′ +2r c(r )B˜ (˜ω, r )aT 2φ (r )a [( 1 1)J (˜ω ) 1 J (˜ω )]e−iℓθn 1 0 n 0 −1∇ n 0 1 2 − ℓ 1 − 2 ℓ 1 iω˜ ω˜ ′ + b [( 1 1)J (˜ω ) 1 J (˜ω )]e−i(ℓ+2j)θn . n,2j 2 − ℓ+2j 1 − 2 ℓ+2j 1 j=−1,1 X 

Then, by the definition of Uℓ, we obtain

N(r0) e −iℓθn −i(ℓ+j)θn Uℓ = bn,0µ0,ℓe + bn,−jµj,ℓe n=1 j=−1,1 X  X e −i(l+2j)θn −2 + b − µ e + (˜ω ), (3.10) n, 2j 2j,ℓ O j=−1,1 X  where ′ ′ 2 Jℓ(˜ω1) iJℓ(˜ω1) Jℓ(˜ω1)+ iJℓ(˜ω1) 2Jℓ (˜ω1) µℓ,0 = −′ ′ = , iω˜1 (J (˜ω ) iJ (˜ω )) + J (˜ω ) − iω˜1 (J (˜ω )+ iJ (˜ω )) J (˜ω ) a+a− 2 ℓ 1 − ℓ 1 ℓ 1 2 ℓ 1 ℓ 1 − ℓ 1 ℓ ℓ

1 ′ 1 ′ (1 + )Jℓ+j (˜ω1) iJ (˜ω1) (1 )Jℓ+j (˜ω1)+ iJ (˜ω1) iω˜1 ℓ+j iω˜1 ℓ+j µℓ,j = ′ − − ′ iω˜1 iω˜1 2 (Jℓ(˜ω1) iJℓ(˜ω1)) + Jℓ(˜ω1) − 2 (Jℓ(˜ω1)+ iJℓ(˜ω1)) Jℓ(˜ω1) − ′ ′ − Jℓ+j(˜ω1)Jℓ(˜ω1) ω˜1Jℓ+j (˜ω1)Jℓ(˜ω1)+˜ω1Jℓ+j(˜ω1)Jℓ(˜ω1) = − − + − aℓ aℓ 2 2 ω˜1(Jℓ+j (˜ω1)+ Jℓ (˜ω1)) 2(ℓ + j)Jℓ+j (˜ω1)Jℓ(˜ω1) = j +− − , aℓ aℓ

′ ′ iω˜1 iω˜1 ( 2 + 1)Jℓ+2j (˜ω1)+˜ω1Jℓ+2j (˜ω1) ( 2 1)Jℓ+2j (˜ω1) ω˜1Jℓ+2j (˜ω1) µℓ,2j = ′ − ′ − iω˜1 iω˜1 2 (Jℓ(˜ω1) iJℓ(˜ω1)) + Jℓ(˜ω1) − 2 (Jℓ(˜ω1)+ iJℓ(˜ω1)) Jℓ(˜ω1) 2 ′ − ′ − iω˜1 2 (Jℓ+2j (˜ω1)Jℓ(˜ω1) Jℓ+2j (˜ω1)Jℓ(˜ω1)) = + −− aℓ aℓ 11

2 Jℓ+j (˜ω1) Jℓ+2j (˜ω1)Jℓ(˜ω1) = ij(l + j)˜ω1 − + − . aℓ aℓ The equality (3.10) is just the desired expansion (3.9). 

Remark 3.1. When the Fourier transformer is applied to only one of the two + − impedance quantities Uω˜ (θ) and Uω˜ (θ), we obtain complicated nonlinear models containing the blue terms as in the NMLA method. In order to remove the blue terms, we define new sampling quantities U˜l, which can simplify the fitted model.

We need to determine the 6N(r ) unknowns θ and b in (3.9) ( j 2; n = 0 n n,j | | ≤ 1, ,N(r )). Thus at least 6N(r ) equations are needed therein, which implies ··· 0 0 that M 3N(r ). Therefore the best choice would beω ˜ = M = 3N(r ), ω˜1 ≥ 0 1 ω˜1 0 which means that the sampling radius r1 can be chosen as r1 =3N(r0)c(r0)/ω˜. Let ϑ denote the column vector composed of θ and b ( j 2; n =1, ,N(r )). n n,j | |≤ ··· 0 Define the function

N(r0) 2 −i(ℓ+k)θn Gℓ(ϑ)= µℓ,kbn,ke . n=1 − X kX= 2 Then, from (3.9) we have U = G (ϑ)+ (˜ω−2). (3.11) ℓ ℓ O Although the number U can be computed, the vector ϑ is unknown. ℓ e By introducing 6N(r ) parameters θ¯ and χ , which corresponds to the 0 { n} { n,j } parameters θ and b ,e let λ denote the vector composed of θ¯ and χ ( j n n,j { n} { n,j } | |≤ 2; n =1, ,N(r )), and define ··· 0 N(r0) 2 −i(ℓ+k)θ¯n Gℓ(λ)= µℓ,kχn,ke . n=1 − X kX= 2

Define the functional (Mω˜1 =3N(r0))

Mω˜1 J(λ)= U G (λ) 2. (3.12) | ℓ − ℓ | ℓ=−M Xω˜1 e We need to minimize the functional J(λ) to determine the unknown λ:

min J(λ). (3.13) λ We solve the minimization problem (3.13) by the damped least-squares (DLS) ∗ ˜∗ algorithm [29]. Let θn and Bn(˜ω, r0) be the low-accuracy ray angle and the ray amplitudes computed by NMLA. Then we use the preliminary values as starting values θ¯0 = θ∗ , χ0 = B˜∗(˜ω, r ), χ0 =0, j = 2, 1, 1, 2. (3.14) n n n,0 n 0 n,j − − (n =1, ,N(r )) ··· 0 12

Usually a few iterations gives a dramatic improvement to the accuracy of θ∗ . { n} Let θpost denote the ray angles generated by this post-processing method. We { n } describe the final result as follows.

Theorem 3.1. Given the analytical solution u(˜ω, r) (˜ω = √ω) of the low frequency problem (3.1), the post-processing process (3.13) can improve the approximation error of the ray directions to be (ω−1), namely, O θpost θ Cω˜−2 = Cω−1 (n =1, ,N(r )) (3.15) | n − n|≤ ··· 0 for a sufficiently large ω, where the constant C depends only on θ (and N(r )). { n} 0 Proof. Let θ and θpost denote the N-dimensional column vector composed of θ , ,θ 1 ··· N and θpost, ,θpost, respectively. Namely, 1 ··· N post θ1 θ1 . post . θ =  .  and θ =  .  . post  θN   θ     N      Let ϑ− denote the (5N)-dimensional column vector composed of b ( j 2; n = n,j | |≤ 1, ,N(r )). Define the (6N)-dimensional column vector ··· 0 post post θ λ− = − . ϑ ! Norice that J is a real-valued function, and θ and θpost are real vectors. Using the Taylor formula yields 1 J(ϑ) J(λpost)= J(λpost) (θ θpost)+ H (ξ)(θ θpost) (θ θpost), − − ∇θ − · − 2 θ − · − post where ξ is a mediate value between ϑ and λ− , and Hθ(ξ) denotes the Hesse matrix of J(λ) with the variable θ at the point ξ. Since J(λpost) = 0, the above equality ∇θ − becomes 1 J(ϑ) J(λpost)= (θ θpost)tH (ξ)(θ θpost). − − 2 − θ − It follows by (3.11)-(3.12) that J(ϑ) = (˜ω−4). Then, noticing J(λpost) 0, the O − ≥ above equality leads to

(θ θpost)tH (ξ)(θ θpost) Cω˜−4. (3.16) − θ − ≤ It suffices to prove that

(θ θpost)tH (ξ)(θ θpost) c θ θpost 2. (3.17) − θ − ≥ k − k Let λpost, which is a (6N)-dimensional column vector, denote a solution of the minimization problem (3.13). We first prove that λ satisfies

ϑ λpost (˜ω−1/2). (3.18) k − k2 ≤ O 13

Let λk be the approximation generated by the k-th iteration of the DLS method for (3.13). By (3.7) and (3.14), the initial value λ0 satisfies

ϑ λ0 (˜ω−1/2). k − k2 ≤ O The DLS method ensures that (see [29])

ϑ λk Cρk ϑ λ0 Cρkω˜−1/2 k − k2 ≤ k − k2 ≤ with 0 ρ 1. Hence we get ≤ ≤ k −1/2 ϑ lim λ 2 Cω˜ , k − k→∞ k ≤ which implies (3.18). It follows by (3.18) that

ϑ ξ = (˜ω−1). k − k2 O Using this, together with J(ϑ)= (˜ω−4) and r = (˜ω−1), we can verify that (for O 1 O a sufficiently largeω ˜)

3N ∂2J = ℓ2µ2 (b b e−iℓ(θn−θk) + b b eiℓ(θn−θk))+ (˜ω−1). ∂θ ∂θ |ξ ℓ,0 n,0 k,0 n,0 k,0 O n k − ℓ=X3N

(ℓ) −iℓθn Define an = bn,0e . The above formula can be written as

2 3N ∂ J 2 2 (ℓ) (ℓ) (ℓ) (ℓ) −1 = ℓ µ (a a + an a )+ (˜ω ). ∂θ ∂θ |ξ ℓ,0 n k k O n k − ℓ=X3N For convenience, we set ε = θ θpost and ε = θ θpost. Then n n − n − 3N N N t 2 2 (ℓ) 2 (ℓ) 2 −1 2 ε H (ξ)ε = ℓ µ a ε + an ε + (˜ω ) ε . θ ℓ,0 | n n| | n| O k k ℓ=−3N n=1 n=1 X X X  2 Notice that µℓ,0 has a positive lower bound independent ofω ˜, the above equality gives N N εtH (ξ)ε c a(ℓ)ε 2 + (˜ω−1) ε 2. (3.19) θ ≥ | n n| O k k n=1 Xℓ=1 X N −iℓθ1 −iℓθN t Define the vectors αℓ = (e e ) and the matrix A = αℓαℓ. In ··· ℓ=1 addition, let Λ denote the diagonal matrix with the diagonal entries Pbn,0 . It is { } easy to check that

N N N a(ℓ)ε 2 = α (Λε) 2 = (Λε)tA(Λε). | n n| | ℓ | n=1 Xℓ=1 X Xℓ=1 14

Notice that the direction angles θ are different each other. Then the vectors { n} α , , α are linearly independent, and so the matrix A is Hermitian positive 1 ··· N definite. Moreover, the minimal eigenvalue of A is independent ofω ˜. Thus

N N a(n)ε 2 c Λε 2 c ε 2. | ℓ n| ≥ k k ≥ k k n=1 Xℓ=1 X Here we have used the fact that b has a lower bound independent ofω ˜. Then {| n,0|} the constant c depends on θ only. Substituting the above inequality into (3.19) { n} yields (3.17), which, combing (3.16), gives the desired result. 

If we replace u(˜ω, r) by an approximate solution, we can design the corresponding numerical method.

3.2. Numerical method. For a fixed large wave number ω, set ω = √ω. Using the given function ξ and g in problem (1.1), we consider the following Helmholtz equation with much lower frequency e

∆u + ω2ξ(r)u =0, in Ω, (3.20) ((∂n + iω ξ(r))u = g(ω, r), on ∂Ω, e p and use u(ω, r) to denote its analyticale solution.e Based on a good approximate solution of u(ω, r), we can compute high accuracy ray angles by the following five steps: e Step 1. Lete be a quasi-uniformly triangular partition of the domain Ω Th0 with the mesh size h satisfying ωh2 1. We apply the GOPWDG method to the 0 0 ≈ discretization of (3.20) on , and use u (ω, r) to denote the resulting approximate Th0 h0 solution. e e Step 2. On each element of h0 with the barycenter r0, we apply the NMLA T r Nh0 ( 0) method to uh0 (ω, r). We compute the number Nh0 (r0) of rays, ray angles θh0,n n=1 N (r ) { } and the low-accuracy amplitudes B h0 0 as in the first part of Subsection { h0,n}n=1 3.1. e Step 3. Let e be a uniformly refining triangular mesh of with the mesh Th Th0 size h˜ satisfying ωh 3N (r )c(r ). We apply the GOPWDG method to the ≈ h0 0 0 discretization of (3.20) on e, and use ue(ω, r) to denote the resulting approximate Th h solution. ee r r ∗ Nhe ( 0) ∗ Nhe ( 0) Step 4. Consider every element of e. Lete Ne(r ), θe and Be Th h 0 { h,n}n=1 { h,n}n=1 N (r ) N (r ) be the natural interpolation of N (r ), θ h0 0 and B h0 0 , re- h0 0 { h0,n}n=1 { h0,n}n=1 e spectively. We replace the function u(ω, r) in (3.8) by uh(ω, r) to get two new impedance quantities, and further sample the quantities to compute the numbers

Ue ℓ≤3Ne (r ). We use these numbers toe define the minimizatione problem (3.13), { h,ℓ} h 0 e 15

r post Nhe ( 0) and solve it by the DLS method to obtain high-accuracy ray angles θe , h,n n=1 ∗ ∗ { } where the initial guesses are chosen as θe and Be . h,n h,n e Step 5. Let h be a uniformly refining triangulation of h with the mesh size h T Nh(r0) T satisfying ωh 1. Let Nh(r0) and θh,n n=1 denote the natural interpolations ≈ r { } post Nhe ( 0) of Ne(r0) and θe on h, respectively. h { h,n }n=1 T e Suppose we have obtained exact ray numbers (Nh(r0)= N(r0)) on each element. We give the approximation property of the resulting ray angles in the following theorem.

Theorem 3.2. The resulting ray angles of the above process have the following approximation error

θpost θ = (ω−1), n =1, ,N(r ). (3.21) | h,n − n| O ··· 0 Proof. Notice that the GOPWDG approximate solutions of the low-frequency prob- post lem possess sufficient high accuracy. Applying (3.15) to every θe and using the h,n definitions given in the above Step 5, we obtain the approximate error of the resulting ray angles. 

3.3. Approximation property of the adaptive plane wave space. Define d = (cos θpost, sin θpost),n =1, ,N(r ). On the element K with the barycen- h,n h,n h,n ··· 0 0 tric points denoted by r0, our adaptive GOPW basis functions are chosen as

τ r ϕ (ω, r)= p h,n (r)eiωτh,n( ), n =1, ,N(r ), j =1, 2. (3.22) n,j j ··· 0

τh,n with τh,n(r) and pj (r) (j =1, 2) be the polynomials determined as in Subsection 2.2 by replacing the discrete plane wave direction dn with dh,n. Our adaptive GOPW space adapted to solve the high-frequency problem is defined as

V (K )= span ϕ (ω, r): n =1, ,N(r ); j =1, 2 . ray 0 n,j ··· 0 In order to investigate approximate properties of this space, we define

2(K )= v H2(K ): v satisfies (∆ + κI)=0on K . H 0 ∈ 0 0 Theorem 3.3. Let u 2(K ) be the analytic solution of (1.2). Assume that ∈ H 0 φ and A in the optics ansatz (2.5)-(2.6) of u satisfy φ C2(K ) and A n n,s n ∈ 0 n,s ∈ C1(K ). Then there exists an interpolation operator π : 2(K ) V (K ) such 0 h H 0 → ray 0 that −1 2 u π u 2 C(ω + h + ωh ), (3.23) k − h kL (K0) ≤ where the constant C depends only on the upper bound of φ 2 and A 1 . k nkH (K0) k n,skH (K0) In particular, when choosing h as h ω−1, we have ∼ −1 u π u 2 C(ω )= Ch. k − h kL (K0) ≤ 16

Proof. Since the basis functions in Vray(K0) are independent for different wave directions, we can only consider the case that u has only one wave direction on K0, i.e., n = 1. For ease of notation, we simply write (see Subsection 2.1) ∞ r u(r)= A(r)eiωφ( ), A(r)= (iω)−sA (r) r K , (3.24) s ∈ 0 s=0 X t Let θ be the exact direction angle defined by φ and set dθ = (cosθ sin θ) , which satisfies φ(r )= c−1(r )d since φ 2 = ξ = c−2. Then, by the Taylor formula, ∇ 0 0 θ |∇ | the phase function φ can be written as φ(r)= φ(r )+ P θ(r)+ O( r r 2), r K , 0 1 | − 0| ∈ 0 where P θ(r) is a linear polynomial of x x and y y and it can be written as 1 − 0 − 0 P θ(r)= c−1(r )d (r r )= c−1(r )(cosθ(x x ) + sin θ(y y )). 1 0 θ · − 0 0 − 0 − 0 Let θh be the approximation direction angle defined in the last subsection, which satisfies θ θ = O(ω−1). (3.25) | h − | By the definitions of τ (see Subsection 2.2), we have τ (r)= P θh (r) (r K ) with h h 1 ∈ 0 P θh (r)= c−1(r )d (r r )= c−1(r )(cosθ (x x ) + sin θ (y y )). 1 0 θh · − 0 0 h − 0 h − 0 Moreover, from the definition of the polynomials pτh 2 (see Subsection 2.2), we { j }j=1 have pτh (r)=1+ d⊥ (r r ) and pτh (r)=1 d⊥ (r r ). 1 θh · − 0 2 − θh · − 0

Let γK0 (A0) denote the integration average of A0 on K0, and define x1 = x2 = 1 2 γK0 (A0). Then τh τh x1p1 (r)+ x2p2 (r)= γK0 (A0). Thus A (r) x pτh,n (r)+ x pτh,n (r) = A (r) γ (A ) , r K , | 0 − 1 1 2 2 | | 0 − K0 0 | ∈ 0 which implies that 2 r r τ A eiωφ( 0) eiωφ( 0) x p h,n = A (r) γ (A ) , on K . (3.26) | 0 − j j | | 0 − K0 0 | 0 j=1 X Define 2 iωφ(r0) τh iωτh,n(r) πhu(r)= e xj pj (r)e . j=1 X Notice that θ 2 iωφ(r0) iωP +O(ωh ) −1 u(r)= A0e e 1 + O(ω ). Then 2 θ 2 iωφ(r ) iωφ(r ) τh iωP +O(ωh ) u(r) π u(r) = A e 0 e 0 x p e 1 − h 0 − j j j=1 X  17

2 θ 2 iωφ(r ) τh iωP +O(ωh ) iωτ (r) −1 + e 0 x p e 1 e h + O(ω ). j j − j=1 X  Therefore, by (3.26) we have

u(r) π u(r) C A (r) γ (A ) + γ (A ) τ (r) P θ(r) +O(ω−1). (3.27) | − h |≤ | 0 − K0 0 | | K0 0 || h − 1 | It follows by (3.25) that 

θ −1 2 τ (r) P (r) C φ 2 (ω h)+ O(h ), r K . | h − 1 |≤ k kH (K0) ∈ 0 Substituting this into (3.27), we obtain

2 −1 u π u 2 C A 1 + φ 2 (h + ωh )+ O(ω ), k − h kL (K0) ≤ k 0kH (K0) k kH (K0) which gives the desired result.  

−1 Remark 3.2. Under the assumption that h ω and the upper bound of φ 2 ∼ k nkH (K0) and A 1 is independent of ω, the adaptive plane wave space V (K ) pos- k n,skH (K0) ray 0 sesses 1 order convergence with respect to h or ω−1 and has much better conver- − gence than existing discrete spaces for Helmholtz equations with large wave numbers.

3.4. A discretization method of (1.1). The adaptive plane wave space Vray(K0) was designed for homogeneous Helmholtz equations on the element K0. In order to use this space to the discretization of the nonhomogeneous Helmholtz equation (1.1), we need to adopt the plane wave method combined with local spectral el- ements (PW-LSFE) first presented in [24], which was extended to the case with variable wave numbers in [21]. To shorten the length of this paper, here we only describe the basic idea of the method (more details can be found in [21], where only a different plane wave space was used). Assume that f is defined in a slightly large domain containing Ω as its subdomain and the domain Ω is strictly star-shaped. As usual, let Ω be decomposed into the union of some elements Ω N , which constitute quasi-uniform and and shape- { k}k=1 regular triangulations h with mesh sizes h. For each element Ωk, we choose a disc ∗ T domain Ωk that has almost the same size of Ωk and contains Ωk as its subdomain. (1) 1 ∗ Let uk H (Ωk) be the solution of the restriction of the nonhomogeneous ∈ ∗ Helmholtz equation (1.1) on Ωk, with homogeneous Robin boundary condition on ∗ (1) 2 (1) (1) (2) (1) ∂Ωk. Define u L (Ω) as u Ωk = uk Ωk for each Ωk. Set u = u u , (2) ∈ | | − then u satisfies a homogeneous Helmholtz equation on every element Ωk. Notice that u(2) satisfies two transmission conditions depending on u(1) on the common edge of two neighboring elements. ∗ Let m be a positive integer, and let Sm(Ωk) denote the set of polynomials defined on Ω∗, whose orders are less or equal to m. We use u(1) S (Ω∗) to denote k k,h ∈ m k the standard spectral element solution of the nonhomogeneous Helmholtz equation satisfied by u(1), and define u(1) N S (Ω ) by u(1) = u(1) . k h ∈ k=1 m k h |Ωk k,h|Ωk Q 18

We use V ( ) to denote the adaptive plane wave space spanned by the local ray Th basis functions ϕ (ω, r). Namely, the space V ( ) is defined as n,j ray Th V ( )= v L2(Ω) : v V (K), K . ray Th { h ∈ h|K ∈ ray ∀ ∈ Th} Let u(2) V ( ) be the approximation of u(2), where u(2) are defined by the h ∈ ray Th h discontinuous with V ( ) for the local homogeneous Helmholtz ray Th equation satisfied by u(2). The final approximate solution u L2(Ω) is defined by u = u(1) + h ∈ h|Ωk h |Ωk u(2) . For convenience, we call this method as ray-GOPWDG-LSFE method. In h |Ωk most situations, the number N(r0) of the wave directions is small, so the space V ( ) has much smaller degrees of freedom than the standard plane wave space ray Th V ( ), where p must increase when ω increases. p Th

4. Numerical experience

In this section we apply the ray-GOPWDG-LSFE method to solve the nonho- mogeneous Helmholtz equations with variable wave numbers ∆u ω2ξ2u = f in Ω, − − ∂ (4.1) ( + iωξ)u = g on ∂Ω,  ∂n and we report some numerical results to confirm the effectiveness of the proposed methods. Let Ω be divided into small rectangles. Each rectangle has the same mesh size h, where h is the length of the longest edge of the elements. The resulting uniform triangulation is denoted by . We fix the number of elements per wavelength for Th the experiments made in this subsection, i.e., we choose h = ω−1. Moreover, we only consider two examples where the ray number is a constant among the whole computed area, then the number of basis functions on every element is fixed. We introduce the relative L2 error

uex uh 2 Err. = k − kL (Ω) , u 2 k exkL (Ω) where uex is the analytic solution and uh is the numerical solution. Define δ by log(Err /Err ) δ = 2 1 , log(ω2/ω1) which can measure the “pollution effect” of a numerical method. ˆ ˆF ˆG Let θ(dex), θ(dh ) and θ(dωe ) denote the exact ray angles, the numerical ray angles computed in ray-FEM method and the numerical ray angles computed by the post-processing method in ray-GOPWDG-LSFE method, respectively. Denote F G by u the numerical solution solved by the ray-FEM method. Let u and udˆ h dˆωe ex denote the numerical solution solved by the ray-GOPWDG-LSFE method used 19

ˆG ˆ by the direction dωe and dex, respectively. Let “DOFs” denotes the computing complexity of the considered numerical methods. We compare the performances of the ray-GOPWDG-LSFE method and the ray- FEM method for the high-frequency numbers ω = 400, 625, 900.

4.1. Example 1 (Single wave in a heterogeneous medium). We consider an example in a heterogeneous medium in the domain Ω = [0, 1] [0, 1] (see [14]): 1 × Define ξ(r) = c(r)2 with the velocity field c(r) as a smooth converging lens with a Gaussian profile at the center (x0,y0)=(1/2, 1/2)

4 1 c(x, y)= 1 exp 32 (x r )2 + (y r )2 . 3 − 8 − − 1 − 2     The analytic solution of the problem is given by

iωxy uex(x, y)= c(x, y)e

2 Then the source term is fex = ∆u ω ξ(r)u and the boundary function is chosen ∂ − − as gex = ( ∂n + iω)uex. Following the process Step 1-Step 2 in Subsection 3.2, we first solve the corre- sponding low frequency-problem ω = 20, 25, 30 on a coarsen mesh h, respectively. The NMLA sampling results shows that there is only one ray locally at each ele- e e

2

1.8 sampling the numerical solution sampling the analytical solution 1.6

1.4

1.2 | 0 α 1 |BU

0.8

0.6

0.4

0.2

0 -1 0 1 2 3 4 5 6 7 θ

Figure 1. NMLA sampling at the location (19/20, 3/20) ment (see Figure 1). We then use the post-processing method locally to calculate the ray directions in each element. The maximum iteration steps cost by the DLS method are reported in Table 1. 20

Table 1. Maximum iteration steps of the DLS method in the post-processing method

ω 400 625 900 iter(s) 33 34 31

∞ In Table 2, we list L errors θ(dˆ e) θ(dˆ ) ∞ of the ray angles. k ω − ex k

Table 2. Complexity and ray angle approximation errors of the ray-GOPWDG-LSFE method and ray-FEM method

G F ω Comp. θ(dˆ e ) θ(dˆ ) ∞ Order Comp. θ(dˆ ) θ(dˆ ) ∞ Order k ω − ex k k h − ex k 400 9.7e+5 4.321e-3 1.3e+8 5.242e-3 − − 625 2.4e+6 2.635e-3 1.11 4.4e+8 3.435e-3 0.95 900 4.9e+6 1.839e-3 0.98 1.2e+9 2.384e-3 1.00

The relative L2 errors of the approximated solutions and the total DOFs needed in the ray-GOPWDG-LSFE method are reported in the Table 3.

Table 3. DOFs. and Approximation errors of the ray- GOPWDG-LSFE method and ray-FEM method

G F ω DOFs udˆ u 0,Ω Order DOFs uh u 0,Ω Order k ωe − k k − k 400 6.6e+4 5.817e-4 1.3e+7 7.113e-4 − − 625 1.6e+5 3.592e-4 1.08 4.1e+7 4.615e-4 0.96 900 3.4e+5 1.671e-4 1.04 6.7e+7 3.214e-4 0.99

It shows that for the single wave solution, the approximation error of the nu- merical solutions of the both methods can have an optimal convergence of (ω−1). O However, the total DOFs of the ray-GOPWDG-LSFE method is (ω2), which is O also optimal in solving the two-dimensional Helmholtz equation and much less than the total DOFs needed by the ray-FEM method.

4.2. Example 2. (Constant gradient of slowness squared ξ). We provide an example in a heterogeneous medium with wave speed of constant gradient (see [14]): ξ(r) = c2 +2G (r r ) with parameters c = 1, G = (0.1, 0.2) and 0 0 · − 0 0 0 − r = ( 0.1, 0.1). Referring to [14], there are two rays crossing in the domain 0 − − Ω = [0, 1] [0, 1]. The two phase functions are known analytically and they are × given by G 2 φ =¯cσ | 0| σ3, j =1, 2, (4.2) j j − 6 j 21 where j 2 2 2 2(¯c + ( 1) c¯ G0 r r0 ) σ = − − | | | − | , j =1, 2, (4.3) j q G 2 p| 0| with c¯ = c + G (r r ). (4.4) 0 0 · − 0 Then the analytic solution is given by

2 2 uex = exp(iωφ1)/(xy +1i)+ exp(iωφ2)/((x + y +1i)). (4.5)

2 The source term is fex = ∆u ω ξ(r)u and the boundary function is chosen as ∂ − − gex = ( ∂n + iω)uex. Following the process Step 1-Step 2 in Subsection 3.2, we first solve the corre- sponding low frequency-problem ω = 20, 25, 30 on a coarsen mesh h, respectively. It shows that we can learn nearly-accurate ray directions based on a numerical e e

1.5

sampling the numerical solution sampling the analytical solution

1 | 0 α |BU

0.5

0 -1 0 1 2 3 4 5 6 7 θ

Figure 2. NMLA sampling at the location (19/20, 3/20) solution generated by the GOPWDG-LSFE method on the mesh h = (ω−1) (see O Figure 2). We then use the post-processing method locally to calculate thee ray directionse in each element. The maximum iteration steps needed in the DLS method are listed in Table 4.

Table 4. Maximum iteration steps of the DLS method in the post-processing method

ω 400 625 900 iter(s) 36 35 33

The L∞ errors of the ray directions are reported in Table 5. 22

Table 5. Complexity and ray angle approximation errors of the ray-GOPWDG-LSFE method and ray-FEM method

G F ω Comp. θ(dˆ e ) θ(dˆ ) ∞ Order Comp. θ(dˆ ) θ(dˆ ) ∞ Order k ω − ex k k h − ex k 400 1.3e+6 8.433e-3 1.9e+8 1.205e-1 − − 625 3.1e+6 5.133e-3 1.11 6.3e+8 9.238e-2 0.60 900 6.5e+6 3.482e-3 1.06 1.7e+9 7.662e-2 0.51

The relative L2 errors of the approximated solutions and the total DOFs needed of the ray-GOPWDG-LSFE method are shown in the Table 6.

Table 6. Dofs. and approximation errors of the ray-GOPWDG- LSFE method and ray-FEM method

G F ω DOFs udˆ u 0,Ω Order DOFs uh u 0,Ω Order k ωe − k k − k 400 1.3e+6 3.934e-4 1.9e+7 3.391e-3 − − 625 3.1e+6 2.327e-4 1.176 6.3e+7 2.516e-3 0.67 900 6.5e+6 1.562e-4 1.094 1.7e+7 2.049e-3 0.56

It shows that our ray-GOPWDG-LSFE method are more efficient than the ray- FEM method for high-frequency Helmholtz problem and the relative L2 errors have the optimal convergence of (ω−1). The total DOFs of the ray-GOPWDG-LSFE O method is (ω2), which is also optimal in solving the two-dimensional Helmholtz O equation.

5. Conclusion

In this paper we have introduced an adaptive ray-based GOPW method for the high-frequency Helmholtz equation in smooth media. We have developed different ray-learning method for the single wave as well as the multiple wave. We have derived an interpolation error of the ray-GOPW spaces. The numerical results shows that the ray GOPW method can achieve asymptotic convergence rate of (ω−1) for multiple waves. The computing complexity can be also optimal as O (ω2) in two dimensions. O References

[1] J. D. Benamou, F. Collino, and S. Marmorat. Numerical microlocal analysis revisited. (2011). [2] J. D. Benamou, F. Collino and O. Runborg, Numerical microlocal analysis of harmonic wavefields. Journal of Computational Physics, 2004, 199(2), pp.717-741. [3] T. Betcke and J. Phillips, Approximation by dominant wave directions in plane wave methods, Technical report (2012), University College London. [4] D. Bouche, F. Molinet and R. Mittra, Asymptotic Methods in Electromagnetics, Springer- Verlag Berlin Heidelberg, 1997 23

[5] D. L. Brown, D. Gallist and D. Peterseim, Multiscale petrov-Galerkin method for high- frequency heterogeneous helmholtz equations, In Meshfree methods for PDEs VII. Springer Lecture Notes in Computational Science and Engineering, 2016 [6] A. Buffa, and P. Monk. Error estimates for the ultra weak variational formulation of the Helmholtz equation. ESAIM: Mathematical Modelling and 42.6 (2008): 925-940. [7] O. Cessenat, and B. Despres. Application of an ultra weak variational formulation of elliptic PDEs to the two-dimensional Helmholtz problem. SIAM journal on numerical analysis 35.1 (1998): 255-299. [8] H. Chen, P. Lu and X. Xu, A hybridizable discontinuous Galerkin method for the Helmholtz equation with high wave number, SIAM J. Numer. Anal. , 51(2013),2166-2188 [9] Y. Du and H. Wu, Preasymptotic error analysis of higher order FEM and CIP-FEM for Helmholtz equation with high wave number. SIAM J. Numer. Anal., 53(2015), No. 2, pp. 782-804 [10] J. Fang. Ray-based for High-frequency Helmholtz Equations. Diss. UC Irvine, 2017. [11] J. Fang, J. Qian, L. Zepeda-N´un˜ez and H. Zhao, Learning dominant wave directions for plane wave methods for high-frequency Helmholtz equations, Fang et al. Res Math Sci (2017) 4:9 [12] C. Farhat, I. Harari, and U. Hetmaniuk, A discontinuous Galerkin method with Lagrange multipliers for the solution of Helmholtz problems in the mid-frequency regime, Comput. Methods Appl. Mech. Engrg., 192 (2003), 1389-1419. [13] X. Feng and H. Wu, hp-discontinuous Galerkin methods for the Helmholtz equation with large wave number. Math. Comp., 80 (2011), 1997-2024. [14] S. Fomel, S. Luo and H. Zhao. 2009. Fast sweeping method for the factored eikonal equation. Journal of Computational Physics, 228(2009), pp.6440-6455. [15] G. Gabard. Discontinuous Galerkin methods with plane waves for time-harmonic problems. Journal of Computational Physics, 225(2007): 1961-1984. [16] E. Giladi and J. B. Keller, A Hybrid Numerical Asymptotic Method for Scattering Problems, J. Comp. Phys., 174(2001) 226–247. [17] C. J. Gittelson, R. Hiptmair, and I. Perugia. Plane wave discontinuous Galerkin meth- ods: analysis of the h-version. ESAIM: Mathematical Modelling and Numerical Analysis, 43 (2009): 297-331. [18] R. Hiptmair, A. Moiola, and I. Perugia. Plane wave discontinuous Galerkin methods for the 2D Helmholtz equation: analysis of the p-version. SIAM Journal on Numerical Analysis, 49(2011): 264-284. [19] R. Hiptmair, A. Moiola, I. Perugia. Error analysis of Trefftz-discontinuous Galerkin methods for the time-harmonic Maxwell equations[J]. Mathematics of Computation, 2012, 82(281):247- 268. [20] Q. Hu and R. Song, A novel least squares method for Helmholtz equations with large wave numbers, SIAM J. Numer. Anal., 58(2020), pp. 3091-3123 [21] Q. Hu and Z. Wang, A geometric optics ansatz-based plane wave method for two dimensional Helmholtz equations with variable wave numbers, see arXiv:2012.14250v2[math.NA] 5 Apr 2021 [22] Q. Hu and L. Yuan, A weighted variational formulation based on plane wave basis for dis- cretization of Helmholtz equations, Int. J. Numer. Anal. Model., 11 (2014), 587–607. [23] Q. Hu and L. Yuan, A plane wave least-squares method for time-harmonic Maxwell’s equa- tions in absorbing media, SIAM J. Sci. Comput., 36 (2014), A1911–A1936. 24

[24] Q. Hu and L. Yuan. A plane wave method combined with local spectral elements for nonho- mogeneous Helmholtz equation and time-harmonic Maxwell equations. Advances in Compu- tational Mathematics 44.1 (2018): 245-275. [25] T. Huttunen, M. Malinen and P. Monk, Solving Maxwell’s equations using the ultra weak variational formulation, J. Comput. Phys., 223 (2007), 731–758. [26] L. M. Imbert-Gerard and B. Despres. A generalized plane-wave numerical method for smooth nonconstant coefficients[J]. IMA Journal of Numerical Analysis, 2014, 34(3):1072-1103. [27] L. M. Imbert-G´erard. Interpolation properties of generalized plane waves. Numerische Math- ematik 131.4(2015):683-711. [28] L. M. Imbert-G´erard and P. Monk. Numerical simulation of wave propagation in inhomoge- neous media using generalized plane waves. ESAIM: Mathematical Modelling and Numerical Analysis 51.4 (2017): 1387-1406. [29] R. R. Meyer. Theoretical and computational aspects of nonlinear regression. Nonlinear pro- gramming. Academic Press, 1970. 465-486. [30] P. Monk and D. Wang, A least-squares method for the helmholtz equation, Comput. Methods Appl. Mech. Engrg., 175 (1999), 121–136. [31] J. M. Melenk and S. Sauter, Wavenumber explicit convergence analysis for Galerkin dis- cretizations of the Helmholtz equation, SIAM J. Numer. Anal., 49(2011), pp. 1210- 1243. [32] J. Peng, J. Wang and S. Shu, Adaptive BDDC algorithms for the system arising from plane wave discretization of Helmholtz equations, Int. J. Numer. Methods Eng. 116(2018): 683-707. [33] I. Perugia, P. Pietra, and A. Russo. A plane wave virtual element method for the Helmholtz problem. ESAIM: Mathematical Modelling and Numerical Analysis, 50(2016): 783-808. [34] D. Peterseim. Eliminating the pollution effect in Helmholtz problems by local subscale cor- rection. Mathematics of Computation, 86(2017): 1005-1036. [35] C. C. Stolk. A dispersion minimizing scheme for the 3-D Helmholtz equation based on ray theory. Journal of computational Physics 314 (2016): 618-646. [36] H. Wu. Pre-asymptotic error analysis of CIP-FEM and FEM for the Helmholtz equation with high wave number. Part I: linear version. IMA Journal of Numerical Analysis 34.3 (2013): 1266-1288. [37] L. Yuan, Q. Hu. Generalized plane wave discontinuous Galerkin methods for nonhomoge- neous Helmholtz equations with variable wave numbers[J]. International Journal of Computer Mathematics, 97(2020), 920-941. [38] L. Zhu, and H. Wu. Preasymptotic error analysis of CIP-FEM and FEM for Helmholtz equation with high wave number. Part II: hp version. SIAM Journal on Numerical Analysis 51.3 (2013): 1828-1852.