Symmetry reduction of the Boussinesq equation to ordinary differential equations