Numerical Methods For Averaging And Homogenization