An implicit–explicit time discretization scheme for second-order semilinear wave equations with application to dynamic boundary conditions