Skip to content

Commit d7c56a8

Browse files
committed
add test
1 parent 81030fa commit d7c56a8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/forwarddiff_overloads.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using LinearSolve
2+
using ForwardDiff
3+
4+
5+
function h(p)
6+
(A = [p[1] p[2]+1 p[2]^3;
7+
3*p[1] p[1]+5 p[2] * p[1]-4;
8+
p[2]^2 9*p[1] p[2]],
9+
b = [p[1] + 1, p[2] * 2, p[1]^2])
10+
end
11+
12+
A, b = h([ForwardDiff.Dual(5.0, 1.0, 0.0), ForwardDiff.Dual(5.0, 0.0, 1.0)])
13+
14+
prob = LinearProblem(A, b)
15+
solve(prob)
16+
17+

0 commit comments

Comments
 (0)