  We study modes trapped in a rotating ring with the local strength of the
nonlinearity modulated as cos(2\theta), where \theta is the azimuthal angle.
This modulation pattern may be of three different types: self-focusing (SF),
self-defocusing (SDF), and alternating SF-SDF. The model, based on the
nonlinear Schrodinger (NLS) equation with periodic boundary conditions, applies
to the light propagation in a twisted pipe waveguide, and to a Bose-Einstein
condensate (BEC) loaded into a toroidal trap, under the action of the rotating
nonlinear pseudopotential induced by means of the Feshbach resonance in an
inhomogeneous external field. In the SF, SDF, and alternating regimes, four,
three, and five different types of stable trapped modes are identified,
respectively: even, odd, second-harmonic (2H), symmetry-breaking, and
2H-breaking ones. The shapes and stability of these modes, together with
transitions between them, are investigated in the first rotational Brillouin
zone. Ground-state modes are identified in each regime. Boundaries between
symmetric and asymmetric modes are also obtained in an analytical form, by of a
two-mode approximation.
