Skip to content

Commit

Permalink
Try changing MemoryLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed Feb 18, 2021
1 parent 0e508ed commit afee6cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/fedvr_derivatives.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ difffun(B::RestrictedFEDVR, n::Integer) = i -> diff(parent(B),n,i)
derop!(A, B::FEDVROrRestricted, n::Integer) =
set_elements!(difffun(B,n), A, B)

# TODO: this is to avoid expanding out, but could be redesigned
ContinuumArrays.MemoryLayout(::Type{<:BasisOrRestricted{<:FEDVR}}) = ContinuumArrays.BasisLayout()

@materialize function *(Ac::AdjointBasisOrRestricted{<:FEDVR},
D::Derivative,
B::BasisOrRestricted{<:FEDVR})
Expand Down
2 changes: 1 addition & 1 deletion src/restricted_bases.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function restriction_extents(B̃::RestrictedQuasiArray)
end

restriction(B) = Diagonal(Ones{Int}(size(B,2)))
restriction(B̃::RestrictedQuasiArray) = last(LazyArrays.arguments(B̃))
restriction(B̃::RestrictedQuasiArray) = last(LazyArrays.arguments(LazyArrays.ApplyLayout{typeof(*)}(), B̃))

function combined_restriction_selection(A,B)
parent(A) == parent(B) ||
Expand Down

0 comments on commit afee6cb

Please sign in to comment.