summaryrefslogtreecommitdiff
path: root/src/ocean
diff options
context:
space:
mode:
authorjjesswan <jessica_wan@brown.edu>2024-05-09 23:53:08 -0400
committerjjesswan <jessica_wan@brown.edu>2024-05-09 23:53:08 -0400
commit4150f19230962abaf68a8be209c7fa10bc7691e3 (patch)
tree02b5c38f1b54c4e436010972e85cb44ef7641f4d /src/ocean
parentf9819ae7f8b11b298c16eb14d929a9c09038a877 (diff)
relative filepaths thanks joelll
Diffstat (limited to 'src/ocean')
-rw-r--r--src/ocean/ocean_alt.cpp2
-rw-r--r--src/ocean/ocean_alt.h8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/ocean/ocean_alt.cpp b/src/ocean/ocean_alt.cpp
index 0e44d9c..dcc3e42 100644
--- a/src/ocean/ocean_alt.cpp
+++ b/src/ocean/ocean_alt.cpp
@@ -589,7 +589,7 @@ std::vector<Eigen::Vector2d> ocean_alt::fast_fft
}
// divide by N*N and add the signs based on the indices
- double sign[] = {1.0, -1.0};
+ double sign[] = {-1.0, 1.0};
for (int i = 0; i < N; i++)
{
h[i] /= N;
diff --git a/src/ocean/ocean_alt.h b/src/ocean/ocean_alt.h
index dc8888d..9c5e4e2 100644
--- a/src/ocean/ocean_alt.h
+++ b/src/ocean/ocean_alt.h
@@ -42,6 +42,9 @@ public:
return m_foam_constants;
}
+ std::vector<Eigen::Vector3f> m_vertices; // current displacement vector for each K
+
+
@@ -71,8 +74,8 @@ private:
const int num_rows = 256;
const int num_cols = 256;
- const int num_tiles_x = 2;
- const int num_tiles_z = 2;
+ const int num_tiles_x = 1;
+ const int num_tiles_z = 1;
const double vertex_displacement = Lx / 2;
@@ -106,7 +109,6 @@ private:
int iterations = 0;
- std::vector<Eigen::Vector3f> m_vertices; // current displacement vector for each K
const double D = 1.0; // Depth below mean water level (for dispersion relation)