  In this work, we consider the Fokker-Planck equation of the Nonlinear Noisy
Leaky Integrate-and-Fire (NNLIF) model for neuron networks. Due to the firing
events of neurons at the microscopic level, this Fokker-Planck equation
contains dynamic boundary conditions involving specific internal points. To
efficiently solve this problem and explore the properties of the unknown, we
construct a flexible numerical scheme for the Fokker-Planck equation in the
framework of spectral methods that can accurately handle the dynamic boundary
condition. This numerical scheme is stable with suitable choices of test
function spaces, and asymptotic preserving, and it is easily extendable to
variant models with multiple time scales. We also present extensive numerical
examples to verify the scheme properties, including order of convergence and
time efficiency, and explore unique properties of the model, including blow-up
phenomena for the NNLIF model and learning and discriminative properties for
the NNLIF model with learning rules.
