plane. Overall, the numerical results are exceedingly close to the analytic potential, with the mean relative error less than 0.1%. The errors are largest near the sphere boundary whose exact shape is not well resolved by any of the adopted grids.

[cccccc]{}\[!t\] Cartesian & $[-0.5,0.5]\times[-0.5,0.5]\times[-0.5,0.5]$ & $64\times 64\times 64$ & $0.25$ & $0.1$ & $-0.04$\
uniform cylindrical & $[0.5,1]\times[0,2\pi]\times[-0.25,0.25]$ & $64\times 256\times 64$ & $0.72$ & $0.63$ & $-0.04$\
logarithmic cylindrical & $[10^{-2},1]\times[0,2\pi]\times[-0.25,0.25]$ & $128\times 64\times 64$ & $0.27$ & $0.38$ & $-0.04$

Convergence Test {#s:convergence}
----------------

The discrete Poisson equation used for the interior solver in Section \[s:interior\_solver\] and for the boundary condition in Section \[s:bc\] are second-order accurate by construction. If our implementation of the Poisson solver is correct, therefore, the relative errors should be inversely proportional to the square of the grid spacing. To check if this is indeed the case, we repeat the uniform sphere tests by varying the number of cells from $16^3$ to $512^3$. Figure \[fig:convergence\] plots as circles the mean relative errors $\left\langle {\epsilon} \right\rangle$ from the sphere tests as functions of $N_z$. Overall, the errors decrease roughly at a second-order rate with increasing $N_z$, but exhibit some fluctuations. @katz16 noted that these fluctuations of the errors are caused not by the truncation errors of the finite-difference scheme but by inability of an adopted grid to perfectly resolve a spherical mass distribution. This is true even for a spherical grid when the sphere center offsets from the origin.

To delineate the truncation errors alone, it is thus necessary to design a solid figure whose shape is identical to the cell shape of an adopted grid. In addition, the size and mass of the solid figure should be unchanged with varying resolution. For this purpose, we consider a uniform cube with density $\rho=1$, located at $x_1 \le x 