Skip to content

Commit

Permalink
test mul for composite maps over non-traditional axes
Browse files Browse the repository at this point in the history
  • Loading branch information
krcools committed Jan 25, 2024
1 parent 6d6edff commit adf9858
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/nontradaxes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,17 @@ using Test, LinearMaps, LinearAlgebra, BlockArrays
B2u = B2*u; L2u = L2*u
@test axes(B2u)[1] == axes(L2u)[1] == axes(B2)[1] == axes(L2)[1]
@test blocklengths(axes(B2u)[1]) == blocklengths(axes(L2u)[1]) == [2,2]

D1 = rand(4,5)
D2 = rand(5,3)
D3 = rand(3,6)
A1 = PseudoBlockMatrix(D1, [1,3], [2,3])
A2 = PseudoBlockMatrix(D2, [2,3], [2,1])
A3 = PseudoBlockMatrix(D3, [2,1], [3,2,1])
u = rand(6)
x = PseudoBlockVector(u, [3,2,1])
L = LinearMap(A1) * LinearMap(A2) * LinearMap(A3)
y = L * x
v = Vector(y)
@test v D1*(D2*(D3*u))
end

0 comments on commit adf9858

Please sign in to comment.