-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGrid.h
43 lines (40 loc) · 1.17 KB
/
Grid.h
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
#ifndef GRID_H
#define GRID_H
#include <netcdfcpp.h>
const double gravity = 9.81;
enum bathy { flat, xslope, yslope };
class Grid{
private:
double x_length; // length in x direction
double y_length; // length in y direction
double** h0; // the depth in 2 dimension
double** h; // the depth in 2 dimension
double** u; // the depth in 2 dimension
double** v; // the depth in 2 dimension
double** zeta; // the depth in 2 dimension
double** zeta_star; // the depth in 2 dimension
double hmax; // maximum depth
double hmin; // minimum depth
//grid parameters
double dx; //grid spacing in x direction
double dy; // grid spacing in y direction
bathy slope; // the depth type
bool initialized; // the depth type
int grid_dimx, grid_dimy;
public:
Grid(double, double, double, double, bathy);
void setDepth(double m_h);
double get_x();
double get_y();
double get_dx();
double get_dy();
double** get_h();
int get_grid_dimx();
int get_grid_dimy();
void show();
void maxDepth();
void minDepth();
void initialize();
int solve(Grid myGrid, float dt,float time, float epsilon);
};
#endif