Numerical implementation of periodic condition (290)

For the fully kinetic ion module of GEM code that I am developing, $ \theta $ is chosen in the range $ [0
: 2 \pi]$. The condition (290) imposes the following boundary condition:

$\displaystyle g (\psi, 2 \pi, \alpha) = g (\psi, 0, \alpha + 2 \pi q) .$ (291)

If $ \alpha $ is on a grid, $ \alpha + 2 \pi q$ is usually not on a grid. Therefore, to get the value of $ g (\psi, 0, \alpha + 2 \pi q)$, an interpolation of the discrete date over the generalized toroidal angle $ \alpha $ (or equivalently $ \phi $) is needed, as is shown in Fig. 18.

Figure 18: Twenty magnetic field lines (on $ \psi = 0.2$ magnetic surface) sarting at differnt toroidal angle (blue points) on the midplane ( $ \theta = 0$) go a full poloidal loop (i.e., $ \Delta \theta = 2 \pi $), arriving at a toroidal angle (red points) which are different from their respective starting toroidal angle. The field values on the red points can be obtained by interpolating the field values on the blue points. The safety factor of the magnetic surface $ q = 1.79$. Magnetic field from EAST discharge #59954@3.03s.
\resizebox{8cm}{!}{\includegraphics{/home/yj/project_new/fig_lorentz/fig2fr3/p.eps}}

yj 2018-03-09