Nitsche type method for approximating boundary conditions in the static Maxwell equations