File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ function FH_smooth_term(; abstol = 1e-14, reltol = 1e-14)
29
29
data = noise .+ b
30
30
31
31
# solve FH with parameters p
32
- function simulate (p)
32
+ function simulate (p, abstol = 1e-14 , reltol = 1e-14 )
33
33
temp_prob = DifferentialEquations. remake (prob_FH, p = p)
34
34
sol = DifferentialEquations. solve (
35
35
temp_prob,
@@ -46,15 +46,15 @@ function FH_smooth_term(; abstol = 1e-14, reltol = 1e-14)
46
46
end
47
47
48
48
# define residual vector
49
- function residual (p)
50
- F = simulate (p)
49
+ function residual (p, args ... )
50
+ F = simulate (p, args ... )
51
51
F .- = data
52
52
return F
53
53
end
54
54
55
55
# misfit = ‖residual‖² / 2
56
- function misfit (p)
57
- F = residual (p)
56
+ function misfit (p, args ... )
57
+ F = residual (p, args ... )
58
58
return dot (F, F) / 2
59
59
end
60
60
You can’t perform that action at this time.
0 commit comments