# Understanding and implementing the Heterogeneous Multiscale Finite Element Method

I'm following the explanation given by Weinan E and Bjorn Engquist (1994), pp 26-29, and I have a few questions about it. To understand my questions, I'll first try to explain what think I know, and then address what I don't know:

Background

Suppose we are interested in solving the multiscale elliptic PDE $$\nabla\cdot\left(a\left(x,\frac{x}{\epsilon}\right) U\right)=f \text{ in } \Omega$$ $$U=g \text{ in } \partial\Omega$$ where $a\left(x,\frac{x}{\epsilon}\right)$ represents a smooth, highly oscillatory coefficient which is periodic in $y=\frac{x}{\epsilon}$ with period 1.

Normally when we solve this PDE by finite element method with piecewise linear elements, we multiply both sides of the equation by a test function $\Phi_i$, integrate over the domain $\Omega$, and apply divergence theorem, and substitute the linear combination $U=\sum_j\alpha_j\Phi_j(x)$ to obtain the weak formulation. The stiffness matrix would be of the form:

$$A_{ij}=\int_\Omega \nabla\Phi_i\cdot\left(A_H(x)\Phi_j(x)\right)$$

where $A_H(x)$ is the "effective" macroscopic coefficient. Since we are not given the effective coefficient, we must estimate it by a microscopic model as follows:

Recall that in general, the integrals in $A_{ij}$ are computed by numerical quadrature.
Let $$f_{ij}=\nabla\Phi_i\cdot\left(A_H(x)\Phi_j(x)\right).$$
Then we estimate
$$A_{ij}=\int_\Omega f_{ij}\approx\sum_{K\in T_H} |K|\sum_{x_l\in K}w_lf_{ij}(x_l)$$ where $x_l$ and $w_l$ are quadrature points and their respective weights, and |K| is the volume of element K.

So, the goal is to estimate $f_{ij}$ around each quadrature point. We can do this by solving a projection of the original problem into a small cell around each quadrature point. Let's say $I_\delta(x_l)$ is a cubic cell around quadrature point $x_l$ of size $\delta$. We can project the macro state variable $U$ onto a microscopic system with state variable $u$ using a projection operator $Q$ such that $Qu=U$ For each cell we say $Qu=U$ if $$\frac{1}{\delta^d}\int_{I_\delta(x_l)} \nabla u=\nabla U(x_l).$$ (i'm still trying to make sense of why this is so, but let's take it as a given for now).

This is where it gets a bit confusing for me:

Given an arbitrary microscale variational problem
$$\min_u e(u)=\min_U E(U)$$
where
$$E(U) = \min_{Qu=U} e(u)$$

Supposedly, this should easily lead to the result that

$$f_{ij}\approx \frac{1}{\delta^d} \int_{I_\delta(x_l)}\left( \nabla\phi_i\cdot\left(a(x,\frac{x}{\epsilon})\nabla\phi_j(x)\right)\right)$$ where $$\phi_i=\min_{Qu=\Phi_i} \int_{I_delta(x_l)}\nabla u\cdot\left( a(x,\frac{x}{\epsilon})\nabla u\right)$$

This is equivalent to solving

$$\nabla\cdot\left( a(x,\frac{x}{\epsilon}) \phi_i\right)=0$$ $$a(x,\frac{x}{\epsilon})\frac{\partial \phi_i}{dn}=\lambda\cdot \vec{n} \text{ on } \partial I_\delta(x_l)$$

My Questions

1. What is the motivation behind choosing $Qu=U$ iff $$\frac{1}{\delta^d}\int_{I_\delta(x_l)} \nabla u=\nabla U(x_l).$$

2. How can I paraphrase this statement: $$\min_u e(u)=\min_U E(U)$$ where $$E(U) = \min_{Qu=U} e(u)?$$ That is, what is it really telling me about the relationship between the macro state variable $U$ and the micro state variable $u$?

3. How can I make the connection between the definition of $Q$ and obtaining $\phi_i$? The authors obviously left out some steps for the reader to enjoy deriving, but I can't seem to fill in the gaps...

4. For each cell $I_\delta(x_l)$, do I solve for some number $N^*$ micro basis functions $\phi_i$ to compute $f_{ij}(x_l)$ or are the same $N^*$ micro basis functions reused to compute all the $f_{ij}(x_l)$'s? That is, are the $\phi_i$ local to the cell $I_\delta(x_l)$ only?

5. How would one implement the constraint $a(x,\frac{x}{\epsilon})\frac{\partial \phi_i}{dn}=\lambda\cdot \vec{n}$ on $\partial I_\delta(x_l)$? I've never heard of using lagrange multipliers for constraints in a neumann boundary condition.

-