Skip to content

Commit cd4086e

Browse files
authored
bivariate kronecker tests (#123)
1 parent c8dfab2 commit cd4086e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/MultivariateTest.jl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ end
8787
L = LowRankFun((x,y) -> x*y, Chebyshev() Chebyshev())
8888
F = Fun(L)
8989
@test L(0.1, 0.2) F(0.1, 0.2)
90+
91+
D1 = Derivative(space(L), [1,0])
92+
D2 = Derivative(space(L), [0,1])
93+
@test (D2 * L)(0.1, 0.2) Fun()(0.1)
94+
@test (D1 * L)(0.1, 0.2) Fun()(0.2)
95+
@test (D1[L] * L)(0.1, 0.2) 2Fun()(0.1) * Fun()(0.2)^2
96+
@test ((Derivative() I) * L)(0.1, 0.2) Fun()(0.2)
97+
@test ((I Derivative()) * L)(0.1, 0.2) Fun()(0.1)
9098
end
9199

92100

@@ -329,6 +337,16 @@ end
329337
F = LowRankFun((x,y)->hankelh1(0,10abs(y-x)),Chebyshev(1.0..2.0),Chebyshev(Segment(1.0im,2.0im)))
330338

331339
@test F(1.5,1.5im) hankelh1(0,10abs(1.5im-1.5))
340+
341+
P = ProductFun((x,y)->x*y, Chebyshev() Chebyshev())
342+
@test Evaluation(1) * P == Fun()
343+
@test Evaluation(-1) * P == -Fun()
344+
D1 = Derivative(Chebyshev() Chebyshev(), [1,0])
345+
D2 = Derivative(Chebyshev() Chebyshev(), [0,1])
346+
@test (D2 * P)(0.1, 0.2) Fun()(0.1)
347+
@test (D1 * P)(0.1, 0.2) Fun()(0.2)
348+
@test ((I Derivative()) * P)(0.1, 0.2) Fun()(0.1)
349+
@test ((Derivative() I) * P)(0.1, 0.2) Fun()(0.2)
332350
end
333351

334352
@testset "Functional*Fun" begin

0 commit comments

Comments
 (0)