Hydrodynamic characteristics of offshore and pile breakwaters