11 #include "watersurfacefwd.h"
16 Sea(WaterSurfacePtr surface, double windSpeed, double magicConstant);
18 Sea(const Sea&) = delete;
19 Sea& operator=(const Sea&) = delete;
23 static const double GRAVITATIONAL_CONSTANT;
25 WaterSurfacePtr m_surface;
26 double m_windDirection[2];
28 double m_magicConstant;
29 std::random_device m_randomDevice;
30 std::mt19937 m_randomGenerator;
31 std::normal_distribution<> m_normalDistribution;
32 std::vector<std::complex<double>> m_fourierAmplitudes;
33 fftw_complex *m_fftwIn, *m_fftwOut;
35 std::chrono::time_point<std::chrono::system_clock> m_startTime;
37 double phillipsSpectrum(double k_x, double k_y) const;
38 std::complex<double>& fourierAmplitudeAt(int n, int m);
39 void generateFourierAmplitudes();
40 double spatialFrequencyForIndex(int n) const;
41 double getRuntime() const;