An Introduction to the Theory of Finite Elements