Numerical solution of the shallow water equations on a beach using the weighted average flux method