X-Git-Url: http://git.treefish.org/~alex/seamulator.git/blobdiff_plain/e19dd20d04a2a92b3d91bd25a69210a2351b08c9..5baf6f709bb7943c95318e709efa907a0f3f1986:/sea.h?ds=inline diff --git a/sea.h b/sea.h index 6e24ac3..20f5d63 100644 --- a/sea.h +++ b/sea.h @@ -1,8 +1,11 @@ #pragma once +#include #include #include +#include + #include "seafwd.h" #include "complexpair.h" @@ -12,6 +15,9 @@ class Sea { public: Sea(WaterSurfacePtr surface); + ~Sea(); + Sea(const Sea&) = delete; + Sea& operator=(const Sea&) = delete; void update(); private: @@ -25,10 +31,14 @@ class Sea std::mt19937 m_randomGenerator; std::normal_distribution<> m_normalDistribution; std::vector m_fourierAmplitudes; + fftw_complex *m_fftwIn, *m_fftwOut; + fftw_plan m_fftwPlan; + std::chrono::time_point m_startTime; double phillipsSpectrum(double k_x, double k_y) const; ComplexPair generateFourierAmplitude(double k_x, double k_y); ComplexPair& fourierAmplitudeAt(int n, int m); void generateFourierAmplitudes(); double spatialFrequencyForIndex(int n) const; + double getRuntime() const; };