Optimizing the design of two-dimensional wave impeding barriers