Treatment of wave-breaking and total absorption in a mild-slope equation FEM model