Generalized finite element method