-
Notifications
You must be signed in to change notification settings - Fork 0
/
auto.py
31 lines (23 loc) · 818 Bytes
/
auto.py
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
import numpy as np
from firedrake import *
from data_gen import gauge_set
from data_fit import pcn
from solver import solve_tides
from solver import gauge_settwo
# Define the parameters for gauge_set
t_trunc = 0
gauge_num = 20
nsteps = 100
TideSolver, wn, wn1, t, F0, c = solve_tides(c = Constant(0.0001))
# Call the gauge_set function
result = gauge_settwo(TideSolver, wn, wn1, t= t, t_trunc=t_trunc, gauge_num=gauge_num, nsteps=nsteps)
# Import the pcn function from data_fit
from data_fit import pcn
# Define the parameters for pcn
iterations = 300
beta = 0.05
cov = np.ones((1, 1))
# Call the pcn function
pcn_result = pcn(TideSolver, wn, wn1, t, result, c=Constant(0.001), iter=iterations, beta=beta, cov=cov, t_trunc = t_trunc, nsteps=nsteps)
# Print or process the pcn_result as needed
print(pcn_result)