Magnetic Field Equations and Boundary Conditions in Media