Skip to content

Commit

Permalink
Patch Watson Function
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Dec 25, 2023
1 parent 1e8c196 commit c4920b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/NonlinearProblemLibrary/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "NonlinearProblemLibrary"
uuid = "b7050fa9-e91f-4b37-bcee-a89a063da141"
version = "0.1.1"
version = "0.1.2"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
3 changes: 2 additions & 1 deletion lib/NonlinearProblemLibrary/src/NonlinearProblemLibrary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ p5_dict = Dict("n" => n, "start" => x_start, "sol" => x_sol,
# ------------------------------------- Problem 6 ------------------------------------------
function p6_f!(out, x, p = nothing)
n = length(x)
out .= 0
for i in 1:29
ti = i / 29.0
sum1 = 0.0
Expand All @@ -113,7 +114,7 @@ function p6_f!(out, x, p = nothing)
end
end

out[1] = out[1] + 3.0 * x[1] - 2.0 * x[1] * x[1] + 2.0 * x[1]^3
out[1] = out[1] + 3.0 * x[1] - 2.0 * x[1] * x[2] + 2.0 * x[1]^3
out[2] = out[2] + x[2] - x[2]^2 - 1.0
nothing
end
Expand Down

0 comments on commit c4920b7

Please sign in to comment.