Skip to content

Commit 604b50c

Browse files
add more downstream testing
1 parent b5d8407 commit 604b50c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/init.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function __init__()
7474

7575
function DiffEqBase.get_tmp(dc::DiffEqBase.DiffCache, u::LabelledArrays.LArray{T,N,D,Syms}) where {T,N,D,Syms}
7676
x = reinterpret(T, dc.dual_du.__x)
77-
LArray{T,N,D,Syms}(x)
77+
LabelledArrays.LArray{T,N,D,Syms}(x)
7878
end
7979

8080
get_tmp(dc::DiffCache, u::AbstractArray) = dc.du

test/downstream/labelledarrays.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,14 @@ differential_vars = LVector(x=true, y=true, z=false)
1515
prob = DAEProblem(f,du₀,u₀,tspan,differential_vars=differential_vars)
1616

1717
sol = solve(prob, DImplicitEuler())
18+
19+
function f1(du,u,p,t)
20+
du.x .= -1 .* u.x .* u.y .* p[1]
21+
du.y .= -1 .* u.y .* p[2]
22+
end
23+
const n = 1000
24+
u_0 = @LArray fill(1000.0,2*n) (x = (1:n),y = (n+1:2*n))
25+
p = [0.1,0.1]
26+
prob1 = ODEProblem(f1,u_0,(0,100.0),p)
27+
sol = solve(prob1, Rodas5())
28+
sol = solve(prob1, Rodas5(autodiff=false))

0 commit comments

Comments
 (0)