  This paper presents two kinds of strategies to construct structure-preserving
algorithms with homogeneous Neumann boundary conditions for the sine-Gordon
equation, while most existing structure-preserving algorithms are only valid
for zero or periodic boundary conditions. The first strategy is based on the
conventional second-order central difference quotient but with a cell-centered
grid, while the other is established on the regular grid but incorporated with
summation by parts (SBP) operators. Both the methodologies can provide
conservative semi-discretizations with different forms of Hamiltonian
structures and the discrete energy. However, utilizing the existing SBP
formulas, schemes obtained by the second strategy can directly achieve
higher-order accuracy while it is not obvious for schemes based on the
cell-centered grid to make accuracy improved easily. Further combining the
symplectic Runge-Kutta method and the scalar auxiliary variable (SAV) approach,
we construct symplectic integrators and linearly implicit energy-preserving
schemes for the two-dimensional sine-Gordon equation, respectively. Extensive
numerical experiments demonstrate their effectiveness with the homogeneous
Neumann boundary conditions.
