We base on the lattice Boltzmann method for electrodynamics, whose dispersion error has been removed and is third order accuracy. In this thesis, the way to compute the correction term is modified when we use the specular reflection to represent the perfect conductor. Besides, there is also discussion about the way to keep the stability under the frame of adaptive mesh refinement. Finally, the computation in the medium will also be incorporated with the algorithm above, and test the performance in nonlinear medium.