  The paper addresses a numerical method for solving second order elliptic
partial differential equations that describe fields inside heterogeneous media.
The scope is general and treats the case of rough coefficients, i.e.
coefficients with values in $L^\infty(\Omega)$. This class of coefficients
includes as examples media with micro-structure as well as media with multiple
non-separated length scales. The approach taken here is based on the the
generalized finite element method (GFEM) introduced in \cite{107}, and
elaborated in \cite{102}, \cite{103} and \cite{104}. The GFEM is constructed by
partitioning the computational domain $\Omega$ into to a collection of
preselected subsets $\omega_{i},i=1,2,..m$ and constructing finite dimensional
approximation spaces $\Psi_{i}$ over each subset using local information. The
notion of the Kolmogorov $n$-width is used to identify the optimal local
approximation spaces. These spaces deliver local approximations with errors
that decay almost exponentially with the degrees of freedom $N_{i}$ in the
energy norm over $\omega_i$. The local spaces $% \Psi_{i}$ are used within the
GFEM scheme to produce a finite dimensional subspace $S^N$ of $H^{1}(\Omega)$
which is then employed in the Galerkin method. It is shown that the error in
the Galerkin approximation decays in the energy norm almost exponentially
(i.e., super-algebraicly) with respect to the degrees of freedom $N$. When
length scales "`separate" and the microstructure is sufficiently fine with
respect to the length scale of the domain $\omega_i$ it is shown that
homogenization theory can be used to construct local approximation spaces with
exponentially decreasing error in the pre-asymtotic regime.
