1 Introduction

The a posteriori error analysis is a powerful tool to improve the quality of approximated solutions of a model of partial differential equations. The estimates obtained in this context allow us to perform a self-adaptation of the mesh and to reach a desired accuracy, via a fixed tolerance. The norm of the error is bounded by estimators which depend only on the mesh size, the data, the approximated solution, and which are explicitly computable. The pioneering work of the a posteriori error estimates, in the context of finite-element method, was done by Babu\(\check{s}\)ka and Rheinbolt in 1978 (see Babuška et and Rheinboldt 1978a, b).

In this work, we are interested in the methods of multi-scale finite element (MsFEM) treated in Carballal Perdiz (2010), Efendiev and Hou (2009), Hou and Wu (1997), Lozinski et al. (2013), and Ahmed Blal (2014). Generally, this method is based on two main ingredients: building multi-scale local basis functions on a coarse mesh \(\mathcal {T}_{H}\), and coupling them with a global variational formulation on a fine mesh \(\mathcal {T}_{h}\), providing an accurate approximation of the solution. Multi-scale basis functions are designed to capture the characteristics of the multi-scale solution and contain information on small scales. They are built from those of standard finite element in the coarse mesh, such that they have the same support and satisfy the equation \(\mathbf {L}\,\phi = 0\) on each element of \(\mathcal {T}_{H}\), where \(\mathbf {L}\) is the principal operator in the model. There are also variants of MsFEM: MsFVM (“multi-scale finite volume method”, see Lee et al. 2002), MsMFEM (“multi-scale mixed finite-element method”, see Chen and Hou 2003), MsFVEM (“multi-scale finite volume element method”, see Hou 2009), and DG-MsFEM (“discontinuous Galerkin multi-scale finite-element method”, see Efendiev and Hou 2009).

In this work, we develop a posteriori error estimates for finite-element multi-scale method for a diffusion problem with a mesh adaptation. For this, as in the construction of the method, we will develop estimates for the overall solution related to the coarse mesh and couple these estimates with those related to the fine mesh. In Aarnes and Efendiev (2006), we find adaptive techniques for a Finite Volume Multi-scale method based on indicators on some physical criteria. In Abdulle and Nonnenmacher (2011), the authors give residual type indicators for homogenization problems. In Henning et al. (2014), we find a residual error estimate for another type of MsFEM, that is a Petrov–Galerkin MsFEM with over-sampling. In this method, the finite-dimensional “coarse-scale” subspace and the continuous fine-scale space are defined through a projection operator from \(H^1_0(\varOmega )\), and the authors use a reconstruction operator and a corrector operator to define the discrete problem. The a posteriori estimates are on the error between the exact solution and the reconstructed discrete one, and the indicators are expressed with these operators. There are three types of indicators. The first one is related to the coarse mesh and is similar to one of ours. The second is based on the jump of the fluxes through the inter-element of the fine mesh and the last one is retard the over-sampling.

2 Formulations

Let \(\varOmega \subset {\mathbb {R}}^{2}\) be a bounded polygonal domain with a Lipschitz-continuous boundary \(\varGamma =\partial \varOmega \). We use the standard space \({\mathbb {L}}^2(\varOmega )\) equipped with the usual norm \(\Vert \cdot \Vert _0\), together with the Sobolev space \({\mathbb {H}}^1(\varOmega )\) of functions in \({\mathbb {L}}^2(\varOmega )\), such that their first derivatives (in distribution sense) belong to \(\mathbb L^2(\varOmega )\), equipped with the norm \(\Vert v\Vert _1:=\left( \Vert v\Vert _0^2+\Vert \nabla v\Vert _0\right) ^{1/2}\). As usual, \({\mathbb {H}}^1_0(\varOmega )=\{v\in H^1(\varOmega )\;/\;v=0 \text{ on } \varGamma \}\) is equipped with the norm \(|v|_1:=\Vert \nabla v\Vert _0\).

We consider the diffusion problem associated with the operator \(\mathbf {L}v:=-\text{ div } (\nu \nabla v)\) defined by:

$$\begin{aligned} \left\{ \begin{array}{ll} \text{ find } \ {u}\in {\mathbb {V}} ,\\ a({u},v)=F(v), \ \forall \ v\in {\mathbb {V}}, \end{array} \right. \end{aligned}$$
(1)

where \( {\mathbb {V}}= {\mathbb {H}}^{1}_{0}(\varOmega )\), \(a(u,v)=\displaystyle \int _{\varOmega }\nu \nabla u\cdot \nabla vdx\) and \(F(v)=\displaystyle \int _{\varOmega }fv dx\), for all u and v in \({\mathbb {V}}\). We assume that \(f\in {\mathbb {L}}^2(\varOmega )\), \(\nu \in {\mathbb {C}}^{0,1}(\varOmega ) \), the space of Lipschitz-continuous functions, and there exist two positive constants \(\nu _m\) and \(\nu _M\) satisfying:

$$\begin{aligned} \forall x\in \varOmega ,\ \ 0<\nu _m\le \nu (x)\le \nu _M. \end{aligned}$$

Let us note that \(\nu \in {\mathbb {L}}^{\infty }(\varOmega )\) is sufficient to have the existence and uniqueness of the solution in \(H_0^1(\varOmega )\), but for the need of the a posteriori error analysis, we assume more regularity for \(\nu \).

We denote by \(\left| \cdot \right| _{\nu }\) the energy norm defined by:

$$\begin{aligned} |v|^{2}_{\nu }:=\int _{\varOmega }\nu |\nabla u|^2\mathrm{d}x. \end{aligned}$$

If D is a subset of \(\varOmega \), we use the notation:

$$\begin{aligned} |v|^{2}_{\nu ,D}:=\displaystyle \int _{D}\nu |\nabla u|^2\mathrm{d}x, \end{aligned}$$

and also the following notations:

$$\begin{aligned} {\underline{\nu }}_D=\inf _{x\in D}\nu (x),\quad {\overline{\nu }}_D=\sup _{x\in D}\nu (x). \end{aligned}$$
(2)

We remark that:

$$\begin{aligned} |v|_{1,D}\le \frac{1}{{\underline{\nu }}_D^{1/2}}|v|_{\nu ,D}. \end{aligned}$$
(3)

The existence and uniqueness of the solution of (1) are obtained using the Lax–Milgram theorem.

In many applications, the coefficient \(\nu \) may present a highly oscillatory character. To obtain the large-scale solutions accurately and efficiently without resolving the small-scale details, we will use a Multi-scale Finite-Element Method (MsFEM) (see Babuška and Osborn 1983; Carballal Perdiz 2010; Efendiev and Hou 2009; Hou and Wu 1997; Lozinski et al. 2013; Ahmed Blal 2014), an approach that captures the multi-scale structure of the solution. Let \(\mathcal {T}_{H}\) a regular mesh of \(\varOmega \):

$$\begin{aligned} \overline{\varOmega }=\bigcup _{K\in \mathcal {T}_{H}}K, \end{aligned}$$

where \(H=\max _K H_K\) and \(H_K\) is the diameter of the element K. We denote by \({{\mathcal {N}}}_H\) and \(\mathcal {E}_{H}\), respectively, the set of all internal nodes \(x_i\) for \(i=1,2,\ldots , N_H\), and the set of all edges \(E_i\) for \(i=1,2,\ldots , N_E\) of \(\mathcal {T}_{H}\), excluding the edges on the boundary \(\partial \varOmega \). The first-order standard finite-element space based on \(\mathcal {T}_{H}\) and approximating \({\mathbb {V}}\) is denoted by \({\mathbb {P}}_1({{\mathcal {T}}}_H)\) and defined by:

$$\begin{aligned} {\mathbb {P}}_1({{\mathcal {T}}}_H):=\{v_H\in C^0({\bar{\varOmega }})\,/\,v_{H|_K}\in {\mathbb {P}}_1(K),\forall K\in {{\mathcal {T}}}_H, (v_H)_{|\varGamma }=0\}\subset {\mathbb {V}}, \end{aligned}$$

where \({\mathbb {P}}_1(K)\) and \({\mathbb {P}}_1(E)\)) are the spaces of polynomial functions with degree \(\le 1\) in K and E, respectively. As usual, the basis functions \(\{\psi _H^i\}_{i=1}^N\) associated with \( {\mathbb {P}}_1({{\mathcal {T}}}_H)\) satisfy \(\{\psi _H^i\}(x_j)=\delta _{ij}\), and the support of \(\{\psi _H^i\}\), denoted by \(\omega _i\), is the union of the \(\beta _i\) elements \(K_{i,d}\), such that \(x_i\) is one of their vertices:

$$\begin{aligned} \omega _i=\bigcup ^{\beta _i}_{d=1}K_{i,d}. \end{aligned}$$

The multi-scale basis functions are defined (see Efendiev and Hou 2009; Hou and Wu 1997), for \(i=1,\ldots , N_H\), as the function \({\varPhi ^{i}_{H}}\in {\mathbb {H}}^{1}(\omega _i)\) satisfying the following problems, for \(d=1,\ldots ,\beta _i\):

$$\begin{aligned} \left\{ \begin{array}{rll} \mathbf {L}_{K_{i,d}}{\varPhi ^{i}_{H}}&{}=0&{} \text{ in } K_{i,d}, \\ \varPhi ^{i}_{H} &{}= \psi _H^i &{} \text{ on } \partial K_{i,d}, \end{array} \right. \end{aligned}$$
(4)

with the notation \(\mathbf {L}_{K}:=\mathbf {L}|_{K}\). The Multi-scale Finite-Element (MsFEM) space adapted to the operator \(\mathbf {L}\) is then defined by:

$$\begin{aligned} {\mathbb {V}}_{H}= & {} \mathbb Span\left\{ \varPhi ^{i}_{H},\ i=1,...,\mathcal {N}_H\right\} \\= & {} \left\{ v_{H}\in {\mathbb {C}}^{0}(\varOmega )\cap {\mathbb {H}}^{1}_{0}(\varOmega ),\ \text{ such } \text{ that } \ \mathbf {L}_Kv_{H}=0 \right. \\&\left. \text{ in } K,\ \forall \ K\in \mathcal {T}_{H}, \ \left. \text{ and } v_{H}\right| _{E}\in {\mathbb {P}}_1(E),\ \forall E\in \mathcal {E}_{H}\right\} . \end{aligned}$$

The MsFEM approximation of the problem (1) is now given by:

$$\begin{aligned} \left\{ \begin{array}{ll} \text{ find } \ u_{H}\in {\mathbb {V}}_{H},\\ a(u_{H},v_{H})=F(v_{H}), \ \forall \ v_{H}\in {\mathbb {V}}_{H}\ . \end{array} \right. \end{aligned}$$
(5)

To determine the multi-scale basis functions, we have now to solve the problems (4). To do so, we consider a new finer mesh. For each \(K\in \mathcal {T}_{H}\), we consider a regular conforming mesh \(\mathcal {T}_{h}(K)\) all independently, and define \(\mathcal{T}_h\) as the overall fine mesh:

$$\begin{aligned} K=\bigcup _{T\in \mathcal {T}_{h}(K)}T\qquad \text{ and } \qquad \mathcal {T}_{h}=\bigcup _{K\in \mathcal {T}_{H}}\mathcal {T}_{h}(K). \end{aligned}$$
(6)

Let us note that each \(\mathcal {T}_{h}(K)\) is a conforming mesh, but the global mesh can be non-conforming one.

We denote by \({{\mathcal {E}}}_h(K)\) the set of all edges of \(\mathcal {T}_{h}(K)\) and by \({{\mathcal {E}}}_h\) the set of all edges of \(\mathcal {T}_{h}\) excluding the edges on the boundary \(\partial \varOmega \). The edges from \(\mathcal {E} _{h}\) can be divided into two groups: those forming the boundary of coarse triangles and thus constituting the coarse mesh edges (denoted by \( \mathcal {E}_{H}\)) and those internal for some triangles \(K\in \mathcal {T}_{H}\) forming the set \(\mathcal {E}_{h}^0(K)\). In the sequel, we need also the following notations. For any \(E\in \mathcal {E}_{H}\), we denote by \(K_{1}(E)\) and \(K_{2}(E)\), the two coarse adjacent triangles, such that \(E=K_1(E)\cap K_2(E)\). Let, moreover, \(\mathcal {T} _{h}^{b}(E)\) be the set of the triangles of both fine meshes \(\mathcal {T}_{h}(K_{1})\) and \(\mathcal {T}_{h}(K_{2})\) that touch E. We define also \(\mathcal {E}_{h}^{b}(E)\) as the set of internal edges of both fine meshes \(\mathcal {T}_{h}(K_{1})\) and \(\mathcal {T}_{h}(K_{2})\) that touch E and are not in E. For \(i=1,\ldots , N_H\), the sets \(\omega _i\) are also the supports of the multi-scale basis functions \(\varPhi _H^i\) and we put:

$$\begin{aligned} \begin{array}{l} {\mathbb {P}}_H^1(\omega _i):=\{v^h\in C^0(\bar{\omega }_i)\,/\, v^h|_E\in P_1(E),\,\forall E\in \mathcal {E}_{H}\cap \overline{\omega _i},\\ \qquad \qquad \qquad \qquad \qquad v^h|_T\in {\mathbb {P}}_1(T), \text{ and } v^h_{|\partial T\cap \varGamma }=0,\;\forall T\in \mathcal{T}_h\cap \omega _i\}. \end{array} \end{aligned}$$

The approximated multi-scale function is \(\varPhi _{h,H}^i\in \mathbb P_H^1(\omega _i) \), such that the restriction on \(K_{id}\), \({\varPhi ^{i,d}_{h,H}}:={\varPhi ^{i}_{h,H}}|_{K_{id}}\), for \(d=1,\ldots ,\beta _i\), is the solution in \({{\mathbb {P}}}_1({\mathcal T}_h(K_{i,d}))\), of the problem:

$$\begin{aligned} \left\{ \begin{array}{rll} &{}&{}a_K(\varPhi ^{i,d}_{h,H},v^{h}_{H})=0,\forall \ v^{h}_{H}\in {\mathbb {V}}_0^h(K_{i,d}), \\ &{}&{} \left. \varPhi ^{i,d}_{h,H}\right| _{\partial K_{i,d}} =\left. \psi ^{i}_{H}\right| _{\partial K_{i,d}}, \end{array} \right. \end{aligned}$$
(7)

with the notations \(\displaystyle a_K(u,v)= \int _{K}\nu \nabla u\cdot \nabla v\), and for \(K\in {{\mathcal {T}}}_{H}\):

$$\begin{aligned} {\mathbb {V}}_0^h(K):={{\mathbb {P}}}_1({{\mathcal {T}}}_h(K))\cap \mathbb H_0^1(K). \end{aligned}$$
(8)

We define the MsFEM discrete space by:

$$\begin{aligned} {\mathbb {V}}_{H}^{h}= & {} \mathbb Span\left\{ \varPhi ^{i}_{h,H},\ i=1,...,\mathcal {N}_H\right\} \nonumber \\= & {} \left\{ v^{h}\in C^{0}(\overline{\varOmega }), \text{ such } \text{ that } \ a_{K}(v^{h},w^{h})=0,\ \forall \ w^{h}\in {\mathbb {V}}_0^h(K), \right. \nonumber \\&\displaystyle \left. \ \ \ \ \ \ \ \forall \ K\in \mathcal {T}_{H}, \ \left. v^{h}\right| _{E}\in {\mathbb {P}}_{1}(E),\ \forall E\in \mathcal {E}_{H}\right\} \cap {\mathbb {H}}^{1}_{0}(\varOmega ), \end{aligned}$$
(9)

and the discrete MsFEM approximation of the problem (1) is defined by:

$$\begin{aligned} \left\{ \begin{array}{ll} \text{ find } \ u_{H}^{h}\in {\mathbb {V}}_{H}^{h},\\ a(u_{H}^{h},v_{H}^{h})=F(v_{H}^{h}), \ \forall \ v_{H}^{h}\in {\mathbb {V}}_{H}^{h}\ . \end{array} \right. \end{aligned}$$
(10)

The multi-scale solution \(u^{h}_{H}\) of the global discrete problem (10) is therefore written as a linear combination of multi-scale basis functions:

$$\begin{aligned} u^{h}_{H}=\sum ^{\mathcal {N}_H}_{i=1}\alpha _{i}\varPhi ^{i}_{h,H}. \end{aligned}$$

As in Carballal Perdiz (2010) and Lozinski (2010), we can prove the following a priori error estimate.

Proposition 1

Let u be the solution of (1) and \(u^{h}_{H}\) be the solution of (10).

We have the following error estimate:

$$\begin{aligned} |u-u_H^{h}|_{\nu }\le \inf _{\varphi _H\in \mathbb V_L}|u-\varphi _H|_\nu +\inf _{w_H^h\in {\mathbb {V}}^{h}_{H}}|u_H-w_H^h|_\nu +\frac{C_0}{\sqrt{\nu _{m}}}H\Vert f\Vert _{0}. \end{aligned}$$
(11)

where \({\mathbb {V}}_L:= \left\{ v\in H^{1}_{0}(\varOmega ) \text{ such } \text{ that } \forall E\in \mathcal {E}_{H} \ v\left| _{E}\right. \text{ is } \text{ linear } \right\} \), and \(C_0\) be a constant which depends only on the geometry of K.

Proof

Since \({\mathbb {V}}^{h}_{H}\subset H_0^1(\varOmega )\), \(u-u_H^h\) satisfies the orthogonality condition \(a(u-u_H^h,w_H^h)=0\) for all \(w_H^h\in {\mathbb {V}}^{h}_{H}\). Hence, we have:

$$\begin{aligned} |u-u_H^h|_\nu\le & {} |u-w_H^h|_\nu \\\le & {} |u-u_H|_\nu + |u_H-w_H^h|_\nu ,\quad \forall w_H^h\in {\mathbb {V}}^{h}_{H}. \end{aligned}$$

In the other hand, since \({\mathbb {V}}_{H}\) is also a subspace of \(H_0^1(\varOmega )\), by Cea’s Lemma, we have:

$$\begin{aligned} |u-u_{H}|_{\nu }\le |u-v_{H}|_{\nu },\qquad \forall v_{H}\in {\mathbb {V}}_{H}. \end{aligned}$$

Let \(\varphi _{H}^{u}\in {\mathbb {V}}_{L}\) be the energy norm-projection of u in \({\mathbb {V}}_{L}\), and \(v_{H}\in \mathbb V_{H}\) such as \(v_{H}\left| _{\mathcal {E}_{H}}=\varphi _{H}^{u}\right| _{\mathcal {E}_{H}}\), and then, for all \(K\in {{\mathcal {T}}}_{H}\), the local error \(e_K=\varphi ^{u}_H|_K-v_{H}|_K\), which is in \({\mathbb {H}}_0^1(K)\), satisfies the problem:

$$\begin{aligned} \left\{ \begin{array}{rll} &{}&{}\mathbf {L}_Ke_K=f|_K,\quad \text{ on } \;K,\\ &{}&{} e_K\qquad =0\quad \qquad \text{ on } \;\partial K, \end{array} \right. \end{aligned}$$
(12)

and by applying the Poincaré’s inequality and (3):

$$\begin{aligned} \Vert e_K\Vert _{0,K}\le C(K)\frac{1}{\sqrt{\underline{\nu }\,_K}}|e_K|_{\nu ,K}, \end{aligned}$$
(13)

where C(K) is the Poincaré’s constant in K which can be written as \(C(K)=C_0H_K\), where \(C_0\) depends only on the geometry of K and is independent of \(H_K\), its diameter.

By the problem (12), we deduce:

$$\begin{aligned} |e_K|_{\nu ,K}^2\le \Vert f|_K\Vert _{0,K}\Vert e_K\Vert _{0,K}\le \Vert f|_K\Vert _{0,K} \frac{C_0}{\sqrt{\underline{\nu }\,_K}}H_K|e_K|_{\nu ,K}, \end{aligned}$$

and so:

$$\begin{aligned} |e|_\nu \le \frac{C_0}{\sqrt{\nu _m}} H \Vert f\Vert _{0}, \end{aligned}$$

where \(H=\max _KH_K.\)

We obtain finally:

$$\begin{aligned} |u-u^{h}_{H}|_{\nu }\le & {} |u-u_{H}|_{\nu }+\inf _{w_H^h\in {\mathbb {V}}^{h}_{H}}|u_H-w_H^h|_\nu ,\\\le & {} |u-\varphi _{H}^{u}|_\nu + |\varphi _{H}^{u}-v_{H}|_{\nu } +\inf _{w_H^h\in {\mathbb {V}}^{h}_{H}}|u_H-w_H^h|_\nu , \;\forall v_H\in V_H,\\\le & {} \inf _{v_H\in {\mathbb {V}}_L}|u-v_H|_\nu + \frac{C_0}{\sqrt{\nu _m}} H \Vert f\Vert _{0} +\inf _{w_H^h\in {\mathbb {V}}^{h}_{H}}|u_H-w_H^h|_\nu , \end{aligned}$$

which gives (11) \(\square \)

3 Interpolation operators and basic inequalities

In this section, we recall some basic inequalities and give interpolation operators which are essential tools to derive a posteriori error estimates .

Basic inequalities

Lemma 1

(Local trace inequality, see Verfürth (2013), Adams (1995)) For every \(E\in \partial K\) and all \(\mathbf {w}\in {\mathbb {H}}(\hbox {div};\varOmega )\), such that \(\mathbf {w}\cdot \mathbf {n}\in {\mathbb {L}}^2(E)\), we have:

$$\begin{aligned} \Vert \mathbf {w}\cdot \mathbf {n}\Vert _{{\mathbb {L}}^2(E)}\preceq \left( h_E^{-1/2}\Vert \mathbf {w}\Vert _{\mathbf {L}^2(K)} +h_E^{1/2}\Vert {\hbox {div}}\mathbf {w}\Vert _{{\mathbb {L}}^2(K)}\right) , \end{aligned}$$

where \({\mathbb {H}}(\hbox {div};\varOmega ):=\{\mathbf {w}\in \left( {\mathbb {L}}^2(\varOmega )\right) ^2\,/\, \hbox {div}\mathbf {w}\in {\mathbb {L}}^2(\varOmega ) \}\), \(\mathbf {n}\) the vector normal to \(\partial K\) and where we use the shorthand notation:

$$\begin{aligned} x\preceq y, \end{aligned}$$
(14)

for \(x \le Cy\) with positive constant independent of x, y, and meshes.

To derive the lower bound of the error, we need special functions introduced by Verfürth (1996) and called bubble functions. Using the barycentric coordinates, \(\lambda ^{K}_{i}\), for \(i=1,2,3\), associated with an element \(K\in \mathcal {T}_{H}\), these bubble functions are defined by:

$$\begin{aligned} b_{K}:= & {} \left\{ \begin{array}{ll} 27\lambda ^{K}_{1} \lambda ^{K}_{2}\lambda ^{K}_{3}&{}\quad \text{ on } K,\\ 0 &{} \quad \text{ everywhere } \text{ else } . \end{array} \right. \end{aligned}$$
(15)
$$\begin{aligned} b_{E}:= & {} \left\{ \begin{array}{ll} 4\lambda ^{K_{i}}_{1}\lambda ^{K_{i}}_{2} &{}\quad \text{ on } K_i,\quad \text{ for } i=1,2\\ 0 &{} \quad \text{ everywhere } \text{ else } , \end{array} \right. \end{aligned}$$
(16)

where \(E=K_1\cap K_2\). We have the following lemma (see Verfürth 1996, lemma 3.3, page 66):

Lemma 2

Let \(K\in {{\mathcal {T}}}_{H}\), \(E\in \mathcal {E}_{h}\) , v be a polynomial function in K, and \(\sigma \) be a polynomial function on E. We have:

$$\begin{aligned}&\left\| v\right\| _{0,K}\preceq \left\| b^{1/2}_{K}v\right\| _{0,K} \quad \text{ and }\quad \left\| \sigma \right\| _{0,E} \preceq \left\| b^{1/2}_{E}\sigma \right\| _{0,E}, \end{aligned}$$
(17)
$$\begin{aligned}&\left| b_{K}v\right| _{1,K}\preceq h^{-1}_{K}\left\| v\right\| _{0,K} \quad \text{ and }\quad \left| {{\mathcal {P}}}(b_{E}\sigma )\right| _{1,K} \preceq h^{-1/2}_{E}\left\| \sigma \right\| _{0,E}, \end{aligned}$$
(18)
$$\begin{aligned}&\left\| {{\mathcal {P}}}(b_{E}\sigma )\right\| _{0,K}\preceq h^{1/2}_{E}\left\| \sigma \right\| _{0,E}, \end{aligned}$$
(19)

where \({{\mathcal {P}}}(\cdot )\) is a continuation operator from \(\mathbb L^\infty (E)\) to \({\mathbb {L}}^\infty (K)\) .

Interpolation operators

We consider here operators of Clément type, related, respectively, to the spaces \({\mathbb {V}}_H\) and \({\mathbb {V}}_H^h\). Let \({{\mathcal {A}}}_{H}^{h}: {\mathbb {V}}\rightarrow {\mathbb {V}}_{H}^{h}\) and \({{\mathcal {A}}}_{H}^{}: {\mathbb {V}}\rightarrow {\mathbb {V}}_{H}^{} \) defined, for all \(v\in {\mathbb {V}}\) by:

$$\begin{aligned} {{\mathcal {A}}}_{H}^{h}(v)= & {} \sum ^{\mathcal {N}_H}_{i=1}\left( \frac{1}{\left| \omega _{i} \right| }\int _{\omega _{i}}vdx\right) \varPhi ^{i}_{h,H}, \end{aligned}$$
(20)
$$\begin{aligned} {{\mathcal {A}}}_{H}^{}(v)= & {} \sum ^{\mathcal {N}_H}_{i=1}\left( \frac{1}{\left| \omega _{i} \right| }\int _{\omega _{i}}vdx\right) \varPhi ^{i}_{H}, \end{aligned}$$
(21)

where \(\varPhi _H^{i}\) and \(\varPhi ^{i}_{h,H}\), \(i=1,\ldots \mathcal {N}_H\) are the multi-scale basis functions defined, respectively, by (4) and (7). These operators satisfy the following properties.

Proposition 2

Let \(K\in \mathcal {T}_{H}\), \(E\in \mathcal {E}_{H}\) and \(v\in {\mathbb {V}}\). Then, for \(B={{\mathcal {A}}}_H\) or \(B={{\mathcal {A}}}_H^h\), we have:

$$\begin{aligned} \left\| Bv\right\| _{0,K}\preceq & {} \left\| v\right\| _{0,\omega _{K}}, \end{aligned}$$
(22)
$$\begin{aligned} \left\| v-Bv\right\| _{0,K}\preceq & {} H_{K}|v|_{1,\omega _{K}}, \end{aligned}$$
(23)
$$\begin{aligned} \left\| v-Bv\right\| _{0,E}\preceq & {} {H_{E}}^{1/2} |v|_{1,\omega _{E}}, \end{aligned}$$
(24)

where \(\omega _{K}\) (resp. \(\omega _{E}\)) is the union of all the triangles of \(\mathcal {T}_{H}\) that share at least one node with K (resp. E).

The proof is given in the Annex.

We shall also need a Clément interpolation operator \(\varPi _{h} :H^{1}(K)\rightarrow {\mathbb {P}}_{1}(\mathcal {T}_{h}(K))\), defined relatively to the \(P_{1} \) finite elements on the fine mesh \(\mathcal {T}_{h}(K)\) for any coarse triangle K. We take a version of such an operator constructed by (see Scott and Zhang (1990)), such that \(\varPi _hv_{h}=v_{h}\) for all \( v_{h}\in {\mathbb {P}}_{1}(\mathcal {T}_{h}(K))\), with the following properties for all \(v\in H^{1}(K)\):

$$\begin{aligned} \left. \begin{array}{ll} &{}\left\| v-\varPi _hv\right\| _{0,T}\preceq h_{T}|v|_{1,\omega _{T}},\\ &{}\left\| v-\varPi _hv\right\| _{0,e}\preceq h_{e}^{1/2}|v|_{1,\omega _{e}},\\ &{}\left\| \varPi _hv\right\| _{0,\tilde{ e}}\preceq ||v||_{0,\gamma _{\tilde{e}}},\quad \end{array} \right\} \end{aligned}$$
(25)

where T is any triangle from \(\mathcal {T}_{h}(K)\), e any internal edge from \(\mathcal {E}_{h}^0(K)\), \(\tilde{e}\) any boundary edge from the mesh \( \mathcal {T}_{h}(K)\), \(\omega _{T}\) (resp. \(\omega _{e}\)) is the union of all the triangles of \(\mathcal {T}_{h}(K)\) that share at least one node with T (resp. e) and \(\gamma _{\tilde{e}}\) is the union of all the boundary edges that share at least one node with \(\tilde{e}\).

We define now another operator. For \(v\in H^1(K)\), let \({\widetilde{\varPi }}_h{v}\), such that:

$$\begin{aligned} \left. \begin{array}{r} {{\widetilde{\varPi }}_h{v}}\in {\mathbb {P}}_1({{\mathcal {T}}}_{h}(K)),\\ {{\widetilde{\varPi }}_h{v(a)}}=\varPi _h v(a), \text{ for } \text{ all } \text{ internal } \text{ node } (a\not \in \partial K),\\ {{\widetilde{\varPi }}_h{v(a)}} \text{ arbitrary, } \text{ for } \text{ all } \text{ boundary } \text{ node } (a\in \partial K). \end{array} \right\} \end{aligned}$$
(26)

Proposition 3

Let \(v\in H^{1}(K)\), \(T\in \mathcal {T}_{h}(K)\) and \(e\in \mathcal {E}_{h}(K)\). Then, \({{\widetilde{\varPi }}_h{v}}\) defined by (26) satisfies the following estimates:

$$\begin{aligned} \left\| v-v_{h}\right\| _{0,T}\preceq & {} h_{T}|v|_{1,\omega _{T}}+\alpha _Th_{T}^{1/2}\left\| v-v_{h}\right\| _{0,\partial \omega _{T}\cap \partial K}, \end{aligned}$$
(27)
$$\begin{aligned} \left\| v-v_{h}\right\| _{0,e}\preceq & {} h_{e}^{1/2}|v|_{1,\omega _{e}}+\alpha _e\left\| v-v_{h}\right\| _{0,\partial \omega _{e}\cap \partial K}, \end{aligned}$$
(28)

where \(\alpha _{T}\) and \(\alpha _{e}\) are boundary switches, i.e., \(\alpha _{T}=1\) (resp. \(\alpha _{e}=1\)) if T (resp. e) touches \(\partial K\); otherwise, \(\alpha _{T}=\alpha _{e}=0\), and where \(\omega _{T}\) (resp. \(\omega _{e}\)) is the union of all the triangles of \(\mathcal {T}_{h}(K)\) that share at least one node with T (resp. e).

The proof is in the Annex.

4 A posteriori error estimates

In this section, we will give different a posteriori error estimates. The first ones are related to the approximation of the problem (1) in the space \({\mathbb {V}}_H\) spanned by the multi-scale functions, and given by the problem (5). Obviously, the function \(u_H\) will not be computed directly, but over the approximation of the multi-scale functions. Here and below, we use the notation (14) and the notation (2) for D equal K, E, T, e, etc\(\ldots \). For \(E\in {{\mathcal {E}}}_{h}\), we denote by \(\mathbf {n}_E\) the unit, normal, outward-pointing vector field and by \(\left[ \nu \nabla _{\mathbf {n}_{E}} u_{H}\right] _{E}\) the jump of \( \nu \nabla u_{H}\cdot \mathbf {n}_{E} \) across the element E.

In the following, the notation \( x\preceq y \) means that \(x \le Cy\) with positive constant independent of x, y, \(\nu \), and meshes.

4.1 Estimates related to multi-scale basis functions

Theorem 1

Let \(f\in {\mathbb {L}}^{2}(\varOmega )\), u be the solution of (1), and \(u_H\) be the solution of (5), and let \(\eta _{K}\), for \(K\in {{\mathcal {T}}}_H\) defined by:

$$\begin{aligned} \eta _{K}^2:= \frac{H^{2}_{K}}{\underline{\nu }\,_{\omega _K}}\left\| f_{K}\right\| ^{2}_{0,K} +\frac{1}{2}\sum _{E\in \mathcal {E}_{K}}\frac{H_{E}}{\underline{\nu }\,_{\omega _E}} \left\| \left[ \nu \nabla _{\mathbf {n}_{E}} u_{H}\right] _{E}\right\| ^{2}_{0,E}, \end{aligned}$$
(29)

where \(f_K:=\displaystyle \frac{1}{|K|}\int _Kfdx\).

Then, we have:

$$\begin{aligned} |u-u_{H}|_{\nu }\preceq & {} \left\{ \sum _{K\in \mathcal {T}_{H}}\eta _{K}^2 +\frac{H^{2}_{K}}{\underline{\nu }\,_{\omega _K}}\Vert f-f_{K}\Vert ^{2}_{0,K}\right\} ^{1/2}, \end{aligned}$$
(30)
$$\begin{aligned} \eta _{K}\preceq & {} \left\{ \frac{H^{2}_{K}}{\underline{\nu }\,_{\omega _K}}||f-f_{K}||^{2}_{0,\omega _{K}} +\frac{\overline{\nu }_K^{}}{\underline{\nu }\,_{\omega _K}}|u-u_{H}|^{2}_{\nu ,\omega _{K}} \right\} ^{1/2}, \end{aligned}$$
(31)

where \(f_K\) is an approximation of f.

Proof

  1. 1.

    We begin by proving the upper bound of the error (30). By taking \(w=u-u_H\) and for any \(w_{H}^{}\in {\mathbb {V}}_{H}^{}\), the Galerkin orthogonality and an integration by parts in each \(K\in {{\mathcal {T}}}_H\) give:

    $$\begin{aligned} |u-u_{H}^{} |^{2}_{\nu }= & {} \sum _{K\in \mathcal {T}_{H}}\left\{ \int _{K}(f+\text{ div }(\nu \nabla u_{H}^{}))(w-w_{H}^{})dx\right. \\&\qquad \qquad +\frac{1}{2}\sum _{E\in \mathcal {E}_{K}} \int _{E}\left[ \nu \nabla _{\mathbf {n}_{E}} u_{H}^{}\right] _{E}(w-w_{H}^{})ds\biggr \}. \end{aligned}$$

    By Cauchy–Schwarz inequality and since \(\text{ div }(\nu \nabla u_{H}^{})=0\) in K, we obtain:

    $$\begin{aligned} |u-u_{H}^{}|^{2}_{\nu }\le & {} \sum _{K\in \mathcal {T}_{H}}\biggr \{\left[ \left\| f_{K}\right\| _{0,K} +\left\| f-f_{K}\right\| _{0,K}\right] \left\| w-w_{H}^{}\right\| _{0,K}\\&+ \frac{1}{2}\sum _{E\in \mathcal {E}_{K}} \left\| \left[ \nu \nabla _{\mathbf {n}_{E}} u_{H}^{}\right] _{E}\right\| _{0,E} \left\| w-w_{H}^{}\right\| _{0,E}\biggr \}. \end{aligned}$$

    Now, we take \(w_{H}={{\mathcal {A}}}_{H} w\), where \({{\mathcal {A}}}_H\) is defined in (21) and use the estimates of Proposition 2 and (3) to obtain:

    $$\begin{aligned} |u-u_{H}^{}|^{2}_{\nu }\preceq & {} \sum _{K\in \mathcal {T}_{H}} \frac{H_{K}}{\underline{\nu }\,_{\omega _K}^{1/2}}\biggl \{\Vert f_{K}\Vert _{0,K} +\Vert f-f_{K}\Vert _{0,K}\biggr \}|w|_{\nu ,\omega _{K}}\\&+ \sum _{E\in \mathcal {E}_{K}}\frac{H^{1/2}_{E}}{\underline{\nu }\,_{\omega _E}^{1/2}} \bigl \Vert \;\left[ \nu \nabla _{\mathbf {n}_{E}} u_{H}^{}\bigr ]_{E}\; \right\| _{0,E}|w|_{\nu ,\omega _{E}}, \end{aligned}$$

    which gives (30) since \(w=u-u_H\).

  2. 2.

    To prove (31), the upper bound of the indicator, we use the technique of bubble functions which is now standard. Let \(w_{K}=b_{K}f_{K}\), where \(b_K\) is the bubble function in K defined by (15). By (17), we have:

    $$\begin{aligned} \left\| f_{K}\right\| ^{2}_{{\mathbb {L}}^{2}(K)}\preceq & {} \int _{K}b_{K}f_{K}^{2}\mathrm{d}x. \end{aligned}$$

    Since \(\mathbf {L}_Ku_{H}=0 \) in K, and \(\displaystyle \int _{K}w_{K}fdx-\int _{K}\nu \nabla u \cdot \nabla w_{K}dx=0,\) and then, using Green’s formula, we have:

    $$\begin{aligned} \left\| f_{K}\right\| ^{2}_{\mathbb L^{2}(K)}\preceq & {} \int _{K}w_{K}(f_{K} +\hbox {div}(\nu \nabla u_{H}))\mathrm{d}x,\\\preceq & {} \left[ \int _{K}w_{K}(f_{K}-f)+\int _{K}w_{K}\hbox {div}(\nu \nabla u_{H})dx\right] +\int _{K}\nu \nabla u \cdot \nabla w_{K}\mathrm{d}x,\\\preceq & {} \left[ \int _{K}w_{K}(f_{K}-f)\mathrm{d}x+\int _{K}\nu \nabla ( u-u_{H})\cdot \nabla w_{K}\mathrm{d}x\right] . \end{aligned}$$

    The Cauchy–Schwarz and inverse inequalities, the definition of \(w_K\), and (3) give:

    $$\begin{aligned} \left\| f_{K}\right\| ^{}_{{\mathbb {L}}^{2}(K)}\preceq \left( \left\| f_{K}-f\right\| _{{\mathbb {L}}^{2}(K)}^{2} +H^{-2}_{K}\overline{\nu }_K|u-u_{H}|_{\nu ,K}^{2}\right) ^{1/2}, \end{aligned}$$

    and then:

    $$\begin{aligned} \frac{H_{K}^{2}}{\underline{\nu }\,_{\omega _K}}\left\| f_{K}\right\| _{\mathbb L^{2}(K)}^{2}\preceq \frac{H_{K}^{2}}{\underline{\nu }\,_{\omega _K}}\left\| f_{K}-f\right\| _{\mathbb L^{2}(K)}^{2} +\frac{\overline{\nu }_K}{\underline{\nu }\,_{\omega _K}}|u-u_{H}^{}|_{\nu ,K}^{2}. \end{aligned}$$
    (32)

    Let now \(\mathbf {w}=\nu \nabla (u_{H}-u)\). First of all, we remark that for all element \(K\in {{\mathcal {T}}}_H\) and all \(E\in \partial K\), we have \(\hbox {div}\mathbf {w}=f\) in K and \(\left[ \nu \nabla _{\mathbf {n}_E} u\right] _{E}=0\). In the other hand, since \(\mathbf {L}_Ku_H=0\) in K, \(u_H|_{\partial K}\) is regular and K is convex, we deduce by regularity theorem (Cf. Grisvard 1985) that \(u_H|_K\in H^2(K)\), and so, \(\mathbf {w}\cdot \mathbf {n}\) is in \(L^2(E)\). By Lemma 1, we therefore have:

    $$\begin{aligned} \left\| \left[ \nu \nabla _{\mathbf {n}_E} u_{H}\right] _{E}\right\| _{{\mathbb {L}}^{2}(E)}\preceq & {} H_{E}^{1/2}||f_{}||_{0,K}+H_{E}^{-1/2}||\nu \nabla (u-u_{H})||_{0,K},\\\preceq & {} H_{E}^{1/2}||f_{K}||_{0,K}+H_{E}^{1/2}||f-f_{K}||_{0,K}\\&\qquad +\frac{\overline{\nu }_K^{1/2}}{H_{E}^{1/2}}|u-u_{H}|_{\nu ,K}. \end{aligned}$$

    Multiplying the previous inequality by \(H_{E}^{1/2}/\underline{\nu }\,_E^{1/2}\) and using the fact that \(H_E \le H_K\) and \(\underline{\nu }\,_E\ge \underline{\nu }\,_K\), and the inequality (32), we find:

    $$\begin{aligned} \frac{H_{E}^{1/2}}{\underline{\nu }\,_{\omega _E}^{1/2}}\left\| \left[ \nu \nabla _{\mathbf {n}_{E}}u_{H}\right] _{E} \right\| _{{\mathbb {L}}^{}(E)} \preceq \frac{H_{K}}{\underline{\nu }\,_{\omega _K}^{1/2}}||f-f_{K}||_{0,K} +\frac{\overline{\nu }_K^{1/2}}{\underline{\nu }\,_{\omega _K}^{1/2}}|u-u_{H}|_{\nu ,K}, \end{aligned}$$

    or

    $$\begin{aligned} \frac{H_{E}^{}}{\underline{\nu }\,_{\omega _E}^{}}\left\| \left[ \nu \nabla _{\mathbf {n}_{E}}u_{H}\right] _{E}\right\| _{{\mathbb {L}}^{2}(E)}^{2} \preceq \frac{H^{2}_{K}}{\underline{\nu }\,_{\omega _K}}||f-f_{K}||^{2}_{0,\omega _{K}} +\frac{\overline{\nu }_K}{\underline{\nu }\,_{\omega _K}}|u-u_{H}|^{2}_{\nu ,\omega _{K}}, \end{aligned}$$

    and therefore:

    $$\begin{aligned} \sum _{E\in \mathcal {E}_{K}}\frac{H_{E}^{}}{\underline{\nu }\,_{\omega _E}^{}}\left\| \left[ \nu \nabla _{\mathbf {n}_{E}}u_H\right] _{E}\right\| _{{\mathbb {L}}^{2}(E)}^{2} \preceq \frac{H^{2}_{K}}{\underline{\nu }\,_{\omega _K}}||f-f_{K}||^{2}_{0,\omega _{K}} +\frac{\overline{\nu }_K^{}}{\underline{\nu }\,_{\omega _K}}|u-u_{H}|^{2}_{\nu ,\omega _{K}}. \end{aligned}$$

\(\square \)

4.2 Estimates for the fully approximated problem

In this section, we give a posteriori error estimates for the discrete MsFEM approximation problem given by (10).

The a posteriori indicators are defined, for all \(K\in \mathcal{T}_H\), all \(T\in {{\mathcal {T}}}_h(K)\), and all \(E\in {{\mathcal {E}}}_H\), by:

$$\begin{aligned} \eta _{K,h}^2:= & {} \frac{H^{2}_{K}}{\underline{\nu }\,_{\omega _K}}\left\| f_{K}\right\| ^{2}_{0,K} +\sum _{E\in \mathcal {E}_{K}}\frac{H_{E}}{\underline{\nu }\,_{\omega _E}} \left\| \left[ \nu \nabla _{\mathbf {n}_{E}} u_{H}^h\right] _{E}\right\| ^{2}_{0,E}. \end{aligned}$$
(33)
$$\begin{aligned} \delta _{K,h}^2:= & {} \frac{1}{\underline{\nu }\,_K}\sum _{T\in {{\mathcal {T}}}_h(K)} h^2_{T}\Vert \text{ div }(\nu \nabla u_H^h)\Vert ^{2}_{0,T} +\sum _{e\in {{\mathcal {E}}}_{h}^0(K)}h_e\Vert \left[ \nu \nabla _{\mathbf {n}_{e}} u_{H}^h\right] _{E}\Vert ^{2}_{0,e}. \end{aligned}$$
(34)
$$\begin{aligned} \xi _{E,h}^2:= & {} \frac{H_E}{\underline{\nu }\,_{\omega _E}}\left( \sum _{T\in \mathcal {T}_{h}^{b}(E)}h_{T}||div(\nu \nabla u_{H}^{h})||_{0,T}^{2} + \sum _{ e\in \mathcal {E}_{h}^{b}(E)}\Vert \left[ \nu \nabla _{\mathbf {n}_{e}} u_{H}^h \right] _{e}\Vert _{0,e}^{2}\right) . \end{aligned}$$
(35)

We will prove the upper and lower bounds of the error by these indicators.

4.2.1 An upper bound for the error

Theorem 2

Let \(f\in {\mathbb {L}}^{2}(\varOmega )\) and \(u_{H}^{h}\) be the solution of (10). We have:

$$\begin{aligned} | u-u_{H}^{h}|_{\nu } \preceq \left\{ \sum _{K\in \mathcal {T}_{H}}\left( \eta _{K,h}^2 +\frac{H_{K}^{2}}{\underline{\nu }\,_{\omega _K}}\Vert f-f_{K}\Vert _{0,K}^{2}\right) +\sum _{K\in \mathcal {T}_{H}} \delta _K^2 +\sum _{E\in \mathcal {E}_{H}} \xi _E^2 \right\} ^{1/2}; \end{aligned}$$
(36)

Remark 1

the first sum in (36) is the indicator related to the error due to the coarse mesh \({{\mathcal {T}}}_H\). The others sums should be interpreted as the indicators of the error due to the fine meshes \({{\mathcal {T}}}_h(K)\).

Proof of Theorem 2

Let \(u_{H}^{h}\) be the solution of (10) and \( w=u-u_{H}^{h}\). Then, by the Galerkin orthogonality, we have for any \( w_{H}^{h}\in {\mathbb {V}}_{H}^{h}\):

$$\begin{aligned} |u-u_{H}^{h}| _{\nu }^{2}= & {} \int _{\varOmega }\nu \nabla (u-u_{H}^{h})\cdot \nabla (w-w_{H}^{h})\mathrm{d}x, \\= & {} \sum _{K\in \mathcal {T}_{H}}\left[ \sum _{T\in \mathcal {T} _{h}(K)}\int _{T}\nu \nabla (u-u_{H}^{h})\cdot \nabla (w-w_{H}^{h})\mathrm{d}x\right] . \end{aligned}$$

Using (1) and an integration by parts over all the triangles \(T\in \mathcal {T}_{h}(K)\), for all \(K\in \mathcal {T}_{H}\), yields:

$$\begin{aligned} |u-u_{H}^{h}|_{\nu }^{2}= & {} \sum _{K\in \mathcal {T}_{H}}\left\{ \sum _{T\in \mathcal {T}_{h}(K)}\int _{T}(f+\hbox {div}(\nu \nabla u_{H}^{h}))(w-w_{H}^{h})\mathrm{d}x\right. \\&\left. \qquad \qquad +\sum _{e\in \mathcal {E}_h(K)}\int _{e}\left[ \nu \nabla _{\mathbf {n}_{e}} u_{H}^{h}\right] _{e}(w-w_{H}^{h})\mathrm{d}s\right\} . \end{aligned}$$

Since the edges from \(\mathcal {E}_{h} \) is divided into two groups: \(\mathcal {E}_{H}\), the set of the boundary of coarse triangles, and \(\mathcal {E}_{h}^0(K)\), the set of internal edges from \(\mathcal {E}_{h}(K)\) for some triangle \(K\in \mathcal {T}_{H}\), the last sum can be rewritten as:

$$\begin{aligned} |u-u_{H}^{h}|_{\nu }^{2}= & {} \left\{ \sum _{K\in \mathcal {T} _{H}}\int _{K}f(w-w_{H}^{h})\mathrm{d}x\right. \\&\qquad \left. + \sum _{E\in \mathcal {E} _{H}}\int _{E}\left[ \nu \nabla _{\mathbf {n}_E} u_{H}^{h}\right] _{E}(w-w_{H}^{h})\mathrm{d}s\right\} \\&+\left\{ \sum _{K\in \mathcal {T}_{H}}\biggl [ \sum _{T\in \mathcal {T}_{h}(K)}\int _{T} {\hbox {div}}(\nu \nabla u_{H}^{h})(w-w_{H}^{h})\mathrm{d}x\right. \\&\qquad \qquad + \left. \sum _{{\small e\in \mathcal {E}_{h}^0(K)}}\int _{e}\left[ \nu \nabla _{\mathbf {n}_{e}} u_{H}^{h} \right] _{e}(w-w_{H}^{h})\mathrm{d}s\biggr ] \right\} , \\:= & {} T_1+T_2. \end{aligned}$$

We now take \(w_{H}^{h}={{\mathcal {A}}}_{H}^{h}w\) where \({{\mathcal {A}}}_H^h\) is defined in (20), and use Proposition 2 and the inequality (3) to estimate the terms in \(T_1\):

$$\begin{aligned} T_1\preceq & {} \sum _{K\in \mathcal {T}_{H}}\frac{H_{K}}{\underline{\nu }\,_{\omega _K}^{1/2}}\left\| f_{K}\right\| _{0,T}|w|_{\nu ,\omega _{K}} +\sum _{E\in \mathcal {E}_{H}} \frac{H_{E}^{1/2}}{\underline{\nu }\,_{\omega _E}^{1/2}} ||\left[ \nu \nabla _{\mathbf {n}_{E}} u_{H}^{h}\right] ||_{0,E}|w|_{\nu ,\omega _{E}}\\&\qquad \qquad + \sum _{K\in \mathcal {T}_{H}} \frac{H_{K}}{\underline{\nu }\,_{\omega _K}^{1/2}}\left\| f-f_{K}\right\| _{0,K}|w|_{\nu ,\omega _{K}},\\\preceq & {} \biggl \{ \sum _{K\in \mathcal {T}_{H}} \biggl ( \eta _{K,h}^2+\frac{H_{K}}{\underline{\nu }\,_{\omega _K}^{1/2}} \Vert f-f_{K}\Vert _{0,K}^2\biggr )\biggr \}^{1/2}|w|_\nu . \end{aligned}$$

To estimate the terms in \(T_2\), we shall use the definition of the space \({\mathbb {V}}_{H}^{h}\). Since \(u_H^{h}\) is an element of \({\mathbb {V}}_{H}^{h}\), it satisfies on any \(K\in \mathcal {T}_{H}\) [see (7), (8), and (9)]:

$$\begin{aligned} \int _{K}\nu \nabla u_H^{h}\cdot \nabla v^{h}\mathrm{d}x=0,\quad \forall v^{h}\in {\mathbb {V}}_{h}^{0}(K). \end{aligned}$$
(37)

An integration by parts over all the triangles \(T\in \mathcal {T}_{h}(K)\) yields for all \(v^{h}\in {\mathbb {V}}_{h}^{0}(K)\):

$$\begin{aligned} \sum _{e\in \mathcal {E}_{h}^0(K)}\int _{e}\left[ \nu \nabla _{\mathbf {n}_{e}} u_H^{h}\right] _{e}v_{h}\mathrm{d}s+\sum _{T\in \mathcal {T} _{h}(K)}\int _{T}\hbox {div}(\nu \nabla u_H^{h})v_{h}\mathrm{d}x=0. \end{aligned}$$

Thus, one can write for any \(v^{h}\in C(\varOmega )\), such that \(v^{h}|_{K}\in {\mathbb {V}}_{h}^{0}(K)\), for all \(K\in \mathcal {T}_{H}\):

$$\begin{aligned} T_2= & {} \sum _{K\in \mathcal {T}_{H}}\left[ \sum _{T\in \mathcal {T} _{h}(K)}\int _{T}\hbox {div}(\nu \nabla u_{H}^{h})\left( (w-w_{H}^{h})-v^{h}\right) \mathrm{d}x\right. \\&\left. \qquad + \sum _{{\small e\in \mathcal {E}_{h}^0(K)}}\int _{e}\left[ \nu \nabla _{n_{e}} u_{H}^{h}\right] _{e}\left( (w-w_{H}^{h})-v^{h}\right) \mathrm{d}s\right] . \end{aligned}$$

Let us now choose \({\widetilde{\varPi }}_h(w)=v^{h}+w_{H}^{h}\), such that \(v^{h}|_{\partial K}=0\), where \({\widetilde{\varPi }}_h\) is the interpolation operator defined in (26). With the help of Proposition 3, one gets:

$$\begin{aligned} T_2\!\!\le & {} \!\!\!\sum _{K\in \mathcal {T}_{H}}\left[ \sum _{T\in \mathcal {T} _{h}(K)}||div(\nu \nabla u_{H}^{h})||_{0,T}\right. \left\| w-{\widetilde{\varPi }}_h(w)\right\| _{0,T} \\&\quad +\sum _{{\small e\in \mathcal {E}_{h}(K)}}|| \left[ \nu n_{e}\cdot \nabla u_{H}^{h}\right] _{e}||_{0,e} \left\| w-{\widetilde{\varPi }}_h(w)\right\| _{0,e} \Bigg ]. \end{aligned}$$

We have \(v^{h}\in {\mathbb {V}}^{0}_{h}(K)\) and \(w^{H}_{h}\mid _{K}\in {\mathbb {V}}^{}_{h}(K)\), and then, \(v^{h}+w_{H}^{h}\mid _{K}\in \mathbb V^{}_{h}(K)\).

Let \({\widetilde{\varPi }}_h: {\mathbb {V}}\rightarrow \mathbb V^{}_{h}(K)\), such as \({\widetilde{\varPi }}_h(w)=v^{h}+w_{H}^{h}\mid _{K}\). We make the estimates taking into account that \(v^{h}|_{\partial K}=0\) and \({\widetilde{\varPi }}_h(w)=v^{h}+w_{H}^{h}\), and using Proposition 3, we obtain:

$$\begin{aligned} \left\| w-{\widetilde{\varPi }}_h(w)\right\| _{0,T}\preceq & {} h_{T}|w|_{1,\omega _{T}}+\alpha _Th_{T}^{1/2}\left\| w-{\widetilde{\varPi }}_h(w)\right\| _{0,\partial \omega _{T}\cap \partial K}, \\ \left\| w-{\widetilde{\varPi }}_h(w)\right\| _{0,e}\preceq & {} h_{e}^{1/2}|w|_{1,\omega _{e}}+\alpha _e\left\| w-{\widetilde{\varPi }}_h(w)\right\| _{0,\partial \omega _{e}\cap \partial K}, \end{aligned}$$

which give:

$$\begin{aligned} \left\| w-\varPi _{h}w\right\| _{0,T}\preceq & {} h_{T}|w|_{1,\omega _{T}}+\alpha _Th_{T}^{1/2}\left\| w-(v^{h}+w_{H}^{h})\right\| _{0,\partial \omega _{T}\cap \partial K}, \\ \left\| w-{\widetilde{\varPi }}_h(w)\right\| _{0,e}\preceq & {} h_{e}^{1/2}|w|_{1,\omega _{e}}+\alpha _e\left\| w-(v^{h}+w_{H}^{h})\right\| _{0,\partial \omega _{e}\cap \partial K}, \end{aligned}$$

and since \(v^{h}|_{\partial K}=0\), we obtain:

$$\begin{aligned} \left\| w-{\widetilde{\varPi }}_h(w)\right\| _{0,T}\preceq & {} h_{T}|w|_{1,\omega _{T}}+\alpha _Th_{T}^{1/2}\left\| w-w_{H}^{h}\right\| _{0,\partial \omega _{T}\cap \partial K}, \\ \left\| w-{\widetilde{\varPi }}_h(w)\right\| _{0,e}\preceq & {} h_{e}^{1/2}|w|_{1,\omega _{e}}+\alpha _e\left\| w-w_{H}^{h}\right\| _{0,\partial \omega _{e}\cap \partial K}. \\ T_2\!\!\preceq & {} \!\!\!\sum _{K\in \mathcal {T}_{H}}\left[ \sum _{T\in \mathcal {T} _{h}(K)}||\hbox {div}(\nu \nabla u_{H}^{h})||_{0,T} \biggl ( h_{T}|w|_{1,\omega _{T}} \right. \left. +\alpha _{T}h_{T}^{1/2}\left\| w-w_{H}^{h}\right\| _{0,\gamma _{TK}}\right) \\&\quad +\sum _{{\small e\in \mathcal {E}_{h}(K)}}|| \left[ \nu \nabla _{\mathbf {n}_{e}} u_{H}^{h}\right] _{e}||_{0,e}\left( h_{e}^{1/2}|w|_{1,\omega _{e}}+\alpha _e\left\| w-w_{H}^{h}\right\| _{0,\gamma _{eK}}\right) \Bigg ], \end{aligned}$$

where \(\gamma _{TK}=\partial \omega _{T}\cap \partial K\), \(\gamma _{eK}=\partial \omega _{e}\cap \partial K\), \(\alpha _{T}\), and \(\alpha _{e}\) are defined in Proposition 3. We now gather the terms in the sums above and use Cauchy–Schwarz, and then, (24) to get:

$$\begin{aligned} T_2\!\!\!\preceq & {} \!\!\!\sum _{K\in \mathcal {T}_{H}}\left( \sum _{T\in \mathcal {T} _{h}(K)}h_{T}^{2}||div(\nu \nabla u_{H}^{h})||_{0,T}^{2}+\sum _{{\small e\in \mathcal {E}_{h}^0(K)}}h_{e}||\left[ \nu n_{e}\cdot \nabla u_{H}^{h}\right] _{e}||_{0,e}^{2}\right) ^{1/2}\!\!\!\!\!\!|w|_{1,K} \\ +\!\!\!&\!\!\!\!\!\!\sum _{E\in \mathcal {E}_{H}}\left( \sum _{T\in \mathcal {T} _{h}^{b}(E)}h_{T}||div(\nu \nabla u_{H}^{h})||_{0,T}^{2}+ \sum _{{\small e\in \mathcal {E}_{h}^{b}(E)}}||\left[ \nu n_{e}\cdot \nabla u_{H}^{h}\right] _{e}||_{0,e}^{2} \right) ^{1/2}\!\!\!\!\! H_E^{1/2}|w|_{1,\omega _E}. \end{aligned}$$

Using again the inequality (3), we obtain:

$$\begin{aligned} T_2\preceq \left( \sum _{K\in {{\mathcal {T}}}_H}\delta _K^2+\sum _{E\in \mathcal{E}_H}\xi _E^2\right) ^{1/2}|w|_\nu . \end{aligned}$$

Combining together the bounds for \(T_1\) and \(T_2\) and recalling that \(w=u-u_H^h\), this leads to (36) \(\square \)

4.2.2 A lower bound for the error

To have an optimal a posteriori error estimate of the error, we have to prove that the indicators \(\eta _{K,h}\), \(\delta _K\), and \(\xi _E\) defined in (33), (34), and (34), respectively, are locally lower bounds of the error.

Theorem 3

Let \(f\in {\mathbb {L}}^{2}(\varOmega )\), \(u_{H}^{h}\) the solution of (10) and \(\eta _{K,h}\), \(\delta _K\), and \(\xi _E\) defined by (33), (34), and (34), respectively. The following estimates hold for all \(K\in {{\mathcal {T}}}_{H}\) and all \(E\in {{\mathcal {E}}}_{H}\):

$$\begin{aligned} \eta _{K,h}\preceq & {} \biggl \{\left( \frac{\overline{\nu }_K}{\underline{\nu }\,_{\omega _K}}\right) |u-u_H^h|_{\nu ,K}^2 +\frac{H_K^2}{\underline{\nu }\,_{\omega _K}}\Vert f-f_K\Vert _{0,K}^2\\&+\sum _{E\in {{\mathcal {E}}}_{H}(K)}\sum _{T\in {{\mathcal {T}}}_{h}^b(E)}\left\{ \left( \frac{\overline{\nu }_T}{\underline{\nu }\,_{\omega _K}}\right) \left( \frac{H_K}{h_T}\right) |u-u_H^{h}|_{\nu ,T}^2\right\} \\&\left. \quad +\frac{1}{\underline{\nu }\,_{\omega _K}}\left( \sum _{T\in {{\mathcal {T}}}_{h}(K)}h_T^2\Vert f\Vert _{0,T}^2\right) \right\} ^{1/2},\\ \delta _K\preceq & {} \biggl \{\left( \frac{\overline{\nu }_K}{\underline{\nu }\,_K}\right) |u-u_H^h|_{\nu ,K}^2 +\frac{H_K^2}{\underline{\nu }\,_K}\Vert f-f_K\Vert _{0,K}^2 \left. +\frac{1}{\underline{\nu }\,_K}\left( \sum _{T\in {{\mathcal {T}}}_{h}(K)}h_T^2\Vert f\Vert _{0,T}^2\right) \right\} ^{1/2},\\ \xi _E\preceq & {} \biggl \{ \sum _{T\in {{\mathcal {T}}}_{h}^b(E)}\left( \frac{\overline{\nu }_T}{\underline{\nu }\,_{\omega _E}}\right) \left( \frac{H_E}{h_T}\right) |u-u_H^h|_{\nu ,T}^2 +\sum _{K\subset \omega _K}\frac{H_K^2}{\underline{\nu }\,_{\omega _E}}\Vert f-f_K\Vert _{0,K}^2\\&\quad \sum _{K\in \omega _K}\left( \left( \frac{\overline{\nu }_K}{\underline{\nu }\,_{\omega _E}}\right) |u-u_H^h|_{\nu ,K}^2 +\frac{1}{\underline{\nu }\,_{\omega _E}}\sum _{T\in {{\mathcal {T}}}_{h}(K)}h_T^2\Vert f\Vert _{0,T}^2\right) \biggr \}^{1/2}. \end{aligned}$$

Proof

We will successively give upper bounds of \(\Vert \hbox {div}(\nu \nabla u_{H}^{h}) \Vert _{0,T} \), \(\Vert \left[ \nu \nabla u_H^h\cdot n_e\right] _e\Vert _{0,e}\), \(\Vert \left[ \nu \nabla u_H^h\cdot n_E\right] _E\Vert _{0,E}\), and \(\Vert f_K\Vert _{0,K}\), for arbitrary \(T\in {{\mathcal {T}}}_{h}(K)\), \(e\in {{\mathcal {E}}}_{h}(K)\), \(E\in {{\mathcal {E}}}_{H}\), and \(K\in {{\mathcal {T}}}_{H}\).

  1. 1.

    As in a standard way, we take \(w_{T}=b_{T}div (\nu \nabla u_{H}^{h})\). By (17), we have:

    $$\begin{aligned} \Vert div (\nu \nabla u_{H}^{h}) \Vert ^{2}_{0,T}\preceq & {} \int _{T}w_{T}div (\nu \nabla u_{H}^{h})dx. \end{aligned}$$

    The continuous problem (1) with \(v=w_T\) and an integration by parts give the following relation:

    $$\begin{aligned} \int _Tw_T\hbox {div}(\nu \nabla u_H^h)= & {} \int _Tw_T\hbox {div}(\nu \nabla u_H^h) +\int _T\nu \nabla u\cdot \nabla w_T-\int _Tfw_T\\= & {} \int _T\nu \nabla (u-u_H^h)\cdot \nabla w_T+\int _Tf_Kw_T+\int _T(f_K-f)w_T, \end{aligned}$$

    and by (18), we deduce the following estimate:

    $$\begin{aligned} \Vert \hbox {div}(\nu \nabla u_H^h)\Vert _{0,T}\preceq \overline{\nu }_T^{1/2} h_T^{-1}|u-u_H^h|_{\nu ,T}+\Vert f-f_K\Vert _{0,T}+\Vert f_K\Vert _{0,T}. \end{aligned}$$
    (38)
  2. 2.

    With an analogous argument as before, we consider \(w_e =b_e[\nu \nabla u_H^h\cdot n_e]_e\). We have:

    $$\begin{aligned} \Vert [\nu \nabla u_H^h\cdot n_e]_e\Vert _{0,e}^2\preceq \int _ew_e[\nu \nabla u_H^h\cdot n_e]_e, \end{aligned}$$

    and

    $$\begin{aligned} \int _ew_e[\nu \nabla u_H^h\cdot n_e]_e= & {} \sum _{T\subset \omega _e}\left( \int _T\hbox {div}(\nu \nabla u_H^h)w_e-\int _T\nu \nabla u_H^h\cdot \nabla w_e\right) \\= & {} \sum _{T\subset \omega _e}\int _T\hbox {div}(\nu \nabla u_H^h)w_e+\int _{\omega _e}\nu \nabla (u- u_H^h)\cdot \nabla w_e\\&\quad +\int _{\omega _e}f_Kw_e-\int _{\omega _e}(f-f_K)w_e, \end{aligned}$$

    and finally, by (38), (18), (19), and the fact that there exist two positive constants \(c_1\) and \(c_2\) with \(c_1h_e\le h_T\le c_2h_e\), we obtain:

    $$\begin{aligned} \Vert [\nu \nabla u_H^h\cdot n_e]_e\Vert _{0,e}\preceq h_e^{-1/2}\overline{\nu }_{\omega _e}^{1/2}|u-u_H^h|_{\nu ,\omega _e} +h_e^{1/2}\left( \Vert f_K\Vert _{0,\omega _e}+\Vert f-f_K\Vert _{0,\omega _e}\right) .\nonumber \\ \end{aligned}$$
    (39)
  3. 3.

    Since \(E=\displaystyle \bigcup _{e\in {{\mathcal {E}}}_{h}^b(E)}e\), the bound of \(|\left[ \nu \nabla u_{H}^h\cdot {n_{E}}\right] _{E}\Vert _{0,E}\) is given using the estimate (39):

    $$\begin{aligned} \frac{H_E}{\underline{\nu }\,_{\omega _E}}\Vert [\nu \nabla u_H^h\cdot n_E]_E\Vert _{0,E}^2= & {} \frac{H_E}{\underline{\nu }\,_{\omega _E}}\sum _{e\subset E}\Vert [\nu \nabla u_H^h\cdot n_e]_e\Vert _{0,e}^2,\nonumber \\\preceq & {} \sum _{e\subset E}\left\{ \left( \frac{H_E}{h_e}\right) \left( \frac{\overline{\nu }_{\omega _e}}{\underline{\nu }\,_{\omega _E}}\right) |u-u_H^h|_{\nu ,\omega _e}^2\right. ,\nonumber \\&\left. \quad + \frac{H_E}{\underline{\nu }\,_{\omega _E}} h_e\biggl (\Vert f_K\Vert _{0,\omega _e}^2+ \Vert f-f_K\Vert _{0,\omega _e}^2\biggr )\right\} ,\nonumber \\\preceq & {} \sum _{T\in {{\mathcal {T}}}_{h}^b(E)}\left\{ \left( \frac{H_E}{h_T}\right) \left( \frac{\overline{\nu }_T}{\underline{\nu }\,_{\omega _E}}\right) |u-u_H^h|_{\nu ,T}^2\right. \nonumber \\&\left. \quad + \frac{H_E}{\underline{\nu }\,_{\omega _E}} h_T\biggl (\Vert f_K\Vert _{0,T}^2+ \Vert f-f_K\Vert _{0,T}^2\biggr )\right\} . \end{aligned}$$
    (40)
  4. 4.

    A bound of \(\frac{H_K}{\nu _K^{1/2}}\Vert f_K\Vert _{0,K}\) will be obtained by analogous arguments as the proof of Theorem 1 using \(u_H^h\) which, here, satisfies Eq. (37), a weak form of \(L_Ku_H=0\) in K. We consider \({w_K}=b_Kf_K\) and we denote by \(w_K^h\) its \(L^2-\)projection in \({\mathbb {V}}_0^h(K)\). By definition of the function \(w_K\) and \(w_K^h\) and using a scaling argument, we prove the following lemma:

\(\square \)

Lemma 3

$$\begin{aligned} \Vert w_K\Vert _{0,K}\le & {} \Vert f_K\Vert _{0,K}. \end{aligned}$$
(41)
$$\begin{aligned} \Vert w_K-w_K^h\Vert _{0,T}\preceq & {} \frac{h_T}{H_K}\Vert f_K\Vert _{0,K},\quad \forall T\in {{\mathcal {T}}}_{h}(K). \end{aligned}$$
(42)
$$\begin{aligned} |w_K^h|_{\nu ,K}\preceq & {} \frac{\overline{\nu }_K^{1/2}}{H_K}\Vert f_K\Vert _{0,K}. \end{aligned}$$
(43)

Proof of the lemma

The first inequality is obvious since \(|b_K|\le 1\) in K. The second is obtained using the error interpolation estimate in each \(T\in {{\mathcal {T}}}_{h}(K)\): \(\Vert w_K-w_K^h\Vert _{0,T} \preceq h_T|w_K|_{1,\omega _T}=|f_K|h_T|b_K|_{1,\omega _T}\). Now, by scaling argument, we know that \(|b_K|_{1,T}\preceq |{\hat{b}}_K|_{1,{\hat{T}}}={\hat{C}}\). Furthermore, Since \(|f_K|=\Vert f_K\Vert _{0,K}|K|^{-1/2}\), and \(|K|^{-1/2}\preceq {H_K}^{-1} \), we obtain (42). The estimate (43) is obtained by scaling argument as previously. \(\square \)

We return to the proof of the theorem. By (17), we have \( \left\| f_{K}\right\| ^{2}_{0,K}\preceq \displaystyle \int _{K}b_{K}f_{K}^{2}dx.\) Since supp\((w_K^h)=K\), we have \( a_K(u-u_H^h,w_K^h)=\displaystyle \int _Kfw_H^h. \) We deduce:

$$\begin{aligned} \int _{K}b_{K}f_{K}^{2}dx= & {} \int _Kw_K^hf+\int _K(w_K-w_K^h)f+\int _Kw_K(f_K-f)\\= & {} \int _K\nu \nabla (u-u_H^h)\cdot \nabla w_K^h+\int _K(w_K-w_K^h)f+\int _Kw_K(f_K-f),\\=: & {} R_1+R_2+R_3.\\ R_1\preceq & {} |u-u_H^h|_{\nu ,K}|w_K^h|_{\nu ,K} \preceq \frac{\overline{\nu }_K^{1/2}}{H_K}|u-u_H^h|_{\nu ,K}\Vert f_K\Vert _{0,K} \text{ by } (43).\\ R_3\preceq & {} \Vert w_K\Vert _{0,K}\Vert f-f_K\Vert _{0,K}\preceq \Vert f-f_K\Vert _{0,K}\Vert f_K\Vert _{0,K} \text{ by } (41).\\ R_2= & {} \sum _{T\in {{\mathcal {T}}}_{h}(K)}\int _T(w_K-w_K^h)f\le \sum _{T\in {{\mathcal {T}}}_{h}(K)}\Vert (w_K-w_K^h)\Vert _{0,T}\Vert f\Vert _{0,T},\\\preceq & {} \frac{1}{H_K}\Vert f_K\Vert _{0,K} \sum _{T\in {{\mathcal {T}}}_{h}(K)}h_T\Vert f\Vert _{0,T} \text{ by } (42). \end{aligned}$$

We obtain finally:

$$\begin{aligned} \frac{H_K}{\underline{\nu }\,_{\omega _K}^{1/2}}\Vert f_K\Vert _{0,K}\preceq & {} \left( \frac{\overline{\nu }_K}{\underline{\nu }\,_{\omega _K}}\right) ^{1/2}|u-u_H^h|_{\nu ,K} +\frac{1}{\underline{\nu }\,_{\omega _K}^{1/2}}\left( \sum _{T\in {{\mathcal {T}}}_{h}(K)}h_T\Vert f\Vert _{0,T}\right) \nonumber \\&\qquad \qquad + \left( \frac{H_K}{\underline{\nu }\,_{\omega _K}^{1/2}}\right) \Vert f-f_K\Vert _{0,K}. \end{aligned}$$
(44)

The lower bounds are now obtained by gathering all the terms.

By (44) and (40), we have:

$$\begin{aligned} \eta _{K,h}\preceq & {} \biggl \{\left( \frac{\overline{\nu }_K}{\underline{\nu }\,_{\omega _K}}\right) |u-u_H^h|_{\nu ,K}^2 +\frac{H_K^2}{\underline{\nu }\,_{\omega _K}}\Vert f-f_K\Vert _{0,K}^2\\&+\sum _{E\in {{\mathcal {E}}}_{H}(K)}\sum _{T\in {{\mathcal {T}}}_{h}^b(E)}\left\{ \left( \frac{\overline{\nu }_T}{\underline{\nu }\,_{\omega _K}}\right) \left( \frac{H_K}{h_T}\right) |u-u_H^{h}|_{\nu ,T}^2\right\} \\&\left. \quad +\frac{1}{\underline{\nu }\,_{\omega _K}}\left( \sum _{T\in {{\mathcal {T}}}_{h}(K)}h_T^2\Vert f\Vert _{0,T}^2\right) \right\} ^{1/2}. \end{aligned}$$

By (38), (39), (44), and using the inequalities \(h_e\le H_K\) and \(h_T\le H_K\), we obtain the estimation:

$$\begin{aligned} \delta _K\preceq & {} \biggl \{\left( \frac{\overline{\nu }_K}{\underline{\nu }\,_K}\right) |u-u_H^h|_{\nu ,K}^2 +\frac{H_K^2}{\underline{\nu }\,_K}\Vert f-f_K\Vert _{0,K}^2\\&\left. \quad +\frac{1}{\underline{\nu }\,_K}\left( \sum _{T\in {{\mathcal {T}}}_{h}(K)}h_T^2\Vert f\Vert _{0,T}^2\right) \right\} ^{1/2}. \end{aligned}$$

By (38)and (39), since \(h_T\le H_K\), and then by (44), we have:

$$\begin{aligned} \xi _E\preceq & {} \biggl \{ \sum _{T\in {{\mathcal {T}}}_{h}^b(E)}\left( \frac{\overline{\nu }_T}{\underline{\nu }\,_{\omega _E}}\right) \left( \frac{H_E}{h_T}\right) |u-u_H^h|_{\nu ,T}^2 +\sum _{K\subset \omega _K}\frac{H_K^2}{\underline{\nu }\,_{\omega _E}}\Vert f-f_K\Vert _{0,K}^2\\&\quad +\sum _{K\in \omega _K}\left( \left( \frac{\overline{\nu }_K}{\underline{\nu }\,_{\omega _E}}\right) |u-u_H^h|_{\nu ,K}^2 +\frac{1}{\underline{\nu }\,_{\omega _E}}\sum _{T\in {{\mathcal {T}}}_{h}(K)}h_T^2\Vert f\Vert _{0,T}^2\right) \biggr \}^{1/2}. \end{aligned}$$

Remark 2

In Theorem 3, the error indicators are increased by a quantity related to the H/h ratio; this means that we do not need to refine the fine mesh, so that this ratio is not big enough.

5 Implementation

In this section, we will show a numerical test which confirm the reliability and effectiveness of the a posteriori error estimates for the MsFEM method developed in the previous section. All the calculations presented are done with the software FreeFem++ (Cf. Hecht and Pironneau 2021).

We consider the following problem:

$$\begin{aligned} \left\{ \begin{array}{rll} -\text{ div } (\nu \nabla u)&{}=&{}f\qquad \text{ in } \varOmega ,\\ u&{}=&{}g\qquad \text{ on } \varGamma , \end{array}\right. \end{aligned}$$
(45)

with \(\varOmega =]0,1[\times ]0,1[\), \(f(x,y)=xy\), \(g(x,y)=xy\), \(\varepsilon =10^{-2}\), and:

$$\begin{aligned} \nu (x,y)= \left\{ \begin{array}{lll} 1+10\cos ^{2}\displaystyle \left( \left( \frac{2}{3\varepsilon }+2)\pi x\right) \right) \sin ^{2}\left( \frac{4\pi y}{3\varepsilon }\right) &{} \text{ if } &{} x\ge \frac{3}{4} \text{ and } y\ge \frac{3}{4},\\ &{}&{}\\ 1&{} \text{ if } &{} x\le \frac{3}{4} \ \text{ or } y\le \frac{3}{4}. \end{array} \right. \end{aligned}$$

which present large oscillations in the part of the domain defined by \([\frac{3}{4},1[\times [\frac{3}{4},1[\).

The reference solution (\(U_{Ref}\)) we consider is the solution obtained by the standard finite-element method of degree 1, using a fine mesh \({{\mathcal {T}}}_{h_0}\) with \(h_{0}=1/200\) (see Fig. 1 (a)).

To establish our MsFEM method, we need to build two meshes of \(\varOmega \), \({{\mathcal {T}}}_H\) the coarse one and \({{\mathcal {T}}}_h\) the fine one. We first build the conforming coarse mesh \(\mathcal{T}_H=\displaystyle \bigcup K\) with \(H=\max _K H_K\) and \(H_K\) is the diameter of K. The fine mesh is then constructed in the following manner. Each element K of \({{\mathcal {T}}}_H\) will be meshed with a step equal to \(H_K/n_K\), where \(n_K\) is an integer fixed in advance, by eventually taking into account the a priori information on the problem. We thus obtain a conforming mesh \(\mathcal{T}_h(K)=\displaystyle \bigcup _{T\subset K} T\). We denote the diameter of the element T by \(h_T\) and \(h=\max _T h_T\). The global fine mesh of the domain is obtained by catering these last meshes and will not be necessary conforming:

$$\begin{aligned} {{\mathcal {T}}}_h=\displaystyle \bigcup _{K\in {{\mathcal {T}}}_H} {{\mathcal {T}}}_h(K). \end{aligned}$$

In the first subsection, we present the resolution algorithm for the MsFEM scheme developed in this work and then the mesh adaptation algorithm. In the second subsection, we present the numerical calculations for the problem (45).

5.1 Algorithms

The resolution algorithm has the following structure:

Algorithm 1

(\(\mathcal {T}_{H}\), n, f) (Resolution algorithm)

  • a coarse mesh \(\mathcal {T}_{H}=\bigcup K\), representing as well as possible the geometry of the problem;

  • \(\{S_i,\;i=1,\ldots ,N\} \) the set of vertices of \(\mathcal {T}_{H}\);

  • n a non-negative integer;

  • the data f;

  1. 1.

    for each \(K\in \mathcal {T}_{H}\), build the meshes \(\mathcal {T}_{h}(K) \) with \(h_T\approx H_K/n\);

  2. 2.

    for each i, \(1\le i\le N\), calculate the basis function \(\varPhi _i\) in each K (a part of the support of this function) as the solution of (7);

  3. 3.

    solve the discrete problem (10) (which is a \(N\times N\) system), to calculate the solution \(u^{h}_{H}\).

The indicators developed in Theorem 1 and Theorem 2 are robust tools to find the elements K and T, where the error between the exact solution and the approximated solution is too large, and then must be refined to improve the quality of the numerical solution. Let \(\eta _{K}\), \(\delta _{K,h}\), and \(\xi _{E,h}\) defined respectively by (29), (34), and (34). First, we refine \({{\mathcal {T}}}_H\), using only the indicators \(\eta _{K}\), and \(\xi _{E,h}\). Indeed, \(\delta _{K,h}\) is much smaller than the others and can be used to adapt the meshes related to the basis functions (fine mesh).

The mesh adaptation process has the following general structure.

Algorithm 2

(Algorithm of adaptation) Given

  • \(\mathcal {T}_{H}\), the coarse mesh;

  • \(n\in {\mathbb {N}}^*\);

  • the date f;

  • \(Tol_H\) desired thresholds of error;

  • \(\theta \), such that \(0<\theta <1\);

  • m the maximum number of iterations;

Initialisation

  1. 1.

    put \(k=0\);

  2. 2.

    build \({{\mathcal {T}}}_{h}\), and calculate \(u^{h}_{H}\) by Algorithm 1(\({{\mathcal {T}}}_{H}\), n, f).

  3. 3.

    take \(\mathcal {T}_{H,k}\leftarrow \mathcal {T}_{H}\) and \(\mathcal {T}_{h,k}\leftarrow \mathcal {T}_{h}\).

The indicators and refinement while \(k\le m\) do

  1. 1.

    for each \( K\in \mathcal {T}_{H,k}\), calculate the error estimators \(\eta _{K}\) and \(\xi _{E,h}\) given by (33) and (34), respectively;

  2. 2.

    If \(\displaystyle \max _{K\in \mathcal {T}_{H},E\in {{\mathcal {E}}}_H}\{\eta _{K},\xi _{E,h}\}\le Tol_H\), then STOP.

  3. 3.

    else

  1. (a)

    refine the elements K, such that: \(\left( \displaystyle \max _{K\in \mathcal {T}_{H},E\in {{\mathcal {E}}}_H}\{\eta _{K},\xi _{E,h}\}\right) \theta \ge Tol_H\),

  2. (b)

    keep conformity with neighboring triangles to obtain the new coarse mesh \({{\mathcal {T}}}_H^*\);

  3. (c)

    \(k\leftarrow k+1\);

  4. (d)

    \(\mathcal {T}_{H,k}\leftarrow \mathcal {T}_{H}^*\);

  5. (e)

    calculate \(u^{h}_{H}\) by Algorithm 1(\({{\mathcal {T}}}_{H,k}\), n, f)

  • end while

Fig. 1
figure 1

Standard FE and MsFEM solutions and initial meshes

We take \(\theta = 4/7 \), \(Tol_H=0,014\), and proceed to mesh adaptivity via the a posteriori estimators, using Algorithm 2. The first iteration of this algorithm gives the estimators for the solution based on the initial meshes. The isovalues of these estimators are given in Fig. 2 (a)–(b). Based on the criteria in the algorithm, we scored by *, in Fig. 2 (c), the elements \(K\in {{\mathcal {T}}}_H\) to be refined .

Fig. 2
figure 2

Isovalues of the indicators related to initial mesh

Fig. 3
figure 3

Refined meshes, the indicators, and the new solution at the first iteration of adaptation

Fig. 4
figure 4

The last mesh adaptation

To compare the MsFEM adaptation with standard FEM adaptation, we use the standard estimators given, for each K in \(\mathcal {T}_{H}\) by:

$$\begin{aligned} I_K^2:=\frac{h_K^2}{\underline{\nu }\,_{\omega _K}}\Vert \hbox {div}(\nu \nabla u_{FEM})\Vert _{0,K}^2+ \frac{1}{2}\sum _{E\in \partial K}\frac{h_E}{\underline{\nu }\,_{\omega _E}}\Vert \left[ \nu \nabla u_{FEM}\cdot n\right] \Vert _{0,E}, \end{aligned}$$

where \(h_K\) is the diameter of K and \(h_E\) is the diameter of E, and we put

\(ER_{MsFEM}:=U_{Ref}-u^{h}_{H}\), the error between the reference solution and the MsFEM solution, and \(ER_{FEM}:=U_{Ref}-u^{EFM}_{H}\), the error between the reference solution and the solution obtained by the standard Finite-Element Method with the coarse mesh. We will consider different norms and put:

  • \(e_{MsFEM}^1:=\left\| ER_{MsFEM}\right\| _{{\mathbb {L}}^{2}(\varOmega )}\) and \(e_{FEM}^1:=\left\| ER_{FEM}\right\| _{{\mathbb {L}}^{2}(\varOmega )}\),

  • \(e_{MsFEM}^2:=\left| ER_{MsFEM}\right| _{H^{1}(\varOmega )}\) and \(e_{FEM}^2:=\left| ER_{FEM}\right| _{H^{1}(\varOmega )}\), \(e_{MsFEM}^3:=\left| ER_{MsFEM}\right| _{\nu }\) and \(e_{FEM}^3:=\left| ER_{FEM}\right| _{\nu }\),

  • \(e_{MsFEM}^4:=\left\| ER_{MsFEM}\right\| _{\infty }\) and \(e_{FEM}^4:=\left\| ER_{FEM}\right\| _{\infty }\).

5.2 Numerical test

We consider the initial coarse mesh \({{\mathcal {T}}}_H\) given in Fig. 1(c) and the corresponding fine mesh given in Fig. 1(d), where we have chosen \(n=4\). By Algorithm  1(\({{\mathcal {T}}}_H\), n, f), we obtain the solution represented by its isovalues in Fig. 1(b). We note that with this initial meshes, the MsFEM solution is less regular than the reference one.

Table 1 Summary of numerical results
Fig. 5
figure 5

\( \log (\eta _K^{max})\) and error

The first adaptation of the coarse mesh \({{\mathcal {T}}}_H\) is made by cutting by 4 the elements K to obtain a finer conforming mesh given in Fig. 3a and the corresponding fine mesh given in Fig. 3b. The solution related to the new meshes is given in Fig. 3f. We note that the modifications are made near the two refined elements. Figure 3 (c), (d), and (e) shows that the isovalues of indicators are smaller near the refined elements.

This procedure of Algorithm 2 is continued, until the estimators reach \(Tol_H\). This is done at the 6\(^{th }\) iteration for the MsFEM solution. In Fig.4, we find all the information about the solution MsFEM at this iteration. The solution FEM presented in this figure is obtained by starting with the initial coarse mesh and using adaptivity via the estimators \(I_K\), until these estimators reach \(Tol_H\). This is done at the 8\(^{th }\) iteration and the results are also presented in Fig. 4.

We notice that MsFEM captures the oscillations much better than the FEM, with a lower cost, since the size of the MsFEM system is smaller than the FEM system (see Table 1). We see in Fig. 4 that the error given by FEM is large in the oscillation zone, while MsFEM gives a better approximation in this zone.

In Table 1, we give a summary of the numerical results for this test. The notation ITE means “iteration”. The suffix “max” or “min” means the maximum value or the minimum value, respectively.

At first sight, we note that the error decreases with the iterations of the mesh adaptation as well as the indicators and their gaps between the maximum and the minimum values. These indicators detect the location where the MsFEM solution is not accurate enough. One of the gaps can sometimes increase, but globally, it decreases. For the same tolerance of the error, MsFEM needs less iterations than FEM, and the solution is better in the different norms, as shown in Table 1. Furthermore, this strategy leads to an equidistributivity of the error, since the gap between the indicators \(\eta _{K,h}\) and \(\xi _{E,h}\) decreases from the first iteration to the last one as well as the others gaps (see Table 1).

In Fig. 5a, we plotted the \(\log \) of the maximum of the indicator \(\eta _K\) as a function of the number of degree of freedom, and in Fig. 5b, we find a comparison between the error MsFEM and the error FEM as functions of the number of iterations.

We tested the robustness of our MsFEM adaptive algorithm when the parameter \(\varepsilon \) goes to 0. In Fig. 5c, we see that the error decreases in a similar way for the three values \(\varepsilon =10^{-2}\), \(\varepsilon =10^{-3}\) or \(\varepsilon =10^{-4}\). Furthermore, we do not need the have the fine mesh very fine. Indeed, in Fig. 5c, we can see that before adaptation procedure, the error is the same for the three fine meshes related to \(h=H/4\), \(h=H/8\), and \(h=H/16\), and it is not recommended to take the mesh \({{\mathcal {T}}}_h\) very fine when we adapt \({{\mathcal {T}}}_H\).

6 Conclusion

In this work, we have presented an a posteriori analysis of a multi-scale finite-element method (MsFEM), for a diffusion problem with highly oscillating coefficients. We derived upper and lower bounds for the approximation error and presented a numerical test confirming their performance in regard to their efficiency and reliability. The indicators obtained are of residual type. Those related to the fine mesh are, in some how, standard and represent the residual equation and the jump of the normal derivative of the solution through the interfaces of the fine mesh. The others are also of residual type and take into account the linearity constraint on the interfaces of the coarse mesh.

It was noticed in the work Lozinski et al. (2013) that the error decreases with the step H of the coarse mesh and a good precision is reached for a relatively small number of basis functions, whereas the difference between the errors associated with the different steps h of the fine mesh is minimal. As a consequence, in the numerical test, we opted to refine only the coarse mesh. In comparison with the standard Finite-Element Method, MsFEM gives better approximation with lower cost.