blob: 7e436cf8a768cff80bba6dd7ae59f60b314864d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
//
// Created by Michael Foiani on 4/9/24.
//
#ifndef OCEAN_H
#define OCEAN_H
#include <vector>
#include <utility>
#include <Eigen/Dense>
class ocean
{
public:
ocean();
const int length = 16; // length of grid
const int width = 16; // width of grid
const int N = length * width; // total number of grid points
const double A = 100; // numeric constant for the Phillips spectrum
const double V = 5.0; // wind speed
const std::pair<double, double> omega_wind
= std::make_pair(1.0, 0.0); // wind direction
std::vector<std::pair<double, double>> initial_h; // initial 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
(
int k_index
);
std::pair<double, double> sample_complex_gaussian
();
double phillips_spectrum
(
int k_index
);
std::pair<double, double> 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<double, double> exp_complex
(
std::pair<double, double> z
);
std::pair<double, double> amplitude_t
(
double t,
int k_index
);
};
#endif //OCEAN_H
|