A coupled hydrodynamic–structural model of the M4 wave energy converter