Rotationally Invariant and Partially Invariant Flows of a Viscous Incompressible Fluid and a Viscous Gas