  A periodically inhomogeneous Schrodinger equation is considered. The
inhomogeneity is reflected through a non-uniform coefficient of the linear and
non-linear term in the equation. Due to the periodic inhomogeneity of the
linear term, the system may admit spectral bands. When the oscillation
frequency of a localized solution resides in one of the finite band gaps, the
solution is a gap soliton, characterized by the presence of infinitely many
zeros in the spatial profile of the soliton. Recently, how to construct such
gap solitons through a composite phase portrait is shown. By exploiting the
phase-space method and combining it with the application of a topological
argument, it is shown that the instability of a gap soliton can be described by
the phase portrait of the solution. Surface gap solitons at the interface
between a periodic inhomogeneous and a homogeneous medium are also discussed.
Numerical calculations are presented accompanying the analytical results.
