// // Created by Michael Foiani on 4/9/24. // #ifndef OCEAN_H #define OCEAN_H #include #include #include class ocean { public: ocean(); void updateVertexAmplitudes(double t); std::vector get_vertices(); std::vector get_faces(); int getLength() { return this->length; } int getWidth() { return this->width; } private: const int length = 81; // length of grid const int width = 81; // width of grid const int N = length * width; // total number of grid points const double A = 50.0; // numeric constant for the Phillips spectrum const double V = .25; // wind speed const std::pair omega_wind = std::make_pair(1.0, 0.0); // wind direction std::vector> initial_h; // initial height fields for each K std::vector> current_h; // current height fields for each K const double D = 1; // Depth below mean water level (for dispersion relation) std::pair k_index_to_k_vector ( int k_index ); std::pair sample_complex_gaussian (); double phillips_spectrum ( int k_index ); std::pair amplitude_0 ( int k_index ); int k_index_to_negative_k_index ( int k_index ); double omega_dispersion ( double k_magnitude, bool is_shallow=false ); std::pair exp_complex ( std::pair z ); std::pair amplitude_t ( double t, int k_index ); }; #endif //OCEAN_H