-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSWE.h
55 lines (39 loc) · 1.49 KB
/
SWE.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
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef _SWE_
#define _SWE_
#include <floating_types.h>
#define U_SV_ID 0
#define V_SV_ID 1
#define W_SV_ID 2
#define H_SV_ID 3
typedef struct SWE_struct {
// --------------- Nodeset and Relevant Nodepoint Data ---------------------------------- //
int NNodes; // number of nodes
int NNbrs; // number of neighbors
int NNbrs_Padded; // total number of nodes padded by some power of two
int NState; // Number of state variables in SWEs (e.g. 4)
// static node coordinates
fType a; // radius of Earth (meter)
fType gh0; // reference geopotential (meter^2/sec^2)
fType dt; // timestep (sec)
fType gamma; // diffusion coefficient (sec^-1)
fType g; // Gravity acceleration at Earth's surfce (omitted in init file)
fType Omega; // angular velocity of Earth (sec^-1)
fType* x; // x-coordinates
fType* y; // y-coordinates
fType* z; // z-coordinates
fType* f; // Coriolis force
fType* ghm; // the profile of the mountain
// surface projection operators
fType* p_u;
fType* p_v;
fType* p_w;
fType* gradghm; // gradient of the mountains profile
// ------------------- RBF-FD Differentiation Matrix Data ------------------------------- //
int* idx; // Neighbor table
fType* Dx; // d/dx weights
fType* Dy; // d/dy weights
fType* Dz; // d/dz weights
fType* L; // Laplacian weights
} SWE_struct;
void SWE_reorder_nodes(SWE_struct *SWE,int *mapping);
#endif