diff options
author | jjesswan <jessica_wan@brown.edu> | 2024-04-09 22:09:55 -0400 |
---|---|---|
committer | jjesswan <jessica_wan@brown.edu> | 2024-04-09 22:09:55 -0400 |
commit | 33da3ed6ca5d92e9a29935150b01b62daef75a04 (patch) | |
tree | c6c3ecf092310b242d5df5245c43b347ebba242e /src/ocean/ocean.h | |
parent | 7a8d0d8bc2572707c9d35006f30ea835c86954b0 (diff) |
add update loop
Diffstat (limited to 'src/ocean/ocean.h')
-rw-r--r-- | src/ocean/ocean.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/ocean/ocean.h b/src/ocean/ocean.h index 7e436cf..faa0fb2 100644 --- a/src/ocean/ocean.h +++ b/src/ocean/ocean.h @@ -14,9 +14,17 @@ class ocean { public: ocean(); + void updateVertexAmplitudes(double t); + std::vector<Eigen::Vector3f> get_vertices(); + std::vector<Eigen::Vector3i> get_faces(); - const int length = 16; // length of grid - const int width = 16; // width of grid + + + +private: + + const int length = 32; // length of grid + const int width = 32; // width of grid const int N = length * width; // total number of grid points const double A = 100; // numeric constant for the Phillips spectrum @@ -25,13 +33,11 @@ public: = std::make_pair(1.0, 0.0); // wind direction std::vector<std::pair<double, double>> initial_h; // initial height fields for each K + std::vector<std::pair<double, double>> current_h; // current height fields for each K + const double D = 1; // Depth below mean water level (for dispersion relation) - std::vector<Eigen::Vector3f> get_vertices - (); - std::vector<Eigen::Vector3i> get_faces - (); std::pair<double, double> k_index_to_k_vector ( |