Modeling peripheral nerve stimulation using magnetic fields.