Efficient implementation of the Localized Orthogonal Decomposition ...

1 downloads 0 Views 342KB Size Report
Feb 4, 2016 - arXiv:1602.01658v1 [math.NA] 4 Feb 2016. 1. Efficient implementation of the Localized Orthogonal. Decomposition method. Christian Engwer ...
1

Efficient implementation of the Localized Orthogonal Decomposition method Christian Engwer, Patrick Henning, Axel M˚ alqvist, Daniel Peterseim

arXiv:1602.01658v1 [math.NA] 4 Feb 2016

February 5, 2016

Abstract In this paper we present algorithms for an efficient implementation of the Localized Orthogonal Decomposition method (LOD). The LOD is a multiscale method for the numerical simulation of partial differential equations with a continuum of inseparable scales. We show how the method can be implemented in a fairly standard Finite Element framework and discuss its realization for different types of problems, such as linear elliptic problems with rough coefficients and non-linear eigenvalue problems.

1

Introduction

By now, the Localized Orthogonal Decomposition (LOD) of a subspace V ⊂ H 1 (Ω) into a coarse space and a detail space (or fine space) is a well established method for the numerical homogenization of partial differential equations. So far it has been successfully applied to linear elliptic multiscale problems in the context of continuous finite elements [31, 22, 18], discontinuous finite elements [13, 12, 11], mixed finite elements [30, 17], partition of unity methods [21] and reduced basis simulations [2]. The range of applications covers linear and quadratic eigenvalue problems [32, 29], problems in perforated domains [3], semilinear elliptic problems [19], the wave equation [1, 34], parabolic problems [28], the Buckley-Leverett equation [14], the Helmholtz equation [33, 16] and the simulation of Bose-Einstein condensates [20]. Initially inspired by the Variational Multiscale Method [23, 24, 25, 26, 27, 30], the LOD in its present form was first proposed and rigorously justified in [31]. Further basic modifications of the method were suggested in [22]. The LOD is constructed to handle discrete problems that involve a high-dimensional solution space (also referred to as the ’fine space’). This typically takes place in two steps. In the first step the full fine space is decomposed into a low-dimensional space with high approximation properties and a high-dimensional remainder space. In the second step, this decomposition is localized in the sense that the low-dimensional space is approximated by constructing suitable locally supported basis functions that are the solutions of small patch problems. Due to their size, the patch problems are cheap to solve. Furthermore, they can be solved independently from each other and are hence perfect for parallelization. This strategy is particularly useful to reduce/distribute the computational cost of solving large systems of equations (arising from finite element discretizations). While previous works focused on the numerical analysis of the method, this paper aims at the detailed explanation of how the method can be algorithmically realized. We give detailed explanations on how the method works on an algebraic level.

2

2

Preliminaries

In this section we recall the Localized Orthogonal Decomposition (LOD) for finite element spaces. The decomposition is always with respect to a linear elliptic part of the differential operator.

2.1

Computational domain and boundary

For the rest of the paper, we consider a bounded polygonal domain Ω ⊂ Rd . The boundary ∂Ω is divided into two parts ΓD and ΓN . On ΓD we prescribe a Dirichlet boundary condition and on ΓN we prescribe a Neumann boundary condition. We have ΓD ∪ ΓN = ∂Ω and we assume ΓD 6= ∅. With that, we define the space HΓ1D (Ω) := {v ∈ H 1 (Ω)| v|ΓD = 0}, where v|ΓD = 0 is understood in the sense of traces.

2.2

Elliptic differential operator

Subsequently we consider the following differential operator. Let κ ∈ L∞ (Ω, Rd×d ) denote a matrix-valued, symmetric, possibly highly varying and heterogeneous coefficient with uniform spectral bounds γmin > 0 and γmax ≥ γmin , σ(κ(x)) ⊂ [γmin , γmax ]

for almost all x ∈ Ω.

This coefficient defines a scalar product A(·, ·) on HΓ1D (Ω) that is given by A (v, w) :=

2.3

Z



κ∇v · ∇w

for v, w ∈ HΓ1D (Ω).

Meshes and spaces

We wish to discretize a problem that is associated with A(·, ·). Then the discretization is constrained by the diffusion coefficient κ, in the sense that variations of κ must be resolved by the computational mesh. We call such a discretization a fine scale discretization. In addition to this, we have a second discretization on a coarse scale. The coarse mesh is arbitrary and no more related to A(·, ·). It contains elements of maximum diameter H > 0. The fine mesh consists of elements of maximum diameter h < H. Let TH , Th denote the corresponding simplicial or quadrilateral subdivisions of Ω into (closed) conforming shape regular S elements or conforming shape regular S simplicial ¯ K. We assume that Th is a regular, Kh = quadrilateral elements, i.e., Ω = Kh ∈Th

K∈TH

possibly non-uniform, mesh refinement of TH . Furthermore we also assume that TH and Th are shape-regular in the sense that there exists a positive constant c0 such that   diam(K)d diam(Kh )d , max ≤ c0 max max K∈TH Kh ∈Th |Kh | |K|

and regular in the sense that any two elements are either disjoint, share exactly one face, share exactly one edge, or share exactly one vertex. For T = TH , Th , let P1 (T ) = {v ∈ C 0 (Ω) | ∀K ∈ T , v|K is a polynomial of total degree ≤ 1} and

Q1 (T ) = {v ∈ C 0 (Ω) | ∀K ∈ T , v|K is a polynomial of partial degree ≤ 1}

3 denote the typical p1 degree and bi-p1 degree Finite Element Spaces for triangular and quadrilateral partitions respectively. We set Vh := P1 (Th ) if Th is a triangulation and Vh := Q1 (Th ) if Th is a quadrilateration. The ’coarse space’ (i.e. low dimensional space) VH ⊂ Vh is defined analogously. Furthermore, we set Vh,ΓD := Vh ∩ HΓ1D (Ω) and VH,ΓD := VH ∩ HΓ1D (Ω). For simplicity we assume that VH,ΓD is aligned with ΓD (in 2d this means that ΓD ∩ ΓN is a subset of coarse grid nodes). The full sets of fine nodes in Vh , respectively coarse nodes in VH , are given by NH = {Zi | 0 ≤ i ≤ NH − 1}

and

Nh = {zj | 0 ≤ j ≤ Nh − 1},

where NH and Nh denote the number of vertices in the fine and the coarse mesh. Accordingly we introduce NTH = |TH | and NTh = |Th | as the number of cells in the mesh. The coarse nodal basis function that is associated with a node Zi ∈ NH shall be denoted by Φi ∈ VH and the fine nodal basis function associated with zj ∈ Nh shall be denoted by φj ∈ Vh .

2.4

Two-scale decompositions

In order to introduce an A-orthogonal decomposition of the space Vh,ΓD , we require a projection IH : Vh,ΓD → VH,ΓD (i.e. (IH ◦IH ) = IH ) that maps a fine-scale function into the coarse fine element space VH,ΓD . The chosen projection will help us to characterize the “details” in Vh,ΓD and it is desirable that IH is L2 - and H 1 -stable. Before we introduce a decomposition based on IH , we state examples of possible choices for IH . Remark 2.1. Examples for projections IH that fulfill the desired stability properties on quasi-uniform meshes. • The operator IH : Vh,ΓD → VH,ΓD can be chosen as the global L2 -projection given by (IH (vh ), ΦH )L2 (Ω) = (vh , ΦH )L2 (Ω) for all ΦH ∈ VH,ΓD . • The operator IH : Vh,ΓD → VH,ΓD can be also constructed from a local L2 projection. Given a coarse-node Zi and corresponding nodal patch ωi := suppΦi , we let PH,ωi denote the L2 -projection onto the standard P1 finite element space PNH −1 on ωi . Exploiting this, we define IH for vh ∈ Vh,ΓD by IH (vh ) := i=0 αi (vh )Φi where αi (vh ) = 0 if Zi ∈ NH ∩ ΓD and αi (vh ) = PH,ωi (vh )(Zi ) in any other case. • A similar construction is obtained by projecting locally into the space of discontinuous finite elements. Given Zi ∈ NH with corresponding nodal patch ωi := suppΦi , we let P˜H,ωi denote the L2 -projection onto the space of functions on ωi that are affine on each coarse grid element (discontinuous P1 finite elements PNH −1 on ωi ). For vh R∈ Vh,ΓD , we can now define IH (vh ) := αi (vh )Φi where i=0 αi (vh ) = |ωi |−1 ωi P˜H,ωi (vh ) for all active nodes and αi (vh ) = 0 if Zi ∈ NH ∩ ΓD . • An example for a projection a IH : Vh,ΓD → VH,ΓD that is not suitable because it lacks the desired stability properties is the Lagrange interpolation.

There are also many other choices for IH , e.g., the orthogonal projection onto VH with respect to the H 1 inner product and quasi-interpolation operators of Cl´ement or Scott-Zhang type as they are well-established in the finite element community in the context of fast solvers and a posteriori error estimation [7, 9, 37, 8, 15]. As we see

4 next, in practice we only require the kernel of the projection IH . This simplifies the computations significantly. For instance, for typical choices of IH , there exist sets of functionals can be used to decide if a function is in the kernel of IH or not (cf. [25, Section 2.3]). Once we decided for suitable projection operator IH , we can define the detail space Wh := {vh ∈ Vh,ΓD | IH (vh ) = 0}. This detail space contains contains fine-scale functions in Vh,ΓD that cannot be expressed in the coarse space VH,ΓD . In terms of the LOD we wish to correct classical nodal basis functions by an appropriate “detail function” from the space Wh . This can be achieved in a natural way by introducing the following elliptic decomposition of Vh,ΓD . We refer to this decomposition as the A-orthogonal splitting of Vh,ΓD (cf. [31] for more details). Definition 2.2 (A-orthogonal decomposition). We define the A(·, ·)-orthogonal complement of Wh in Vh,ΓD by VLOD := {vh ∈ Vh,ΓD | A(vh , wh ) = 0 for all wh ∈ Wh }. This is well-defined since A(·, ·) is a scalar product on Wh . We obtain the (ideal) splitting Vh,ΓD = VLOD ⊕ Wh , where dim(VLOD ) = dim(VH,ΓD ). We wish to use an approximation of VLOD as a discrete solution space for Galerkin approximations. Observe that VLOD is low dimensional, but practically expensive to assemble. Therefore we introduce a localized decomposition.

2.5

Localization to patches

To localize the splitting Vh,ΓD = VLOD ⊕ Wh , we first need to localize the space Wh to patches U (K) ⊂ Ω. We therefore introduce coarse-layer patches: Definition 2.3 (Coarse-layer patch). For any positive k ∈ N and a coarse element K ∈ TH , we define patches Uk (K) that consist of K itself and k-surrounding layers of coarse elements, i.e. we define Uk (K) iteratively by U0 (K) := K, Uk (K) := ∪{T ∈ TH | T ∩ Uk−1 (K) 6= ∅}

k = 1, 2, . . . .

(1)

The restriction of Wh to a patch U (K) is defined by Wh (U (K)) := {vh ∈ Wh | vh = 0 in Ω \ U (K)}. The localized decomposition can be now characterized in the following way. Definition 2.4 (Localized Orthogonal Decomposition). For a given positive k ∈ N and for a coarse function ΦH ∈ VH,ΓD , the correction operator Qh : VH,ΓD → Vh,ΓD is given by X Qh (ΦH ) := QK h (ΦH ), K∈TH

5 where QK h (Φh ) ∈ Wh (Uk (K)) (for K ∈ TH ) is the solution of Z Z K κ∇ΦH · ∇wh for all wh ∈ Wh (Uk (K)). κ∇Qh (ΦH ) · ∇wh = −

(2)

K

Uk (K)

We denote Rh (ΦH ) := ΦH + Qh (ΦH ). We obtain the space {ΦH + Qh (ΦH )| ΦH ∈ VH,ΓD } as a localized approximation of VLOD . Observe that the new space is low dimension (i.e. it is of the same dimension as VH,ΓD ), it contains locally supported basis functions and it is cheap to assemble by solving the small problem (2) in parallel. As an example we might consider a linear elliptic problem. Example 2.5. Let f ∈ L2 (Ω) and let u ∈ HΓ1D (Ω) solve A (u, v) =

Z

for all v ∈ HΓ1D (Ω).

fv



Then the corresponding LOD approximation is given by uLOD = Rh (uH ), where uH ∈ VH,ΓD solves Z f Rh (ΦH ) for all ΦH ∈ VH,ΓD . A (Rh (uH ), Rh (ΦH )) = Ω

In the following sections we quantify the approximation properties of uLOD depending on the choice of the localization parameter k.

3

The algebraic realization of the correctors Qh

Before we start to give a first example, we need to discuss how the local problems (2) can be assembled and solved practically. In particular we show how to interpret the corrector Qh on an algebraic level.

3.1

Analytic preliminaries

We start by introducing a general terminology that we use subsequently in the context of localization. Every patch Uk (Kℓ ) with Kℓ ∈ TH and k ∈ N is in the following directly associated with the index ℓ (where 0 ≤ ℓ < NTH ). In particular, we consider the localization parameter k to be fixed and hence drop it when defining Uℓ := Uk (Kℓ ). For a given patch Uℓ we denote the sets of active coarse and fines nodes in Uℓ respectively by Nℓ,H = {Zℓ,i ∈ NH | Zℓ,i ∈ Uℓ \ ΓD }

and

Nℓ,h = {zℓ,j ∈ Nh | zℓ,j ∈ Uℓ \ (∂Uℓ \ ΓN )}.

Furthermore, we set Nℓ,H := |Nℓ,H | and Nℓ,h := |Nℓ,h | the number of nodes. The corresponding coarse and fine Lagrange basis functions in the patch Uℓ are denoted respectively by Φℓ,i (i.e. Φℓ,i is coarse nodal basis function for node Zℓ,i ∈ Nℓ,H ) and φℓ,j (i.e. φℓ,j is fine nodal basis function for node zℓ,j ∈ Nℓ,h ). With this notation, we define the corresponding local basis function sets.

6 Definition 3.1 (Local basis sets). For each patch Uℓ we define Vh,ℓ := {vh ∈ Vh | vh (zℓ,j ) = 0 for zℓ,j ∈ Nh \ Nℓ,h } and we let {φℓ,j | 0 ≤ j < Nℓ,h } ⊂ Vh,ℓ be the set of fine Lagrange basis functions that belong to the active fine nodes in Uℓ (i.e. to Nℓ,h ). Accordingly we let {Φℓ,i | 0 ≤ i < Nℓ,H } ⊂ VH denote the ordered set of all active coarse Lagrange basis functions in Uℓ , i.e. the coarse basis functions associated with the nodes in Nℓ,H . Since each Kℓ ∈ TH contains cd coarse nodes, we can order the global indices of ℓ these nodes by p0 (ℓ) < p1 (ℓ) < · · · < pcd −1 (ℓ). This implies QK h (Φj ) = 0 for all j 6∈ Kℓ {p0 (ℓ), · · · , pcd −1 (ℓ)}, hence we only need to compute Qh (Φpi (ℓ) ) for i ∈ {0, · · · , cd −1}. For arbitrary ΦH ∈ VH,ΓD we can hence write Qh (ΦH ) =

3.2

d −1 X cX

ℓ ΦH (Zpi (ℓ) )QK h (Φpi (ℓ) ).

(3)

Kℓ ∈TH i=0

Algebraic preliminaries

In this section, we introduce some algebraic preliminaries. As a general notation in this paper we denote for any Matrix M ∈ Rm×n the transposed of the i’th row of M by M[i] ∈ Rn (for 0 ≤ i < m), i.e.   Mi,0   M[i] =  ...  . Mi,n−1

The entry at position (i, j) is denoted by M[i][j].

Definition 3.2 (Local-to-global-maping). Let cd denote the number of nodes in a grid element, i.e. cd = d + 1 if TH and Th consist of simplicial elements and cd = 2d if TH and Th consist of quadrilateral elements. Then we call σ : {0, . . . , NTh − 1} × {0, . . . , cd − 1} → {0, . . . , Nh − 1} the local-to-global-maping for the fine grid, if it maps the local index of a node m in an element Tt ∈ Th to its global index j. Here, t ∈ {0, . . . , NTh − 1} denotes the index of the element Tt ∈ Th . We write σ(t, m) = j. For Tt ∈ Th the algebraic version of σ(t, ·) is given by the matrix σt ∈ RNh ×cd where for 0 ≤ m < cd and 0 ≤ j < Nh ( if σ(t, m) = j, (4) σt[m][j] := 1 0 else.

7

3

2

Tt=5 0

10

11

Tt=5

1 =m 5

j

Figure 1: Example: the fine grid Th consists of 16 quadratic grid elements. We start counting with 0. For the 5’th element T5 (i.e. t = 5), we find 4 global nodes with global indices 5, 6, 10 and 11. Each of these global indices j, can be mapped to a local index m and vice versa. This is done by σ. For instance, for t = 5, we have σ(t, 0) = 5, σ(t, 1) = 6, σ(t, 2) = 11 and σ(t, 3) = 10. For m = 1 and j = 6 as in the graphic, we have σt [m][j] = 1, because σ(t, m) = j. Definition 3.3 (Element stiffness and mass matrices). For Tt ∈ Th with index t we define the (fine grid) element stiffness matrix At ∈ Rcd ×cd by Z κ∇φσ(t,n) · ∇φσ(t,m) for all 0 ≤ n, m < cd At [m][n] := Tt

and the (fine grid) element mass matrix Mt ∈ Rcd ×cd by Z φσ(t,n) φσ(t,m) for all 0 ≤ n, m < cd . Mt [m][n] := Tt

Definition 3.4 (Global stiffness and mass matrices). By Ah ∈ RNh ×Nh we denote the global fine stiffness matrix with entries Ah [i][j] = (κ∇φj , ∇φi )L2 (Ω) and by Mh ∈ RNh ×Nh the global fine mass matrix with entries Mh [i][j] = (φj , φi )L2 (Ω) . Analogously we denote by AH ∈ RNH ×NH the coarse stiffness matrix and by MH ∈ RNH ×NH the coarse mass matrix. Note that the above matrices are with respect to all nodes including the whole boundary. Assuming that the local contributions At , Mt ∈ Rcd ×cd are computed for all t ∈ Th and assuming that σt is available, we can assemble the global (fine) stiffness and mass matrix by Ah =

X

t∈Th

σt At σt⊤

and

Mh =

X

σtMt σt⊤.

(5)

t∈Th

Since Vh and VH do still incorporate all boundary nodes on ∂Ω, we require matrices that erases the unnecessary rows and columns in the system matrices (and load vectors) that are associated with the DOFs on the Dirichlet boundary part ΓD .

8 Definition 3.5 (Boundary correction matrices). We define the boundary correction (or restriction) matrices by Bh ∈ RNh ×Nh by ( 1 if i = j and zi ∈ Nh \ ΓD h B [i][j] = 0 else. and analogously BH ∈ RNH ×NH by ( 1 H B [i][j] = 0

if i = j and Zi ∈ NH \ ΓD else.

As the coarse boundary condition vector is in general not available, we describe an easy way to compute it. We define a vertex map that receives the index of a coarse node and the index of a fine node. If the coordinates of the coarse node are identical to the coordinates of the fine node, the vertex map is 1 (true). In any other case, the vertex map is 0 (false). In algebraic form, we describe the vertex map by the matrix Vh ∈ RNH ×Nh that is given by ( 1 if coord(Zi ) = coord(zj ), with Zi ∈ NH , zj ∈ Nh Vh [i][j] := 0 else. The matrix Vh can be for instance easily computed, by using an interpolation matrix Ph as defined in (9) below. If Ph denotes such a matrix (expressing a function on the coarse grid in terms of fine degrees of freedom) we can define Vh [i][j] := (Ph [i][j] ≡ 1.0).

3.3

Local restriction matrices

In order to localize computations to a patch Uℓ with Kℓ ∈ TH we require a restriction operator Rℓ : Vh → Vh,ℓ . For vh ∈ Vh we define the nodal interpolation Rℓ (vh ) ∈ Vh,ℓ by ( vh (z) if z ∈ Nℓ,h , Rℓ (vh )(z) = 0 else. The algebraic version of the restriction operator is denoted by Rhℓ ∈ RNℓ,h ×Nh and defined by the entries ( 1 if zℓ,i = zj (6) Rhℓ [i][j] = 0 else and where i is the index that corresponds to the fine node zi ∈ Nh . Hence, we get the local mass matrix Mℓ (respectively local stiffness matrix Aℓ ) from the global mass matrix Mh (respectively stiffness matrix Ah ) by matrix multiplication, i.e. ⊤

Mℓ = Rhℓ Mh Rhℓ



Aℓ = Rhℓ Ah Rhℓ

Mℓ ∈ RNℓ,h ×Nℓ,h is local mass matrix,

Aℓ ∈ RNℓ,h ×Nℓ,h is local stiffness matrix.

Recall that the entries of Aℓ are given by Aℓ [i][j] = A(φℓ,j , φℓ,i )

for 0 ≤ i, j < Nℓ,h .

9 Besides the restriction Rhℓ to fine grid nodes in Uℓ we also require a restriction RH ℓ Nℓ,H ×NH analogously by the to active coarse grid nodes in Uℓ . We can define RH ℓ ∈ R entries ( 1 if Zℓ,i = Zj H (7) Rℓ [i][j] := 0 else and where j is the global index that corresponds with the coarse node Zj ∈ NH .

3.4

An algebraic characterization of the space Wh

Recall the notation VH = span{Φi | 0 ≤ i ≤ NH − 1}

and Vh = span{φj | 0 ≤ j ≤ Nh − 1}.

This subsection describes how we can characterize the kernel of the projection IH . In order to illustrate our method, we restrict our considerations to the choice that IH defines the L2 -projection. It is obvious that a function vh ∈ Vh,ΓD is in the kernel of the global L2 -projection (i.e. IH (vh ) = 0) if it holds (vh , Φi )L2 (Ω) = 0 for all Zi ∈ NH \ ΓD .

(8)

In order to handle this constraint, we first we observe that any coarse basis function Φi can be easily expressed in terms of fine basis functions by Φi =

NX h −1

Φi (zj )φj .

j=0

Hence we have (Φi , Φj )L2 (Ω) =

NX h −1

Φi (zk ) (φk , φℓ )L2 (Ω) Φj (zℓ ).

k,ℓ=0

Consequently, we can define the projection matrix Ph ∈ RNH ×Nh from the coarse-mesh Lagrange space to the fine-mesh Lagrange space by   Φ0 (z0 ) ··· Φ0 (zNh −1 )   .. .. .. Ph :=  (9)  . . . ΦNH −1 (z0 ) · · ·

ΦNH −1 (zNh −1 )

and relate the coarse and the fine mass matrix via

MH = Ph Mh P⊤ h. With that we can see that the analytical constraint (8), i.e. IH (v) = 0, can be equivalently expressed through the algebraic constraint (BH Ph Mh )v = 0. Motivated by these considerations we define the global constraint matrix Ch ∈ RNH ×Nh by Ch := Ph Mh . Remark 3.6. The definition of Ch = Ph Mh might be surprising since it does not account for the distinction between Dirichlet-nodes and Neumann-nodes. In fact, the natural way is to define Ch := BH Ph Mh , where the restriction (or boundary correction)

10 matrix BH is used to remove the coarse basis functions associated with nodes on ΓD . However, the boundary matrix BH causes that BH Ph Mh has not an optimal rank and hence the arising saddle point problem would be singular. This would cause numerical issues for the method with patches Uℓ = Ω. For that reason, we define Ch = Ph Mh and note that the arising constraint would be stronger than condition (8). However, the smaller error that we make in the definition of Ch is already corrected in the next h step by using local restrictions RH ℓ and Rℓ . Recalling the definition of the local restriction matrix Rhℓ given by (6), we can define the localization of Ch to the patch Uℓ (and to the correct boundary nodes) by ⊤

h Cℓ = RH ℓ Ch Rℓ

where Cℓ ∈ RNℓ,H ×Nℓ,h is the local constraints matrix.

Observe that now we have for any v ∈ Vh,ℓ IH (v) =

NX H −1

Nℓ,H −1

αi (v)Φi =

i=0

X i=0

and hence ⇐⇒

IH (v) = 0 where v ∈ RNℓ,h is such that v =

PNℓ,h −1 j=0

R

Uℓ

R

vΦℓ,i

Ω Φℓ,i

!

Φℓ,i

Cℓ v = 0,

vj φℓ,j .

Remark 3.7. The matrix Cℓ fully represents the local constraints and maps a function from the fine scale finite element space Vh,ℓ onto the coarse finite element space VH (restricted to the local subdomain Uℓ ). Since there are only constraints for coarse vertices, the dimension of Cℓ is small. If we use a localization parameter k with k ≃ C| ln(H)| (as it will be suggested by Theorem 4.2 below), we obtain that Nℓ,h = O((H| ln(H)|)/h)−d ) (which is the dimension of Vh,ℓ ) and that NH,ℓ (the number of coarse nodes in Uℓ ) grows proportional to | ln(H)|d .

3.5

Assembling of a local load vector

Let us again fix coarse element Kℓ ∈ TH . Beside assembling the local stiffness matrices and the local constraints matrix, we also need to compute the load vector that corresponds to the right hand side in (2), i.e. the term Z κ∇Φi · ∇φj − Kℓ

for every coarse and fine basis function Φi ∈ VH,ΓD and φj ∈ Vh,ΓD with support on Kℓ . We start with defining a suitable (algebraic) restriction operator for coarse grid nodes (in Kℓ ). Definition 3.8 (Coarse-node-in-coarse-element restriction). Recall that each coarse element Kℓ ∈ TH contains cd coarse nodes. Let the global indices of these nodes be denoted by p0 (ℓ) < p1 (ℓ) < · · · < pcd −1 (ℓ). Then the coarse element restriction matrix cd ×NH is given for 0 ≤ i < c and 0 ≤ j < N by TH H d ℓ ∈R ( 1 if j = pi (ℓ) (10) TH ℓ [i][j] = 0 else.

11 As for the global stiffness matrix Ah in (5), we can obtain the local stiffness matrix on Kℓ (i.e. with entries (κ∇φi , ∇φj )L2 (Kℓ ) ) from the element stiffness matrices At . After that, we can restrict the resulting matrix to the fine basis functions that belong to fine nodes zi ∈ Uℓ by using Rhℓ (see (6)). We obtain for 0 ≤ j < Nh and 0 ≤ i < Nℓ,h   X σt Atσt⊤)Rhℓ⊤ [j][i] = (κ∇φℓ,i , ∇φj )L2 (Kℓ) . ( t∈Th t⊂Kℓ

Consequently we can define the matrix rℓ ∈ Rcd ×Nℓ,h that stores the cd load vectors as its rows X H (11) σt At σt⊤)Rhℓ⊤, rℓ := −TH ℓ B Ph ( t∈Th t⊂Kℓ

i.e. rℓ as defined above fulfills either rℓ [i] = 0 for Zpi (ℓ) ∈ ΓD or else its rows transposed are given by   (κ∇Φpi (ℓ) , ∇φℓ,0 )L2 (Kℓ ) ,   .. rℓ [i] = −  , . (κ∇Φpi (ℓ) , ∇φℓ,Mℓ,h −1 )L2 (Kℓ )

where Φpi (ℓ) is the pi (ℓ)’th coarse basis function (i.e. the global index is pi (ℓ) and the local index in Kℓ is i). If rℓ [i] = 0, no local problem has to be solved and the local corrector is zero.

3.6

Assembly and solution of a local problem

Observe that (2) must be solved for every Kℓ ∈ TH and every coarse basis function Φm that has a support on Kℓ (i.e. for Φpi (ℓ) with 0 ≤ i < cd , except the ones that belong to nodes on ΓD ) and recall that the correct boundary condition on ∂Uℓ is already included in the local stiffness matrix Aℓ . Let us fix ℓ ∈ {0, . . . , |TH | − 1} and a coarse basis function Φpi (ℓ) . In the light of the discussion in Section 3.4, we can formulate the local problem (2) in the following way. Definition 3.9 (Continuous formulation of a local problem). Let 0 ≤ i < cd and let ℓ us denote wℓ,i := QK h (Φpi (ℓ) ). Then wℓ,i ∈ Vh (Uℓ ) is characterized by the property IH (wℓ,i ) = 0 and the property that it solves Z Z κ∇Φpi (ℓ) · ∇wh (12) κ∇wℓ,i · ∇wh = − Kℓ

Uℓ

for all wh ∈ Vh (Uℓ ) with IH (wh ) = 0. Problem (12) can be obviously interpreted as a saddle point problem. Hence, we obtain the following algebraic formulation using the notation from the previous subsections. Definition 3.10 (Algebraic formulation of a local problem). Let 0 ≤ i < cd . The algebraic version of problem (12) is the following saddle point problem. Find the tuple (wℓ [i], λℓ [i]) ∈ RNℓ,h × RNℓ,H ; with Aℓ wℓ [i] + C⊤ ℓ λℓ [i] = rℓ [i] Cℓ wℓ [i] = 0.

(13)

12 ℓ Here, wℓ [i] is the coefficient vector for the solution wℓ,i = QK h (Φpi (ℓ) ) of (12), i.e.

Nℓ,h −1

wℓ,i =

X

wℓ [i][j] φℓ,j ,

j=0

and λℓ [i] is the corresponding Lagrange multiplier. We can state this problem also in Schur complement formulation. Remark 3.11 (Schur complement). The Schur complement matrix Sℓ associated with problem (13) is given by ⊤ Sℓ := (Cℓ A−1 ℓ Cℓ ).

(14)

Hence the solution wℓ [i] of (13) can be written as −1 ⊤ wℓ [i] = A−1 ℓ rℓ [i] − (Aℓ Cℓ )λℓ [i],

(15)

Sℓ λℓ [i] = (Cℓ A−1 ℓ )rℓ [i].

(16)

where λℓ [i] ∈ RNℓ,H solves

The common approach is to solve systems such as (14)-(16) iteratively with an approximate Schur complement matrix. As the system (16) is only of size Nℓ,H × Nℓ,H and must be solved cd times (for different righthand sides corresponding to each coarse basis function with support in Kℓ )) it is faster to compute the whole Schur-complement matrix, solve it directly and apply back-substitution for each right-hand-side vector. Solving the local problem (13) for all (transposed) rows of the matrix rℓ ∈ Rcd ×Nℓ,h can be hence obtained in the following way. It involves a pre-processing step that is independent of rℓ and a post-processing step that must be performed for each row of rℓ . Pre-processing steps. ⊤ 1. Compute the matrix Yℓ := A−1 ℓ Cℓ . This involves to solve Nℓ,H problems of size Nℓ,h × Nℓ,h , i.e. for all 0 ≤ m < Nℓ,H we need to solve for Yℓ [m] ∈ RNℓ,h with

Aℓ Yℓ [m] = C⊤ ℓ [m]. The (1 × Nℓ,h )-matrix (Yℓ [m])⊤ forms the m’th row of Yℓ . 2. Assemble the Schur complement Sℓ = Cℓ Yℓ by matrix multiplication and compute S−1 ℓ . Since Sℓ is only a (Nℓ,H × Nℓ,H )-matrix its inversion is cheap. Post-processing steps for all 0 ≤ i < cd . 1. If rℓ [i] 6= 0, solve for qℓ [i] ∈ RNℓ,h with Aℓ qℓ [i] = rℓ [i]. 2. Since S−1 ℓ is precomputed, we obtain λℓ [i] from qℓ [i] via equation (16), i.e. set λℓ [i] = S−1 ℓ Cℓ qℓ [i].

13 ⊤ 3. Using the precomputed matrix Yℓ = A−1 ℓ Cℓ and inserting λℓ [i] in (15) we obtain

wℓ [i] = qℓ [i] − Yℓ λℓ [i]. Remark 3.12 (Cost). Recall that Nℓ,H is typically a small number (see also Remark 3.7 above). The pre-processing step requires to solve Nℓ,H equations of size Nℓ,h × Nℓ,h 3 )). And in the post-processing and to invert one matrix of size Nℓ,H ×Nℓ,H (cost O(Nℓ,H step, for each i ∈ {0, · · · , cd −1}, we only need to solve one additional problem. In total, for one patch Uℓ , the procedure involves to solve (cd + Nℓ,H ) equations of dimension Nℓ,h × Nℓ,h and Nℓ,H equations of dimension Nℓ,H × Nℓ,H . This also justifies why we solve the saddle point problem (13) with a direct inversion of the Schur complement instead of using an iterative solver like the Uzawa solver. Roughly speaking, if the average number of iterations of an iterative solver is larger than (cd + Nℓ,H )/cd the direct inversion above is the cheaper approach. This is in most cases fulfilled. Remark 3.13. Note that we can practically use the fact that the Lagrange basis functions of VH have a partition of unity property, which implies that it is only required to solve the local corrector problem (2) d · |TH | times in the case of a triangulation and (d + 1) · |TH | times in the case of a quadrilation. We do not consider this in the algorithms. However, a corresponding modification ist straightforward. Remark 3.14. The algorithm can be also formulated with the boundary matrix BH . In this case, there is a small overhead in terms of the number of local problems to be solved, i.e. we solve problems for right hand sides rℓ [i] that correspond to inactive coarse basis functions (basis functions belonging to Dirichlet-nodes).

3.7

The global correction matrix

To store the information that we obtained from the solutions of the local problems, we introduce the global correction matrix Qh ∈ RNH ×Nh . Definition 3.15 (Global correction matrix Qh ). Recall the matrix wℓ ∈ Rcd ×Nℓ,h ℓ introduced in Definition 3.10 and recall that it is related to the correctors QK h (Φpi (ℓ) ) (solving equation (12)) via Nℓ,h −1 ℓ QK h (Φpi (ℓ) )

=

X

wℓ [i][j] φℓ,j .

j=0

With (3) and the previously defined local restriction matrices Rhℓ ∈ RNℓ,h ×Nh and cd ×NH we get the correction matrix Q ∈ RNH ×Nh via TH h ℓ ∈R X ⊤ h Qh := (TH ℓ ) wℓ Rℓ . Kℓ ∈TH

Hence, for any coarse function ΦH ∈ VH,ΓD , we can compute Qh (ΦH ) ∈ Vh,ΓD easily from Qh . For instance, let Φ ∈ RNH be the vector with entries Φ[i] = ΦH (Zi ). Then we have NX H −1   Qh (ΦH ) = Q⊤ h Φ [i] Φi . i=1

The complete assembly of the global correction matrix Qh is summarized in Algorithm 1.

14

Algorithm 1: Computation of global correction matrix Qh . data: Nh , NH , NTH , # fine space / coarse space / coarse grid size Adc , Mdc , # element stiffness / mass matrix, cf. Def. 3.3 BH , # NH × NH boundary correction matrix Ph # NH × Nh projection matrix in (9) H H h # local restrictions in (6),(7),(10) Rℓ , Rℓ , Tℓ σ, # per elem. to conforming map in (4) def computeCorrections: compute Ah = σ Adc σ ⊤ # Nh × Nh Stiffness matrix ⊤ compute Mh = σ Mdc σ # Nh × Nh Mass matrix compute Ch := Ph Mh # NH × Nh constraints matrix Qh := Matrix(NH , Nh ) # NH × Nh Corrector matrix ## -- foreach Kℓ ∈ TH -for 0 ≤ ℓ < NTH : # local fine space size Nℓ,h := rows(Rhℓ ) ) # local coarse space size Nℓ,H := rows(RH ℓ ⊤

Aℓ := Rhℓ Ah Rhℓ

h⊤ Cℓ := RH ℓ Ch Rℓ H rℓ := −TH ℓ B Ph (

# Nℓ,h × Nℓ,h Stiffness matrix

⊤ h⊤ ℓ Rℓ )

# Nℓ,H × Nℓ,h constraints

matrix

σℓAtσ # cd × Nℓ,h load vec. matrix ## -- compute inverse operator -−1 # e.g. using sparse LU Ainv ℓ := Aℓ ## -- precomputations related to the operator -Yℓ := Matrix(Nℓ,H , Nℓ,h ) # Nℓ,H × Nℓ,h matrix for 0 ≤ m < Nℓ,H : ⊤ Yℓ [m] := Ainv ℓ (Cℓ [m]) ## -- compute inverse Schur complement -# Nℓ,H × Nℓ,H matrix Sℓinv := (Cℓ Yℓ )−1 ## -- compute correction for each coarse space function -## -- which has a support on Kℓ -H cd := rows(Tℓ ) wℓ := Matrix(cd , Nℓ,h ) # cd × Nℓ,h matrix for 0 ≤ i < cd : −1 −1 ⊤ −1 ## compute wℓ [i] = A−1 ℓ rℓ [i] − (Aℓ Cℓ )Sℓ (Cℓ Aℓ )rℓ [i] inv # qi := A−1 compute qi = Aℓ (rℓ [i]) ℓ rℓ [i] −1 inv # λℓ [i] := Sℓ Cℓ qℓ [i] compute λi = Sℓ (Cℓ qi ) compute wℓ [i] = qi − Yℓ λi # wℓ [i] := qℓ [i] − Yℓ λℓ [i] ## update correction ⊤ h Qh := Qh + (TH ℓ ) wℓ Rℓ

return Qh

15

4

The LOD for linear elliptic problems

We are prepared to state the first full example for an application of the LOD. Given f ∈ L2 (Ω), we seek the weak solution of −∇ · κ∇u = f

in Ω,

u = 0 on ΓD ,

κ∇u · n = 0 on ΓN , i.e., we seek u ∈ HΓ1D (Ω) that satisfies A (u, v) =

4.1

Z



κ∇u · ∇v =

Z



f v =: F(v)

for all v ∈ HΓ1D (Ω).

(17)

Method and convergence results

With the definitions from Section 2, we can state the Local Orthogonal Decomposition method (LOD) for model problem (5.1). Definition 4.1 (LOD approximation for problem (17)). Recall Definition 2.4 for a given localization parameter k ∈ N. If uH ∈ VH,ΓD solves Z Z f Rh (ΦH ) for all ΦH ∈ VH,ΓD , (18) κ∇Rh (uH ) · ∇Rh (ΦH ) = Ω



the final LOD approximation is given by uLOD = Rh (uH ). The Galerkin solution uh ∈ Vh,ΓD which satisfies A(uh , v) = F (v)

for all v ∈ Vh,ΓD

(19)

can be considered as a reference solution in the sense that uLOD = Rh (uH ) is constructed to approximate uh with a desired accuracy of at least O(H). This approximation quality can be quantified: Theorem 4.2 (A priori error estimate). Assume that the localization parameter fulfills k & m| ln(H)| for some m ∈ N. Then, there exists a positive constant C that depends on the space dimension d, on Ω, γmin , γmax and interior angles of the partitions, but not on the mesh sizes H and h, such that kuh − Rh (uH )kL2 (Ω) ≤ C(H + H rm )2

and

kuh − Rh (uH )kH 1 (Ω) + kuh − uH kL2 (Ω) ≤ C(H + H rm ),

for some constant r > 0 that depends linearly on the square root of the contrast. The theorem was proved in [31, 22, 18]. Practically, numerical experiments indicate that the choice m ∈ {1, 2, 3} typically yields good results even for high contrast cases [35]. We refer to the numerical experiments in [18, 31].

16

4.2 4.2.1

Assembly and solution of the global problem Formal description

Assume that all local problems are solved (i.e. solved for every Kℓ ∈ TH and every ℓ coarse basis function Φpi (ℓ) with support on Kℓ , where 0 ≤ i < cd ) so that QK h (Φpi (ℓ) ) is available and we can write d −1 X cX

Qh (ΦH ) =

ℓ ΦH (Zpi (ℓ) )QK h (Φpi (ℓ) )

Kℓ ∈TH i=0

for any ΦH ∈ VH,ΓD . Consequently we can assemble the (global) LOD stiffness matrix ALOD ∈ RNH ×NH that is given by the entries H ( A(Φn + Qh (Φn ), Φm + Qh (Φm )) for Zm , Zn ∈ NH \ ΓD , ALOD H [m][n] := 0 else and LOD load vector fH ∈ RNH given by ( (f, Φm + Qh (Φm ))L2 (Ω) fH [m] := 0

for Zm ∈ NH \ ΓD , else.

With that, the algebraic version of (18) hence reads: find uLOD ∈ RNH with H LOD ALOD = fH . H uH

Once this is solved, the final LOD approximation is given by uLOD =

NX H −1 m=0

4.2.2

uLOD H [m](Φm + Qh (Φm )) ∈ Vh,ΓD .

Algorithmic realization

Next we describe an efficient algorithmic realization of how to assemble and solve the global problem. When all local problems are solved, the global correction matrix Qh ∈ RNH ×Nh is available (cf. Definition 3.15). From Qh , BH and the projection matrix Ph we hence obtain the global LOD system matrix by matrix multiplication ALOD = BH (Ph + Qh )Ah (Ph + Qh )⊤ BH . H Similarly, we get the load vector fH by fH = BH (Ph + Qh )fh , where fh ∈ RNh denotes the classical FEM load vector with entries fh [i] = (f, φi )L2 (Ω) for 0 ≤ i < Nh . Now we can solve for uLOD ∈ RNH with H LOD ALOD = fH H uH

∈ RNh of our LOD approximation by and obtain the final coefficient vector uLOD h := (Ph + Qh )⊤ uLOD uLOD H . h The procedure is summarized in Algorithm 2.

17

Algorithm 2: Computation of the final LOD approximation uLOD h . data: Th , TH , # fine / coarse mesh Nh , NH , # fine / coarse space size Ph # NH × Nh interp. matrix in (9) Ah # Nh × Nh stiffness matrix fh # Nh × 1 (fine) load vector BH # NH × NH boundary correction matrix Qh # NH × Nh global correction matrix def solveLODSystem: compute ALOD = BH (Ph + Qh )Ah (Ph + Qh )⊤ BH # NH × NH LOD sys.mat. H compute fH = BH (Ph + Qh )fh # NH × 1 LOD rhs.vec. LOD solve ALOD u = f # solve LOD system H H H ⊤ LOD LOD # Nh × 1 LOD solution compute uh := (Ph + Qh ) uH return uLOD h

Remark 4.3. Typically it is possible to replace the right hand side in (18) by (f, ΦH )L2 (Ω) without a significant loss in accuracy. In particular if f is a slow variable. Consequently, we do not require the correctors any longer to compute the load vector in the global LOD system. This can turn out to be an immense computational advantage if the LOD system has to be solved for several source terms f . In this case, we can fully reuse ALOD H and quickly assemble fH with entries fH [i] = (f, Φi )L2 (Ω) (only involving coarse basis functions). Remark 4.4. In the case that the coefficient κ has certain structural properties (such as periodicity), it might be possible to only assemble some of the local correctors QK h and reuse them on the different location in Ω. This is possible if a corrector can be expressed as a rotation and translation of another corrector. With that the computational complexity can be decreased significantly. This has been exploited in the context of acoustic scattering in [16].

4.3

Petrov-Galerkin version of the method

In some cases it can happen that the fine space Vh is so large that the storing of the full system matrix Ah (respectively the storing of the correction matrix Qh ) becomes too memory demanding. In such cases we cannot afford the multiplication of Nh × Nh matrices as frequently done in Algorithm 1 and 2. To overcome the issue that the size of Vh exceeds the computational resources, a Petrov-Galerkin (PG) formulation of the LOD can be used. This method allows an on-the-fly assembling of the LOD system matrix ALOD on the expense that we lose the symmetry. Let us start with describing H the Petrov-Galerkin LOD from the analytical point of view. 4.3.1

Description and properties of the PG-LOD

We use the notation introduced earlier in this section. Definition 4.5 (PG LOD approximation). Let k ∈ N be fixed and let Qh : VH,ΓD → Vh,ΓD denote the corresponding correction operator as in Definition 2.4. Again, we denote Rh (ΦH ) := ΦH + Qh (ΦH ) for ΦH ∈ VH,ΓD . If uPG H ∈ VH,ΓD solves Z Z f ΦH for all ΦH ∈ VH,ΓD , (20) κ∇Rh (uPG H ) · ∇ΦH = Ω



18 the final Petrov-Galerkin LOD approximation is given by uPG−LOD := Rh (uPG H ). Obviously, the standard formulation of the LOD only differs from the PG formulation by the choice of test functions in (20). In particular, the solving of the local corrector problems is identical for both methods. From the analytical point of view, the change of test functions in (18) does not have a crucial influence. We still have well-posedness of the PG-LOD solution and the obtained convergence rates are the same as for the original method. We summarize the corresponding main result in the following theorem, which is proved in [14]. Theorem 4.6 (A priori error estimate for the PG-LOD). Assume that k & m| ln(H)| for some m ∈ N. Furthermore, let the positive constants C and r be as in Theorem 4.2. Then the left side of (20) represents a coercive bilinear form on VH,ΓD , i.e. Z κ∇Rh (ΦH ) · ∇ΦH ≥ C(α − CH rm )kΦH k2H 1 (Ω) . (21) Ω

Consequently, problem (20) is well-posed and the PG-LOD approximation fulfills the same error estimates as the standard LOD approximation, i.e. we have

PG

rm 2 kuh − Rh (uPG ) H )kL2 (Ω) ≤ C(H + H PG

kuh − Rh (uH )kH 1 (Ω) + kuh − uH kL2 (Ω) ≤ C(H + H

rm

and

).

Remark 4.7 (Relevance of L2 -approximations). Theorem 4.6 contains L2 - and H 1 error estimate for the full RG-LOD approximation Rh (uPG H ). However, to compute PG PG PG Rh (uPG ) = u + Q (u ) from the coarse part u , we need to know the operator Qh . h H H H H But recall that the algebraic version of Qh is represented by the corrector matrix Qh ∈ RNh ×Nh , which is of the same size (and even less sparse) than the global stiffness matrix Ah ∈ RNh ×Nh . So if we do not have the capacities to store Ah , neither do we have the PG capacities to store Qh . Consequently, even though uPG H might be available, Rh (uH ) is 2 typically not. Hence, our final approximation uPG H is only an L -approximation, instead 1 of a full H -approximation (as e.g. Rh (uH )). Hence, the relevant estimate that remains from Theorem 4.6 is the L2 -error estimate rm kuh − uPG ). H kL2 (Ω) ≤ C(H + H

4.3.2

Computational advantages and disadvantages

Let us now describe the computational advantages and disadvantages of the PetrovGalerkin formulation. We start with the advantages to demonstrate how the PG formulation overcomes the capacity issues. Advantages. The basic advantage of the PG-LOD is that matrices of size Nh × Nh have to be handled at no point. Operations either involve Nℓ,h × Nℓ,h -matrices (Nℓ,h is the number of fine nodes in the patch Uk (Kℓ )) or they involve NH ×NH -matrices (where NH denotes the size of VH ). The reason why this is possible is that no corrector-tocorrector communication is required for the PG-LOD. For instance, in order to assemble the system matrix that is associated with standard LOD (cf. (18)), we need to compute entries such as Z κ∇ (Φi + Qh (Φi )) · ∇ (Φj + Qh (Φj )) Ω

19 for two coarse basis functions Φi and Φj . It is impossible to compute this entry without knowing both Qh (Φi ) and Qh (Φj ) at the same time. Consequently correctors must be stored so that they can communicate with each other. For the PG-LOD, system matrix entries are always of the structure Z Z X  κ∇ Φi + QK κ∇ (Φi + Qh (Φi )) · ∇Φj = h (Φi ) · ∇Φj , Ω

K∈TH K⊂supp(Φi )

Uk (K)

which can be assembled (respectively updated) after a corrector QK h (Φi ) is computed. K If desired, Qh (Φi ) can be immediately deleted after this. Consequently, the storage requirements are significantly lower for the Petrov-Galerkin version. Trade-offs. In comparison to (18), we observe that the PG-LOD system given by (20) can no more be represented by a symmetric matrix, which formally excludes the usage of certain efficient algebraic solvers that rely on symmetry. However, having a closer look, we see that the method only suffers from a mild loss of symmetry in the sense that the PG-LOD is still symmetric if there is no localization and that the lack of symmetry can be hence quantified by the exponential decay property. A symmetric −LOD −LOD ⊤ + 21 (APG ) for the approximation can be for instance obtained by using 12 APG H H system matrix. The second trade-off is rather subtle. Theorem 4.6 predicts a coercivity constant that can be disturbed by a term of order O(H rm ). Even though this seems to be unproblematic for small H, there is formally no guarantee that (α − CH rm ) is always positive. This can only be guaranteed by a numerical investigation of the eigenvalues. However, we also note that non-positivity has never been observed in numerical experiments. So far it seems that the result (21) is not yet optimal and the coercivity appears to be always fulfilled in practical applications. Another trade-off was already mentioned in Remark 4.7. If we are in a scenario where the PG-LOD is used to decrease the memory demand, then the correctors Qh PG will not be stored. Hence we will not be able to compute Rh (uPG H ) from uH and have 2 to be content with an L -approximation of uh . In many applications this is enough. Especially when considering that uPG H can be stored with significantly lower costs than the full fine scale approximation Rh (uPG H ). If local fine scale information is required afterwards by a user, it is possible to perform a local ”real time” post-processing where the missing fine-scale information is only computed in the relevant region. 4.3.3

Realization

The (algebraic) realization differs slightly but essential from the realization of the classical LOD. The local corrector problems are computed in the same way as before, however, instead of storing their solutions in a global corrector matrix, their contributions are directly added to the global PG-LOD system matrix and can be immediately delete afterwards. To summarize the basic procedure, let us fix a coarse element Kℓ ∈ TH and a corresponding coarse layer patch Uℓ = Uk (Kℓ ). The following step has to be repeated for every Kℓ . For every coarse basis function Φpi (ℓ) (with 0 ≤ i < cd and only if Zpi (ℓ) 6∈ ΓD ) Kℓ ℓ we solve for the local corrector for QK h (Φpi (ℓ) ) according to (12). After Qh (Φpi (ℓ) ) is

20 −LOD . To do that we visit every coarse computed, we update the system matrix APG H basis function Φm ∈ VH,ΓD with supp(Φm ) ∩ Uℓ 6= ∅. For each such Φm we can make the update Z   PG−LOD PG−LOD ℓ (Φ ) · ∇Φm . κ∇ Φpi (ℓ) + QK [m][pi (ℓ)] + [m][pi (ℓ)] := AH AH p (ℓ) i h Uℓ

When all loops terminated we can incorporate the homogenous boundary condition −LOD at both sides with the boundary correction matrix BH , i.e. by multiplying APG H PG−LOD PG−LOD H BH . In total, we computed the correct PG-LOD system := B AH AH matrix with entries Z PG−LOD κ∇ (Φn + Qh (Φn )) · ∇Φm [m][n] = AH Ω Z   X ℓ (Φ ) · ∇Φm . κ∇ Φn + QK = n h Uℓ Kℓ ∈TH Kℓ ⊂supp(Φn )

Observe that we could generate a new local fine mesh for every Uℓ . Basically, there is no need for a global fine mesh Th . The remaining procedure is straightforward. Since the right hand side of (20) only PG−LOD := BRH fH , where fH ∈ RNH involves standard coarse functions we can set fH denotes the standard coarse load vector with entries fH [m] = Ω f Φm. Consequently it −LOD ∈ RNH with only remains to solve for uPG H PG−LOD −LOD PG−LOD . = fH uH APG H

The final approximation is given by uPG H =

NX H −1

−LOD [m]Φm . uPG H

m=0

Accordingly modified algorithms can be formulated analogously to the algorithms presented for the standard (symmetric) LOD.

5

The treatment of rough boundary data and sources

In this section we discuss how we can incorporate nonhomogeneous boundary conditions in the LOD approximations and how we can treat regions in which the source term f becomes close to singular.

5.1

Model problem and discretization

We consider the following problem with mixed Dirichlet and Neumann boundary conditions. Find u with −∇ · κ∇u = f in Ω, u=g

on ΓD ,

κ∇u · n = q

on ΓN .

In addition to the previous assumptions on Ω and κ we assume that the Dirichlet 1 boundary values fulfill g ∈ H 2 (ΓD ) and that the Neumann boundary values fulfill q ∈ L2 (ΓN ).

21 The weak formulation of problem (5.1) reads: find u ∈ H 1 (Ω), with TD (u) = g, such that Z Z Z qv for all v ∈ HΓ1D (Ω). fv + κ∇u · ∇v = ΓN





Assume that g is sufficiently regular so that point evaluations are possible. Then we can define gH ∈ VH as the function that is uniquely determined by the nodal values gH (Z) = g(Z) for all Z ∈ NH ∩ ΓD and gH (Z) = 0 for all Z ∈ NH \ ΓD . Using this, we define the (fine scale) Dirichlet extension gh ∈ Vh uniquely by the nodal values gh (z) = g(z) for all z ∈ Nh ∩ ΓD and gh (z) = gH (z) for all z ∈ Nh \ ΓD . With this, we avoid degeneracy of gh for h tending to zero. The reference problem reads: find Uh ∈ Vh,ΓD with Z Z Z qvh for all vh ∈ Vh,ΓD . (22) κ∇gh · ∇vh + f vh − A(Uh , vh ) = ΓN





The final fine scale approximation is then given by uh := Uh + gh ∈ Vh . Now observe that problem (22) is basically of the same structure as the homogenous problem (19). This suggest to apply the same methodology as before. Unfortunately, the correctors introduced in Definition 2.4 might not be sufficient to construct accurate approximations, if e.g. the Dirichlet boundary condition is highly oscillatory. The slight difference that the right hand side is no longer purely represented by an L2 -function f (but by a less regular functional which is only in the dual space of Vh,ΓD ) makes it necessary to introduce additional correctors to preserve the previous convergence rates. We call these new correctors source correctors.

5.2

Source correctors

In this section we introduce source term correctors. They are defined analogously to the correctors Qh . Their purpose is to captured oscillatory effects that are produced by a general source. For that purpose, we split the right hand side of (22) into two parts. One part (we shall denote by F) that has basically a coarse scale structure and that can be considered as harmless if ignored by the fine grid, and a second part (we shall denote by F s ) which might have a considerable influence on the oscillations of uh . Hence we let F : H 1 (Ω) → R and F s : H 1 (Ω) → R be source functionals such that Z Z Z s qvh for all vh ∈ Vh,ΓD . κ∇gh · ∇vh + f vh − F(vh ) + F (vh ) = ΓN





We only wish to introduce additional correctors for the F s -contribution. It can incorporate source terms and boundary conditions and we assume that it is of the structure Z Z s η3 v η1 v + κ∇η2 · ∇v + F (v) = ∂Ω



with some given η1 ∈ L2 (Ω), η2 ∈ H 1 (Ω) and η ∈ H 1/2 (∂Ω). Typical choices would be Z Z qv (boundary source) or, κ∇gh · ∇v + F s (v) = ΓN Ω Z Z s qv (total source). f v + κ∇gh · ∇v + F (v) = Ω

ΓN

22 We define the localization of F s to a coarse element K ∈ TH by Z Z s η3 v. η1 v + κ∇η2 · ∇v + FK (v) := ∂Ω∩K

K

With that, we can define local source correctors. Definition 5.1 (Source term correctors). Let F s be fixed according to the previous discussion. For a given positive k ∈ N and K ∈ TH we define the local source corrector QK F s ,h ∈ Wh (Uk (K)) as the solution of Z

Uk (K)

s κ∇QK F s ,h · ∇wh = −FK (wh )

for all wh ∈ Wh (Uk (K)).

(23)

The corresponding global corrector is given by X QF s ,h := QK F s ,h . K∈TH

Note that it is desirable that F s only contains locally supported sources, i.e. that s (w ) 6= 0, = 0 for most of the coarse elements K. The more elements with FK h the more local problems to solve. Therefore F s typically only contains boundary terms or parts of f in a small region where f might become close to singular. s (w ) FK h

5.3

Formulation of the method and error estimates

Using Definition 2.4 and 5.1 we propose the following LOD approximation. Definition 5.2 (LOD approximation for boundary value problems). For fixed F s and fixed k ∈ N the LOD approximation to problem (22) is given by uLOD := Rh (UH ) − Bh , where UH ∈ VH,ΓD solves: Z κ∇Rh (UH ) · ∇Rh (ΦH ) (24) Ω Z κ∇QF s ,h · ∇Rh (ΦH ) = (F + F s )(Rh (ΦH )) + Ω

for all ΦH ∈ VH,ΓD . The following a priori error estimate is proved in [18]. Theorem 5.3. Assume that k & m| ln(H)| for some m ∈ N. Furthermore, let Z Z Z s f v. qv and F(v) = κ∇gh · ∇v + F (v) = Ω

ΓN



Recall that we compute the source corrector QF s ,h only with respect to F s . Then the LOD approximation uLOD introduced in Definition 5.2 fulfills the estimates kuh − uLOD kL2 (Ω) ≤ C(H + H rm )2

and

where C and r > 0 are as in Theorem 4.2.

kuh − uLOD kH 1 (Ω) ≤ C(H + H rm ),

23

5.4

Algebraic realization

The algebraic realization is straightforward following the ideas presented in Section 4. We only need to solve one additional linear elliptic problem more for each coarse s 6= 0 and we need to assemble an additional vector that element Kℓ ∈ TH Rwith FK ℓ stores the entries Ω κ∇QF s ,h · ∇Rh (Φj ).

5.4.1

Solving of the additional local problem

Let us fix a coarse element Kℓ ∈ TH . First recall that for every coarse basis function ℓ Φpi (ℓ) (0 ≤ i < cd , see Section 3.5) we need to solve for wℓ,i := QK h (Φpi (ℓ) ) ∈ Vh,ℓ with IH (wℓ,i ) = 0 and Z Z κ∇Φpi (ℓ) · ∇wh κ∇wℓ,i · ∇wh = − Kℓ

Uℓ

s 6= 0 we also need to solve for w ˆℓ := for all wh ∈ Vh,ℓ with IH (wh ) = 0. Now, if FK ℓ Kℓ ˆℓ ) = 0 and QF s ,h ∈ Vh,ℓ with IH (w

Z

Uℓ

s κ∇w ˆℓ · ∇wh = −FK (wh )

(25)

for all wh ∈ Vh,ℓ with IH (wh ) = 0. However, both problems only differ in their source terms, where the inverse of the Schur-complement matrix S−1 ℓ is already precomputed for solving the original corrector problems. Let us introduce a notation for the algebraic version of (25). Definition 5.4 (Algebraic formulation of (25)). Let the load vector ˆrℓ ∈ RNℓ,h be given s (φ ) for 0 ≤ j < N . The algebraic version of problem by the entries ˆrℓ [j] := −FK ℓ,j ℓ,h ˆ ℓ ) ∈ RNℓ,h × RNℓ,H ˆ ℓ, λ (25) is the following saddle point problem. Find the tuple (w with ˆ ˆ ℓ + C⊤ Aℓ w rℓ ℓ λℓ = ˆ ˆ ℓ = 0. Cℓ w

(26)

ℓ ˆ ℓ is the coefficient vector for the solution w Here, w ˆℓ = QK F s ,h .

ˆ ℓ in three steps: Exploiting the notation from Section 3.6, we obtain w ˆ ℓ = ˆrℓ . ˆ ℓ ∈ RNℓ,h with Aℓ q 1. Solve for q ˆ ˆ ℓ = S−1 Cℓ q ˆ ℓ via λ ˆℓ. 2. Since S−1 ℓ is precomputed, we obtain λℓ from q ℓ ⊤ ˆ ℓ. ˆℓ = q ˆ ℓ − Yℓ λ 3. Using the precomputed matrix Yℓ = A−1 ℓ Cℓ we obtain w

Observe that this procedure only involves one single (low dimensional) system of equations to solve. 5.4.2

Assembly and solution of the global problem

The procedure is basically analogous to the case of a homogenous boundary condition. The global correction matrix Qh is assembled identically as before. The same holds for

24 the interpolation matrix Ph . With that, we obtain the LOD stiffness matrix ALOD ∈ H RNH ×NH (associated with the left hand side of (24)) by ALOD = BH (Ph + Qh )Ah (Ph + Qh )⊤ BH . H In order to assemble the LOD load vector fH ∈ RNH , we first need to assemble the vector ˆfh ∈ RNh that stores the information gained from source correctors. For a given fine basis function φj the corresponding entry of ˆfh is given by ˆfh [j] :=

Z



=

κ∇QF s ,h · ∇φj =

NX ℓ,h −1 H −1 NX ℓ=0

ˆ ℓ [i] w

i=0

Z

Uℓ

NX H −1 Z ℓ=0

Uℓ

ℓ κ∇QK F s ,h · ∇φj

κ∇φℓ,i · ∇φj .

Consequently we obtain ˆfh by matrix multiplication and summation ˆfh =

NX H −1



ˆ ℓ. Rhℓ Aℓ w

ℓ=0

The standard load vector fh ∈ RNh associated with a classical fine element method on the fine grid Th is given by fh [i] := (F + F s )(φi ).

In total, we obtain the LOD vector fH ∈ RNH (i.e. the vector associated with the right hand side of (24)) by fH := BH (Ph + Qh )(fh + ˆfh ). With that, we can solve for ULOD ∈ RNH with H LOD ALOD = fH H UH

∈ RNh of our LOD approximation by and obtain the final solution vector uLOD h LOD

uh



LOD

:= (Ph + Qh ) uH



NX H −1



ˆ ℓ, Rhℓ w

ℓ=0

P h −1 LOD respectively uLOD := N i=0 uh [i]φi . With these changes, Algorithm 1 and 2 can be modified in an obvious way.

6

The LOD for eigenvalue problems

In this section we describe how the LOD can be applied to solve eigenvalue problems. Eigenvalue problems have a distinguished status since the LOD is particularly efficient for tackling them, even if the diffusion coefficient has no multiscale character. First, we describe the procedure for linear eigenvalue problems and then we describe exemplarily how it can be extended to solve a nonlinear eigenvalue problem.

25

6.1

Linear elliptic eigenvalue problems

In this section we consider the the following linear eigenvalue problem with a homogenous Dirichlet boundary condition, i.e. ΓD = ∂Ω, g = 0 and ΓN = ∅. We seek tuples (λ(n) , u(n) ) ∈ R × H01 (Ω) with Z (n) (n) A(u , v) = λ u(n) v for all v ∈ H01 (Ω). (27) Ω

We assume that the eigenvalues are ordered and that the eigenvalues are L2 -normalized, i.e. we have λ(n) ≤ λ(n+1) and ku(n) kL2 (Ω) = 1 for all n ∈ N. Note that we always have λ(0) > 0. (n) (n) The corresponding fine-scale reference solutions are given by the tuples (λh , uh ) ∈ (n) R × Vh,ΓD with kuh kL2 (Ω) = 1 and Z (n) (n) (n) (28) uh vh for all vh ∈ Vh,ΓD A(uh , vh ) = λh Ω

(n)

(n+1)

and where 0 < λh ≤ λh 6.1.1

.

LOD approximation of a linear eigenvalue problem

The LOD method for approximating the eigenpair (λ(n) , u(n) ) of (27) can be implemented in a straightforward way. After solving all local problems as described in Section 3 we can assemble the LOD system matrix ALOD as described in Section 4.2. This H has to be done only once and can be seen as a one-time preprocessing step. The local solutions and the LOD system matrix are stored and can be reused for all eigenvalues that we are interested in. We define the LOD approximation as follows. Definition 6.1 (Eigenvalue LOD approximation). Let k ∈ N be fixed and let Qh : VH,ΓD → Vh,ΓD denote the corresponding correction operator as in Definition 2.4. We (n) (n) denote Rh (ΦH ) := ΦH + Qh (ΦH ) for ΦH ∈ VH,ΓD . We seek tuples (λH , uH ) ∈ (n) R × VH,ΓD with kRh (uH )kL2 (Ω) = 1 such that for all ΦH ∈ VH,ΓD Z (n) (n) (n) (29) A(Rh (uH ), Rh (ΦH )) = λH Rh (uH ) Rh (ΦH ) Ω

(n) λH

(n+1) for λH (n)

0 ≤ n < NH . We denote the arising LOD approximations of ≤ and 0 < (n) the eigenvectors by uLOD := Rh (uH ). The eigenvalue problem (29) can be solved with any favorite solver. The main cost (for computing ALOD and Qh ) arise only once. Hence the computational advantage of H the method becomes bigger the more eigenvalues we want to compute. Furthermore, the obtained convergence rates in H surpass the classical convergence rates. The following result was proved in [32]. Theorem 6.2. Recall the reference problem (28). By C we denote a generic constant as  √ (n) −1/2 . nλh in Theorem 6.1. Let Uk (K) = Ω for all K ∈ TH and assume that H ≤ Then it holds (n)

(n)

λH − λh (n) λh

for all 0 ≤ n < NH .

(n)

≤ Cn(λh )2 H 4

(30)

26 Besides the fourth order convergence rates for the eigenvalues, it can be also shown that the corresponding eigenfunctions converge with higher rates (cf. [32]). Concerning the H 1 -error, the convergence is of quadratic order (in H) and concerning the L2 -error of cubic order. These rates are higher than the rates that we obtained for the LOD for standard linear elliptic problems. Observe that these high convergence rates allow for much coarser grids and hence for a reduced computational complexity. Remark 6.3 (Truncation). If the localization parameter k is chosen such that k ≥ m| ln(H)|, the truncation error will be of order O(H rm ) (with r as in Theorem 4.2). Consequently, for properly chosen m, the convergence rates in Theorem 6.2 remain valid even for the localized method. 6.1.2

Two-grid postprocessing

The high convergence rates depicted in Theorem 6.2 can be even improved by applying a two-grid post-processing technique as initially suggested in [38]. The postprocessing technique can be applied, if it is affordable to solve global (linear elliptic, non-eigenvalue) problems in the full fine space Vh,ΓD . We define the post-processed LOD approximation as follows. (n)

(n)

Definition 6.4 (Post-processed eigenvalue LOD approximation). Let (λH , uLOD ) ∈ R × Vh,ΓD (with 0 ≤ n < NH ) denote the eigenpair approximations obtained with the (n) (n) LOD as stated in Definition 6.1. We call (λH,post , uLOD,post ) ∈ R × Vh,ΓD the corresponding post-processed approximations if uLOD,post ∈ Vh,ΓD solves Z (n) (n) (n) A(uLOD,post , vh ) = λH uLOD vh for all vh ∈ Vh,ΓD Ω

and where we define

(n)

(n)

λH,post :=

(n)

A(uLOD,post, uLOD,post ) (n)

kuLOD,post k2L2 (Ω)

.

Observe that the post-processing step involves to solve an additional linear elliptic problem in the full fine space Vh,ΓD . Before discussing the feasibility of this step, we present a corresponding a priori error estimate. (n)

(n)

Theorem 6.5. Let (λH , uLOD ) ∈ R × Vh,ΓD (with 0 ≤ n < NH ) denote the LOD (n) (n) approximations as in Definition 6.1 and let (λH,post , uLOD,post ) ∈ R × Vh,ΓD denote the post-processed LOD approximations as in Definition 6.4. Then it holds (n)

(n)

(n)

(n)

(n)

(n)

(n)

(n)

|λH,post − λh | ≤ C(λH − λh )2 + C(λh )2 kuLOD − uh k2L2 (Ω)

kuLOD,post −

(n) uh kH 1 (Ω)



(n) C|λH



(n) λh | +

(n) (n) Cλh kuLOD

and

(n) − uh kL2 (Ω) .

(n)

Consequently, we obtain that the eigenvalue λH,post converges at least with order O(H 8 ) (n)

(n)

(n)

to λh and that the H 1 -error between uLOD,post and uh order O(H 4 ).

converges to zero at least with

In view of Theorem 6.5 we can see that the LOD can be a powerful tool to tackle linear eigenvalue problems even if κ has no multiscale character. If the cost for solving a full linear system on the fine scale is still feasible, it can be highly efficient to apply the LOD with pre- and post-processing. The extremely high convergence rates in H

27 (at least O(H 8 ) if we are interested in the eigenvalues) allow to choose a very coarse grid TH . Depending on how coarse we choose TH , the truncation might be even skipped completely. First, we solve the corrector problems in a preprocessing step. This involves a number of linear elliptic fine scale problems that can be solved in parallel. After the correctors are available, we assemble the global LOD stiffness matrix ALOD H , which has a very low dimension. All operations of the chosen algebraic eigenvalue solver, only involve ALOD and can be hence performed quickly and sequential. Once the eigenpairs H are computed, we apply the postprocessing step, which only involves one global fine scale problem per eigenpair. Again, we can do this in parallel. With this approach, we can decrease the computational complexity. The implementation of pre- and post-processing is obvious, following the ideas presented in Section 4.

6.2

The Gross-Pitaevskii equation

Let ΓD = ∂Ω and ΓN = ∅. In this section, we consider the stationary Gross-Pitaevskii equation, which is given by the following nonlinear eigenvalue problem. We seek the minimal eigenvalue λ and a corresponding L2 -normalized eigenfunction u ∈ H01 (Ω) with −∇ · κ∇u + V u + β|u|2 u = λu u=0

in Ω, on ∂Ω.

(31)

In addition to the previous assumptions on κ and Ω, we assume that V ∈ L2 (Ω) with V ≥ 0 and that β ≥ 0 is a constant. Under these assumptions there exists a unique weak solution of the Gross-Pitaevskii equation (cf. [5]), i.e. there exists a unique u ∈ H01 (Ω) such that u ≥ 0 a.e. in Ω, kukL2 (Ω) = 1, and E(u) =

inf

E(v),

(32)

v∈H01 (Ω) kvkL2 (Ω) =1

where the energy functional E :H01 (Ω)→R is given by Z Z Z 1 1 1 κ∇v · ∇v + V v2 + β|v|4 E(v) := 2 Ω 2 Ω 4 Ω

for v ∈ H01 (Ω).

The solution u of (32) is called the ground state solution and λ is called the corresponding ground state eigenvector. A typical application of equation (32) is the simulation of so called Bose-Einstein condensation (cf. [36]). In comparison to the previously considered examples, we typically have κ = 1 in (31). Hence, the problem is not necessarily a multiscale problem. Multiscale features in u, as far as they exist, are in general triggered by an interaction between the potential V and the scattering constant β. In the following, we use the notation Z (κ∇v · ∇w + V vw) for v, w ∈ H01 (Ω) B(v, w) := Ω

for the bilinear form that describes the linear part of the Gross-Pitaevskii equation. A fine scale reference solution is given by uh ∈ Vh,ΓD with (uh , 1)L2 (Ω) ≥ 0, kuh kL2 (Ω) = 1 and E(uh ) =

inf

vh ∈Vh,ΓD

E(vh ).

kvh kL2 (Ω) =1

The corresponding eigenvalue is given by λh := 2E(uh ) + 2−1 βkuh k4L4 (Ω) .

(33)

28 6.2.1

LOD approximation of the Gross-Pitaevskii eigenvalue problem

We start with introducing the LOD for solving problem (32), where we require a slight modification of the local correctors in Section 4.1. For that purpose we define for any subdomain ω ⊂ Ω the localized bilinear form Z (κ∇v · ∇w + V vw) for v, w ∈ H 1 (ω). Bω (v, w) := ω

Definition 6.6 (LOD approximation for the Gross-Pitaevskii equation). For a given positive k ∈ N and for a coarse function ΦH ∈ VH,ΓD , the correction operator Qh : VH,ΓD → Vh,ΓD is given by X Qh (ΦH ) := QK h (ΦH ), K∈TH

where QK h (Φh ) ∈ Wh (Uk (K)) (for K ∈ TH ) is the solution of BUk (K) (QK h (ΦH ), wh ) = −BK (ΦH , wh )

(34)

for all wh ∈ Wh (Uk (K)). We denote Rh (ΦH ) := ΦH +Qh (ΦH ). We call uLOD = Rh (uH ) with uH ∈ VH,ΓD , (uLOD , 1)L2 (Ω) ≥ 0 and kuLOD kL2 (Ω) = 1 an LOD approximation of (32) if it minimizes E in the sense that E(uLOD ) =

inf

ΦH ∈VH,ΓD

E(Rh (ΦH )).

(35)

kRh (ΦH )kL2 (Ω) =1

The corresponding approximation of the ground state eigenvalue is given by λLOD := 2E(uLOD ) + 2−1 βkuLOD k4L4 (Ω) . Problem (35) is well-posed in the sense the sense that there exists at least one minimizer of (35) with the desired properties (cf. [5]). However, in contrast to the continuous problem, the minimizer is not necessarily unique. As for the linear eigenvalue problems, a post-processing step can be applied. Definition 6.7 (Post-processed LOD approximation). Let uLOD ∈ Vh,ΓD and λLOD ∈ R>0 denote LOD approximations as characterized in Definition 6.6. The corresponding post-processed LOD approximation is given by uLOD,post ∈ Vh,ΓD with Z uLOD vh − β|uLOD |2 uLOD vh B(uLOD,post, vh ) = λLOD Ω

for all vh ∈ Vh,ΓD . We define the corresponding post-processed approximation of the eigenvalue by . λLOD,post := (2E(uLOD,post ) + 2−1 βkuLOD,post k4L4 (Ω) )kuLOD,post k−2 L2 (Ω) We obtain the following error estimates for the LOD approximations, respectively for the post-processed LOD approximations (cf. [20]). Theorem 6.8. Let (u, λ) ∈ H01 (Ω) × R denote the ground state eigenpair; (uh , λh ) ∈ Vh,ΓD × R a reference solution according to (33); (uLOD , λLOD ) an LOD approximation

29 and (uLOD,post , λLOD,post ) a corresponding post-processed LOD approximation. Then the following error estimates hold for sufficiently small h  ku − uLOD kH 1 (Ω) ≤ C H 2 + ku − uh kH 1 (Ω) ,  |λ − λLOD | + ku − uLOD kL2 (Ω) ≤ C H 3 + H ku − uh kH 1 (Ω) ,  ku − uLOD,post kH 1 (Ω) ≤ C H 3 + ku − uh kH 1 (Ω) ,  |λ − λLOD,post | + ku − uLOD,post kL2 (Ω) ≤ C H 4 + CL2 (h, H) ,

where constant CL2 (h, H) behaves roughly like H 2 ku − uh kH 1 (Ω) (cf. [20] for details).

We observe that the guaranteed convergence rates do not fully reach the potential of the linear eigenvalue problem, however, the numerical experiments presented in [20] indicate the above error estimates are not optimal and that the observed rates are comparable to the ones of the linear eigenvalue problem. 6.2.2

Correction matrix

Let us briefly introduce the correction matrix Qh ∈ RNH ×Nh that can be associated with the correctors introduced in Definition 2.4. The derivation of the correction matrix is analogous to the case without the potential/reaction term. We fix Kℓ ∈ TH and recall that we denote by Φp0 (ℓ) , · · · , Φpcd −1 (ℓ) the coarse basis

Kℓ ℓ functions that have a support on Kℓ . We define wℓ,i := QK h (Φpi (ℓ) ), where Qh is the local corrector defined in (34). If Zpi (ℓ) ∈ ∂Ω, we set wℓ,i := 0. With that, we can define the local correction matrix wℓ ∈ RNℓ,H ×Nℓ,h such that Nℓ,h −1

wℓ,i =

X

wℓ [i][j] φℓ,j .

j=0

The global correction matrix Qh ∈ RNH ×Nh is now given by X ⊤ h Qh := (TH ℓ ) wℓ Rℓ .

(36)

Kℓ ∈TH

6.2.3

Energy minimization by optimal damping

Once the corrector matrix Qh is assembled, there exist various iterative schemes for finding a minimizer of problem (35). In the following, we restrict ourselves to the Optimal Damping Algorithm (ODA) by Canc`es and Le Bris [6, 4] since it can be easily combined with the LOD approach. The algorithm requires to solve a linear eigenvalue problem in each iteration step. However, these linear eigenvalue problems involve an LOD-type system matrix and are hence of very low dimension and therefore cheap to solve. The ODA is based on reinterpreting the original minimization problem as a minimization problem in a space of bounded self-adjoint operators with trace 1. In this rewritten setting the ODA can be seen as a steepest descent algorithm (0) with an optimal step. In particular, starting from an initial density ρ(0) = |uw |2 , 1 the algorithm iteratively computes directions ρ(ν− 2 ) and corresponding optimal step 1 parameters α(ν) ∈ [0, 1] to update ρ(ν+1) := (1 − α(ν) )ρ(ν) + α(ν) ρ(ν− 2 ) . This results in a limit density that is a convex combination of the previous ones. We start with describing the algorithm for general finite dimensional subspaces of H01 (Ω) and apply it later on to our specific scenario.

30 Let δTOL denote a given tolerance and let W ⊂ H01 (Ω) denote a finite dimensional space. We consider the discrete problem to find uw ∈ W with (1, uw ) ≥ 0, kuw kL2 (Ω) = 1 and E(uw ) =

E(w).

inf

(37)

w∈W kwkL2 (Ω) =1

(0)

As a initial guess, we choose uw ∈ W to be the ground state of B(·, ·) in W , i.e. (0) (0) kuw kL2 (Ω) = 1 and uw minimizes B(v, v) under all v ∈ W with kvkL2 (Ω) = 1. Accord(0)

(0)

(0)

(0)

(0)

ingly, we define ρ(0) := |uw |2 , B (0) := B(uw , uw ) and d(0) := B (0) +β(|ρ(0) |uw , uw )L2 (Ω) . With this, the Optimal Damping Algorithm is given as follows (c.f. [10]): Optimal Damping Algorithm. (ν)

(i) For ν ≥ 1 solve for the ground state eigenpair uw ∈ W and λ(ν) ∈ R>0 with (ν) (ν) kuw kL2 (Ω) = 1, (1, uw )L2 (Ω) ≥ 0 and (ν−1) (ν) B(u(ν) |uw , w)L2 (Ω) = λ(ν) (u(ν) w , w) + β(|ρ w , w)L2 (Ω) 1

for all w ∈ W.

(ν)

(ii) Set ρ(ν− 2 ) := |uw |2 which characterizes the steepest descent direction and compute the values 1

(ν) B (ν− 2 ) := B(u(ν) w , uw ), 1

1

(ν) d(ν− 2 ) := B (ν− 2 ) + β(|ρ(ν−1) |u(ν) w , uw )L2 (Ω)

λ(ν) := B

(ν− 12 )

+ β(|ρ

(ν− 12 )

and

(ν) |u(ν) w , uw )L2 (Ω) .

(iii) Set the optimal step parameter α(ν) ∈ [0, 1] by 1 α(ν) := arginf {s(ν) t + c(ν) t2 | t ∈ [0, 1]}, 2 1

1

1

where s(ν) := d(ν− 2 ) − d(ν−1) and c(ν) := d(ν−1) + λ(ν) − 2d(ν− 2 ) + B (ν− 2 ) − B (ν−1) . (iv) Evaluate the energy functional and update the values by computing: E

(ν)

 1  (ν−1) := B + d(ν−1) + α(ν) s(ν) + 2

α(ν) √ 2

!2

c(ν) ,

1

ρ(ν) := (1 − α(ν) )ρ(ν−1) + α(ν) ρ(ν− 2 ) 1

B (ν) := (1 − α(ν) )B (ν−1) + α(ν) B (ν− 2 )

and d(ν) := 2E (ν) − B (ν) .

(ν) (v) Check if Es (ν) > δTOL . If yes, break the algorithm, if no ν 7→ ν + 1 and start again with (i). (ν)

The approximations uw produced by the ODA are known to rapidly converge to a solution uw of the discrete minimization problem (37) (c.f. [10] and [4] for a proof in the setting of the Hartree-Fock equations).

31 6.2.4

Realization

In this section we discuss a possible realization of the LOD for the Gross-Pitaevskii equation. We distinguish between pre-processing, main computation and post-processing. In the main computation we follow the ODA from the previous section. Pre-processing. 1. As for linear elliptic problems we need to generate Th and TH and we need to H H assemble Ph , Ah , Mh , Ch , Rhℓ , RH ℓ , Tℓ , Aℓ , Mℓ and B . 2. Compute the matrix MV,h ∈ RNh ×Nh with entries MV,h [i][j] := (V φj , φi )L2 (Ω) . The matrix should be assembled from local element contributions. N ×N 3. Compute the tensor Mβ ∈ RNh ×Nh h h where Mβ [i][j] ∈ RNh ×Nh is the matrix Z   β β βφi φj φm φn . M [i][j] [m][n] := M [i][j][m][n] := Ω

Just like the mass matrix Mh it can be also assembled from local element contributions. Observe that Mβ is extremely sparse and can be hence treated accordingly. N ×N 4. Compute the tensor MβH ∈ RNH ×NH h h by MβH [i][j] := BH (Ph + Qh )(Mβ [i][j])(Ph + Qh )⊤ BH .

5. Compute the correction matrix Qh ∈ RNH ×Nh via (36). 6. Compute the LOD system matrix ALOD ∈ RNH ×NH (associated with the linear H part of the problem) by ALOD := BH (Ph + Qh )(Ah + MV,h )(Ph + Qh )⊤ BH H and analogously the mass correction matrix LOD MH := BH (Ph + Qh )Mh (Ph + Qh )⊤ .

Main computation. (0)

(0)

1. Solve for uH ∈ RNH and minimal λH ∈ R such that (0)

(0)

(0)

LOD ALOD H uH = λH MH uH

(0)

and

(0)

(0)

LOD uH = 1. (uH )⊤ MH

(0)

2. Compute B (0) := (uH )⊤ ALOD H uH ∈ R. 3. Compute the (sparse) density matrix ρ(0) ∈ RNH ×NH with the entries (0)

(0)

ρ(0) [i][j] := (uH )⊤ (MβH [i][j]) uH . Compute d(0) ∈ R by (0)

(0)

d(0) := B (0) + (uH )⊤ (Ph + Qh )ρ(0) (Ph + Qh )⊤ uH .

32 4. Loop. For ν ≥ 1. (0)

(ν)

(i) Solve for uH ∈ RNH and minimal λH ∈ R such that (ν)

(ν)

(ν)

LOD ALOD H uH = λH MH uH ,

(ν)

(ν)

(ν)

LOD LOD uH = 1. 1 ≥ 0 and (uH )⊤ MH and with the constraints (uH )⊤ MH 1

(ii) Compute ρ(ν− 2 ) ∈ RNH ×NH with the entries 1

(ν)

(ν)

ρ(ν− 2 ) [i][j] := (uH )⊤ (MβH [i][j]) uH . Compute 1

(ν)

(ν)

B (ν− 2 ) := (uH )⊤ ALOD H uH , 1

1

(ν)

1

(ν)

(ν)

d(ν− 2 ) := B (ν− 2 ) + (uH )⊤ (Ph + Qh )ρ(ν−1) (Ph + Qh )⊤ uH 1

(ν)

λ(ν) := B (ν− 2 ) + (uH )⊤ (Ph + Qh )ρ(ν− 2 ) (Ph + Qh )⊤ uH .

(iii) Compute 1

s(ν) := d(ν− 2 ) −d(ν−1)

1

1

and c(ν) := d(ν−1) +λ(ν) −2d(ν− 2 ) +B (ν− 2 ) −B (ν−1) .

Set 1 α(ν) := arginf {s(ν) t + c(ν) t2 | t ∈ [0, 1]}. 2 (iv) Compute E (ν)

 1  (ν−1) := B + d(ν−1) + α(ν) s(ν) + 2

α(ν) √ 2

!2

c(ν) ,

1

ρ(ν) := (1 − α(ν) )ρ(ν−1) + α(ν) ρ(ν− 2 ) 1

B (ν) := (1 − α(ν) )B (ν−1) + α(ν) B (ν− 2 ) and d(ν) := 2E (ν) − B (ν) . (ν) (v) If Es (ν) > δTOL , abort the loop, else continue in (i) with ν 7→ ν + 1. (ν)

5. Compute uLOD ∈ RNh by uLOD := (Ph + Qh )⊤ BH uH and set λLOD := λ(ν) . Post-processing.

1. Let ν ∈ N be the last step from the main computation loop. Compute uLOD,post ∈ RNh via Bh (Ah + MV,h )uLOD,post

Define

⊤  1 (ν) (ν) = λ(ν) Mh (Ph + Qh )⊤ BH uH − (uH )⊤ (Ph + Qh )ρ(ν− 2 ) .

λLOD,post :=

(uLOD,post )⊤ (Ah + MV,h )uLOD,post + β

R PNh −1 Ω

i=0

uLOD,post[i]φi

(uLOD,post )⊤ Mh uLOD,post

where the integral term can be computed using the tensor Mβ .

4

,

33

References [1] A. Abdulle and P. Henning. Localized orthogonal decomposition method for the wave equation with a continuum of scales. ArXiv e-print 1406.6325, 2014. [2] A. Abdulle and P. Henning. A reduced basis localized orthogonal decomposition. J. Comput. Phys., 295:379–401, 2015. [3] D. L. Brown and D. Peterseim. A multiscale method for porous microstructures. ArXiv e-print 1411.1944, 2014. [4] E. Canc`es. SCF algorithms for HF electronic calculations. In Mathematical models and methods for ab initio quantum chemistry, volume 74 of Lecture Notes in Chem., pages 17–43. Springer, Berlin, 2000. [5] E. Canc`es, R. Chakir, and Y. Maday. Numerical analysis of nonlinear eigenvalue problems. J. Sci. Comput., 45(1-3):90–117, 2010. [6] E. Canc`es and C. Le Bris. Can we outperform the diis approach for electronic structure calculations? International Journal of Quantum Chemistry, 79(2):82– 90, 2000. [7] C. Carstensen. Quasi-interpolation and a posteriori error analysis in finite element methods. M2AN Math. Model. Numer. Anal., 33(6):1187–1202, 1999. [8] C. Carstensen and R. Verf¨ urth. Edge residuals dominate a posteriori error estimates for low order finite element methods. SIAM J. Numer. Anal., 36(5):1571– 1587 (electronic), 1999. [9] P. Cl´ement. Approximation by finite element functions using local regularization. Rev. Fran¸caise Automat. Informat. Recherche Op´erationnelle S´er. RAIRO Analyse Num´erique, 9(R-2):77–84, 1975. [10] C. M. Dion and E. Canc`es. Ground state of the time-independent Gross-Pitaevskii equation. Comput. Phys. Comm., 177(10):787–798, 2007. [11] D. Elfverson. A discontinuous Galerkin multiscale method for convection-diffusion problems. Uppsala University Preprint, 2014. [12] D. Elfverson, E. H. Georgoulis, and A. M˚ alqvist. An adaptive discontinuous Galerkin multiscale method for elliptic problems. Multiscale Model. Simul., 11(3):747–765, 2013. [13] D. Elfverson, E. H. Georgoulis, A. M˚ alqvist, and D. Peterseim. Convergence of a discontinuous Galerkin multiscale method. SIAM J. Numer. Anal., 51(6):3351– 3372, 2013. [14] D. Elfverson, V. Ginting, and P. Henning. On multiscale methods in petrov– galerkin formulation. Numerische Mathematik, 131(4):643–682, 2015. [15] A. Ern and J.-L. Guermond. Finite element quasi-interpolation and best approximation. ArXiv e-print 1505.06931, May 2015. [16] D. Gallistl and D. Peterseim. Stable multiscale Petrov-Galerkin finite element method for high frequency acoustic scattering. Comp. Meth. Appl. Mech. Eng., 295:1–17, 2015.

34 [17] F. Hellman, P. Henning, and A. M˚ alqvist. Multiscale mixed finite elements. to appear in Discrete and Continuous Dynamical Systems, 2015. [18] P. Henning and A. M˚ alqvist. Localized orthogonal decomposition techniques for boundary value problems. SIAM J. Sci. Comput., 36(4):A1609–A1634, 2014. [19] P. Henning, A. M˚ alqvist, and D. Peterseim. A localized orthogonal decomposition method for semi-linear elliptic problems. M2AN Math. Model. Numer. Anal., 48(5):1331–1349, 2014. [20] P. Henning, A. M˚ alqvist, and D. Peterseim. Two-Level Discretization Techniques for Ground State Computations of Bose-Einstein Condensates. SIAM J. Numer. Anal., 52(4):1525–1550, 2014. [21] P. Henning, P. Morgenstern, and D. Peterseim. Multiscale partition of unity. In M. Griebel and M. A. Schweitzer, editors, Meshfree Methods for Partial Differential Equations VII, volume 100 of Lecture Notes in Computational Science and Engineering, pages 185–204. Springer International Publishing, 2015. [22] P. Henning and D. Peterseim. Oversampling for the Multiscale Finite Element Method. SIAM Multiscale Model. Simul., 11(4):1149–1175, 2013. [23] T. J. R. Hughes. Multiscale phenomena: Green’s functions, the Dirichlet-toNeumann formulation, subgrid scale models, bubbles and the origins of stabilized methods. Comput. Methods Appl. Mech. Engrg., 127(1-4):387–401, 1995. [24] T. J. R. Hughes, G. R. Feij´oo, L. Mazzei, and J.-B. Quincy. The variational multiscale method—a paradigm for computational mechanics. Comput. Methods Appl. Mech. Engrg., 166(1-2):3–24, 1998. [25] T. J. R. Hughes and G. Sangalli. Variational multiscale analysis: the fine-scale Green’s function, projection, optimization, localization, and stabilized methods. SIAM J. Numer. Anal., 45(2):539–557, 2007. [26] M. G. Larson and A. M˚ alqvist. Adaptive variational multiscale methods based on a posteriori error estimation: energy norm estimates for elliptic problems. Comput. Methods Appl. Mech. Engrg., 196(21-24):2313–2324, 2007. [27] M. G. Larson and A. M˚ alqvist. An adaptive variational multiscale method for convection-diffusion problems. Comm. Numer. Methods Engrg., 25(1):65–79, 2009. [28] A. M˚ alqvist and A. Persson. Multiscale techniques for parabolic equations. ArXiv e-prints, Apr. 2015. [29] A. M˚ alqvist and D. Peterseim. Generalized finite element methods for quadratic eigenvalue problems. ArXiv e-print 1510.05792, Oct. 2015. [30] A. M˚ alqvist. Multiscale methods for elliptic problems. Multiscale Model. Simul., 9(3):1064–1086, 2011. [31] A. M˚ alqvist and D. Peterseim. Localization of elliptic multiscale problems. Math. Comp., 83(290):2583–2603, 2014. [32] A. M˚ alqvist and D. Peterseim. Computation of eigenvalues by numerical upscaling. Numer. Math., 130(2):337–361, 2015.

35 [33] D. Peterseim. Eliminating the pollution effect in Helmholtz problems by local subscale correction. ArXiv e-print 1411.7512, 2014. [34] D. Peterseim and M. Schedensack. Relaxing the CFL condition for the wave equation on adaptive meshes. ArXiv e-print 1601.04812, 2016. [35] D. Peterseim and R. Scheichl. Robust Numerical Upscaling of Elliptic Multiscale Problems at High Contrast. ArXiv e-print 1601.06549, Jan. 2016. [36] L. P. Pitaevskii and S. Stringari. Bose-Einstein Condensation. Oxford University Press, Oxford, 2003. [37] L. R. Scott and S. Zhang. Finite element interpolation of nonsmooth functions satisfying boundary conditions. Math. Comp., 54(190):483–493, 1990. [38] J. Xu and A. Zhou. A two-grid discretization scheme for eigenvalue problems. Math. Comp., 70(233):17–25, 2001.