srmainwaring / asv_wave_sim

This package contains plugins that support the simulation of waves and surface vessels in Gazebo.
GNU General Public License v3.0
110 stars 29 forks source link

Waves simulation optimisation - part 3 #87

Closed srmainwaring closed 1 year ago

srmainwaring commented 1 year ago

This PR is the third part in a series of updates to the wave simulation to improve performance.

Details

  1. Add performance tests under test/performance and add examples for spectrum and FFT simulation calculations.
  2. Replace the component wise implementation of spectrum and spreading function calculations with a std::transform call using the unary / binary version of the evaluate function. This is many times faster than the array based calculation.
  3. Split the reference implementation of the FFT calculation out into a separate class.
  4. Relabel the indices for the elevation, displacement, etc. data in OceanTile - preparation for aligning the storage order to match the storage used in FFTW to reduce extra copies each update.