Skip to content

Commit 3d0defd

Browse files
authored
Merge pull request #122 from SciML/ap/patch
Patch Watson Function
2 parents 1e8c196 + 6052b7f commit 3d0defd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/NonlinearProblemLibrary/Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
name = "NonlinearProblemLibrary"
22
uuid = "b7050fa9-e91f-4b37-bcee-a89a063da141"
3-
version = "0.1.1"
3+
version = "0.1.2"
44

55
[deps]
66
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
77
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
88

99
[compat]
10+
Aqua = "0.8"
11+
LinearAlgebra = "1.6"
1012
SciMLBase = "1, 2"
1113
julia = "1.6"
1214

lib/NonlinearProblemLibrary/src/NonlinearProblemLibrary.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ p5_dict = Dict("n" => n, "start" => x_start, "sol" => x_sol,
9090
# ------------------------------------- Problem 6 ------------------------------------------
9191
function p6_f!(out, x, p = nothing)
9292
n = length(x)
93+
out .= 0
9394
for i in 1:29
9495
ti = i / 29.0
9596
sum1 = 0.0
@@ -113,7 +114,7 @@ function p6_f!(out, x, p = nothing)
113114
end
114115
end
115116

116-
out[1] = out[1] + 3.0 * x[1] - 2.0 * x[1] * x[1] + 2.0 * x[1]^3
117+
out[1] = out[1] + 3.0 * x[1] - 2.0 * x[1] * x[2] + 2.0 * x[1]^3
117118
out[2] = out[2] + x[2] - x[2]^2 - 1.0
118119
nothing
119120
end

0 commit comments

Comments
 (0)