Periodic mesh advection

How to track a moving Lagrangian boundary with L-periodic in x direction?

I know such problem is solved by Alan Riquier,

Numerical study of a viscous breaking water wave and the limit of vanishing viscosity


In slide p2, the advected mesh seems to be related to movemesh :

mesh th1 = movemesh(Th, [x+w1*coef, y+w2*coef])

However I am not sure how to do this with a pair of periodic boundary. The difficulty to ensure that the geometry shape is unchanged except for the moving interface. And, how to to deal with upper-left and upper right vertices?

Unfortunately, the paper didn’t show details of the numerical implementation.
Does anyone know how to reproduce it?

Best regards.