Peristaltic patterns for swelling and shrinking of soft cylindrical gels