Generalized finite element solution to one-dimensional flux problems.