You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 19, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: src/derivative_operators/derivative_operator_functions.jl
+65Lines changed: 65 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,11 @@
1
1
function LinearAlgebra.mul!(x_temp::AbstractArray{T}, A::DerivativeOperator{T,N}, M::AbstractArray{T}) where {T<:Real,N}
2
2
3
+
# Check that x_temp has correct dimensions
3
4
v =zeros(ndims(x_temp))
4
5
v[N] =2
5
6
@assert [size(x_temp)...]+v == [size(M)...]
6
7
8
+
# Check that axis of differentiation is in the dimensions of M and x_temp
7
9
ndimsM =ndims(M)
8
10
@assert N <= ndimsM
9
11
@@ -23,6 +25,69 @@ function LinearAlgebra.mul!(x_temp::AbstractArray{T}, A::DerivativeOperator{T,N}
23
25
end
24
26
end
25
27
28
+
for MT in [2,3]
29
+
@evalbegin
30
+
function LinearAlgebra.mul!(x_temp::AbstractArray{T,$MT}, A::DerivativeOperator{T,N,Wind,T2,S1}, M::AbstractArray{T,$MT}) where {T<:Real,N,Wind,T2,SL,S1<:SArray{Tuple{SL},T,1,SL}}
31
+
32
+
# Check that x_temp has correct dimensions
33
+
v =zeros(ndims(x_temp))
34
+
v[N] =2
35
+
@assert [size(x_temp)...]+v == [size(M)...]
36
+
37
+
# Check that axis of differentiation is in the dimensions of M and x_temp
0 commit comments