Skip to content

Commit a03937c

Browse files
committed
Update test_triangle.jl
1 parent 92ea2fb commit a03937c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/test_triangle.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,18 @@ import MultivariateOrthogonalPolynomials: tri_forwardrecurrence, grid, TriangleR
201201
Dˣ² = JacobiTriangle(2,0,2) \ (∂ˣ * (∂ˣ * P))
202202
Dʸ² = JacobiTriangle(0,2,2) \ (∂ʸ * (∂ʸ * P))
203203

204+
@testset "mixed diff" begin
205+
P = JacobiTriangle()
206+
f = expand(P, splat((x,y) -> cos(x*exp(y))))
207+
let (x,y) = (0.1,0.2)
208+
@test diff(f, (1,0))[SVector(x,y)] -exp(y)*sin(x*exp(y))
209+
@test diff(f, (0,1))[SVector(x,y)] -x*exp(y)*sin(x*exp(y))
210+
@test diff(f, (2,0))[SVector(x,y)] -exp(2y)*cos(x*exp(y))
211+
@test diff(f, (1,1))[SVector(x,y)] -exp(y)*sin(x*exp(y)) - x*exp(2y)*cos(x*exp(y))
212+
@test diff(f, (0,2))[SVector(x,y)] -x*exp(y)*sin(x*exp(y)) - x^2*exp(2y)*cos(x*exp(y))
213+
end
214+
end
215+
204216
@testset "jacobi" begin
205217
P = JacobiTriangle()
206218

0 commit comments

Comments
 (0)