Optimization of dimensions and layout of an array of wave energy converters