@@ -8,8 +8,6 @@ struct IdentityOperator <: AbstractSciMLOperator{Bool}
88end
99
1010# constructors
11- IdentityOperator (u:: AbstractArray ) = IdentityOperator (size (u,1 ))
12-
1311function Base. one (L:: AbstractSciMLOperator )
1412 @assert issquare (L)
1513 N = size (L, 1 )
@@ -105,8 +103,6 @@ struct NullOperator <: AbstractSciMLOperator{Bool}
105103end
106104
107105# constructors
108- NullOperator (u:: AbstractArray ) = NullOperator (size (u,1 ))
109-
110106function Base. zero (L:: AbstractSciMLOperator )
111107 @assert issquare (L)
112108 N = size (L, 1 )
@@ -636,6 +632,7 @@ function cache_self(L::ComposedOperator, u::AbstractVecOrMat)
636632
637633 K = size (u, 2 )
638634 cache = (zero (u),)
635+
639636 for i in reverse (2 : length (L. ops))
640637 op = L. ops[i]
641638
@@ -644,8 +641,8 @@ function cache_self(L::ComposedOperator, u::AbstractVecOrMat)
644641
645642 T = if op isa FunctionOperator #
646643 # FunctionOperator isn't guaranteed to play by the rules of
647- # `promote_type`. For example, an rFFT is a complex operation
648- # that accepts and complex vector and returns a real one .
644+ # `promote_type`. For example, an irFFT is a complex operation
645+ # that accepts complex vector and returns ones .
649646 op. traits. eltypes[2 ]
650647 else
651648 promote_type (eltype .((op, cache[1 ]))... )
@@ -672,8 +669,8 @@ function cache_internals(L::ComposedOperator, u::AbstractVecOrMat)
672669end
673670
674671function LinearAlgebra. mul! (v:: AbstractVecOrMat , L:: ComposedOperator , u:: AbstractVecOrMat )
675- @assert iscached (L) " cache needs to be set up for operator of type $( typeof (L)) .
676- set up cache by calling cache_operator(L::AbstractSciMLOperator , u::AbstractArray) "
672+ @assert iscached (L) """ cache needs to be set up for operator of type
673+ $L . Set up cache by calling ` cache_operator(L, u)` "" "
677674
678675 vecs = (v, L. cache[1 : end - 1 ]. .. , u)
679676 for i in reverse (1 : length (L. ops))
@@ -683,8 +680,8 @@ function LinearAlgebra.mul!(v::AbstractVecOrMat, L::ComposedOperator, u::Abstrac
683680end
684681
685682function LinearAlgebra. mul! (v:: AbstractVecOrMat , L:: ComposedOperator , u:: AbstractVecOrMat , α, β)
686- @assert iscached (L) " cache needs to be set up for operator of type $( typeof (L)) .
687- set up cache by calling cache_operator(L::AbstractSciMLOperator , u::AbstractArray) "
683+ @assert iscached (L) """ cache needs to be set up for operator of type
684+ $L . Set up cache by calling ` cache_operator(L, u)`. "" "
688685
689686 cache = L. cache[end ]
690687 copy! (cache, v)
@@ -695,8 +692,8 @@ function LinearAlgebra.mul!(v::AbstractVecOrMat, L::ComposedOperator, u::Abstrac
695692end
696693
697694function LinearAlgebra. ldiv! (v:: AbstractVecOrMat , L:: ComposedOperator , u:: AbstractVecOrMat )
698- @assert iscached (L) " cache needs to be set up for operator of type $( typeof (L)) .
699- set up cache by calling cache_operator(L::AbstractSciMLOperator , u::AbstractArray) "
695+ @assert iscached (L) """ cache needs to be set up for operator of type
696+ $L . Set up cache by calling ` cache_operator(L, u)`. "" "
700697
701698 vecs = (u, reverse (L. cache[1 : end - 1 ])... , v)
702699 for i in 1 : length (L. ops)
@@ -801,8 +798,8 @@ function LinearAlgebra.mul!(v::AbstractVecOrMat, L::InvertedOperator, u::Abstrac
801798end
802799
803800function LinearAlgebra. mul! (v:: AbstractVecOrMat , L:: InvertedOperator , u:: AbstractVecOrMat , α, β)
804- @assert iscached (L) " cache needs to be set up for operator of type $( typeof (L)) .
805- set up cache by calling cache_operator(L::AbstractSciMLOperator , u::AbstractArray) "
801+ @assert iscached (L) """ cache needs to be set up for operator of type
802+ $L . Set up cache by calling ` cache_operator(L, u)`. "" "
806803
807804 copy! (L. cache, v)
808805 ldiv! (v, L. L, u)
@@ -815,8 +812,8 @@ function LinearAlgebra.ldiv!(v::AbstractVecOrMat, L::InvertedOperator, u::Abstra
815812end
816813
817814function LinearAlgebra. ldiv! (L:: InvertedOperator , u:: AbstractVecOrMat )
818- @assert iscached (L) " cache needs to be set up for operator of type $( typeof (L)) .
819- set up cache by calling cache_operator(L::AbstractSciMLOperator , u::AbstractArray) "
815+ @assert iscached (L) """ cache needs to be set up for operator of type
816+ $L . Set up cache by calling ` cache_operator(L, u)`. "" "
820817
821818 copy! (L. cache, u)
822819 mul! (u, L. L, L. cache)
0 commit comments