Nonlinear damped partial differential equations and their uniform discretizations