File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 40
40
function jacobimatrix (:: Val{1} , P:: RectPolynomial )
41
41
A,B = P. args
42
42
X = jacobimatrix (A)
43
- P * KronTrav (Eye {eltype(X)} (∞), X)
43
+ KronTrav (Eye {eltype(X)} (∞), X)
44
44
end
45
45
# Actually Jyᵀ
46
46
function jacobimatrix (:: Val{2} , P:: RectPolynomial )
47
47
A,B = P. args
48
48
Y = jacobimatrix (B)
49
- P * KronTrav (Y, Eye {eltype(Y)} (∞))
49
+ KronTrav (Y, Eye {eltype(Y)} (∞))
50
50
end
51
51
@simplify function * (Dx:: PartialDerivative{1} , P:: RectPolynomial )
52
52
A,B = P. args
Original file line number Diff line number Diff line change @@ -51,14 +51,15 @@ using ContinuumArrays: plotgridvalues
51
51
Y = jacobimatrix (Val {2} (), TU)
52
52
𝐱 = axes (TU, 1 )
53
53
x, y = first .(𝐱), last .(𝐱)
54
- @test_broken TU \ (x .* TU) # Should create X, but it fails
55
- @test_broken TU \ (y .* TU) # Should create Y, but it fails
54
+ N = 10
55
+ KR = Block .(1 : N)
56
+ @test (TU \ (x .* TU))[KR,KR] == X[KR,KR]
57
+ @test (TU \ (y .* TU))[KR,KR] == Y[KR,KR]
56
58
f = expand (TU, splat ((x,y) -> exp (x* cos (y- 0.1 ))))
57
59
g = expand (TU, splat ((x,y) -> x* exp (x* cos (y- 0.1 ))))
58
60
h = expand (TU, splat ((x,y) -> y* exp (x* cos (y- 0.1 ))))
59
- N = 10
60
- @test (TU \ (X * (TU \ f)))[Block .(1 : N)] ≈ (TU \ g)[Block .(1 : N)]
61
- @test (TU \ (Y * (TU \ f)))[Block .(1 : N)] ≈ (TU \ h)[Block .(1 : N)]
61
+ @test (X * (TU \ f))[KR] ≈ (TU \ g)[KR]
62
+ @test (Y * (TU \ f))[KR] ≈ (TU \ h)[KR]
62
63
end
63
64
64
65
@testset " Conversion" begin
You can’t perform that action at this time.
0 commit comments