boundary condition for electro magnetic field