diff options
Diffstat (limited to 'src/ocean')
-rw-r--r-- | src/ocean/ocean.cpp | 3 | ||||
-rw-r--r-- | src/ocean/ocean.h | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/ocean/ocean.cpp b/src/ocean/ocean.cpp index eabaa8e..bb33106 100644 --- a/src/ocean/ocean.cpp +++ b/src/ocean/ocean.cpp @@ -196,7 +196,7 @@ std::pair<double, double> ocean::amplitude_t // get dispersion from k std::pair<double, double> k = k_index_to_k_vector(k_index); double k_magnitude = sqrt(k.first * k.first + k.second * k.second); - double omega = omega_dispersion(k_magnitude); + double omega = omega_dispersion(k_magnitude, true); // calculate the complex exponential terms double omega_t = omega * t; @@ -234,6 +234,7 @@ std::vector<Eigen::Vector3f> ocean::get_vertices() //if (i < length) double amplitude = current_h[i].first; + // double amplitude = sqrt(current_h[i].first * current_h[i].first + current_h[i].second * current_h[i].second); // if (i < length) amplitude = initial_h[i].first; diff --git a/src/ocean/ocean.h b/src/ocean/ocean.h index a576c44..2387d2a 100644 --- a/src/ocean/ocean.h +++ b/src/ocean/ocean.h @@ -23,12 +23,12 @@ public: private: - const int length = 32; // length of grid - const int width = 32; // width of grid + 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 = 10; // numeric constant for the Phillips spectrum - const double V = 5.0; // wind speed + const double A = 10.0; // numeric constant for the Phillips spectrum + const double V = .25; // wind speed const std::pair<double, double> omega_wind = std::make_pair(1.0, 0.0); // wind direction |