Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
PerezHz committed Jul 18, 2024
1 parent df4a33a commit 18135f8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ repo = "https://github.com/JuliaDiff/TaylorSeries.jl.git"
version = "0.17.8"

[deps]
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
Expand Down
25 changes: 25 additions & 0 deletions test/manyvariables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,31 @@ end
@test float(TaylorN{Complex{Rational}}) == float(TaylorN{Complex{Float64}})
end

@testset "Test evaluate! method for arrays of TaylorN" begin
x = set_variables("x", order=2, numvars=4)
function radntn!(y)
for k in eachindex(y)
for l in eachindex(y[k])
y[k][l] = randn()
end
end
nothing
end
y = zero(x[1])
radntn!(y)
n = 10
v = [zero(x[1]) for _ in 1:n]
r = [zero(x[1]) for _ in 1:n] # output vector
radntn!.(v)
x1 = randn(4) .+ x
TaylorSeries.zero!.(r)
@time TaylorSeries.evaluate!(v, (x1...,), r)
@time r2 = evaluate.(v, Ref(x1))
@test r == r2
@test iszero(norm(r-r2, Inf))

end

end

@testset "Integrate for several variables" begin
Expand Down

0 comments on commit 18135f8

Please sign in to comment.