In order to decrease the edge effect of the field, the designed magnetic field distribution in a large-scale FFAG magnet is realized by both the trim coil and the shape of the magnet pole-face. Through two-dimensional POISSON simulations, the distribution about the current and the position of the trim coil and the shape of the magnet pole are determined. In order to facilitate the POISSON design, two codes are written to automatically adjust the current and the position of the trim coil and the shape of magnet pole-face appeared in the POISSON input file. With the two codes, the efficiency of POISSON simulations is improved and the mistakes which might occur in writing and adjusting the POISSON input file manually could be avoided.