Numerical methods in electromagnetics