-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparams.chpl
112 lines (80 loc) · 1.88 KB
/
params.chpl
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
use INPUTS;
use FileSystem;
class Params {
var grdfile : string;
var vf : domain(1);
var bf : domain(1);
var ff : domain(1);
var velfiles : [vf] string;
var bryfiles : [bf] string;
var frcfiles : [ff] string;
var Nx : int;
var Ny : int;
var Nz : int;
/* Sigma coordinate parameters */
var theta_s : real;
var theta_b : real;
var hc : real;
var dx : real;
var dy : real;
var area : real;
var iarea : real;
var dt : real;
/* Timestepping */
var Nt_start : int;
var Nt : int;
// For LF-AM3 scheme
var gamma : real;
var us : real;
// For AB3 scheme
var beta : real;
// For RK4 scheme
var one_sixth : real;
// For PPM scheme
var one_third : real;
// For sponge
var v_sponge : real;
var sponge_width : real;
// Order of polynomial for boundary value extrapolation
var ord : int;
proc init() {
this.grdfile = gridfile;
var tmp = glob(velocity_files);
var tmp2 = glob(boundary_files);
var tmp3 = glob(forcing_files);
this.vf = tmp.domain;
this.bf = tmp2.domain;
this.ff = tmp3.domain;
this.velfiles = tmp;
this.bryfiles = tmp2;
this.frcfiles = tmp3;
this.Nx = Nx_;
this.Ny = Ny_;
this.Nz = Nz_;
/* Sigma coordinate parameters */
this.theta_s = theta_s_;
this.theta_b = theta_b_;
this.hc = hc_;
this.dx = dx_;
this.dy = dy_;
this.area = area_;
this.iarea = iarea_;
this.dt = dt_;
this.Nt_start = Nt_start_;
this.Nt = Nt_;
// For LF-AM3 scheme
this.gamma = gamma_;
this.us = us_;
// For AB3 scheme
this.beta = beta_;
// For RK4 scheme
this.one_sixth = one_sixth_;
// For PPM scheme
this.one_third = one_third_;
// For sponge
this.v_sponge = v_sponge_;
this.sponge_width = sponge_width_;
// Order of polynomial for boundary value extrapolation
this.ord = ord_;
}
}