We define a new rearrangement, called rearrangement by tamping, for non-negative measurable functions defined on R+. This rearrangement has many properties in common with the well-known Schwarz non-increasing rearrangement such as the Pólya–Szegő inequality. Contrary to the Schwarz rearrangement, the tamping also preserves the homogeneous Dirichlet boundary condition of a function.