Density Functional Methods and Applications to Materials Problems