From ef2411db59ee316ae3f3ec96493840ded9db1436 Mon Sep 17 00:00:00 2001 From: Vedant Puri Date: Sun, 2 Jul 2023 17:01:16 -0400 Subject: [PATCH] comment out deprecations --- src/SciMLBase.jl | 42 +++++++++++++++--------------- src/deprecated.jl | 66 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 21 deletions(-) diff --git a/src/SciMLBase.jl b/src/SciMLBase.jl index 36dbbb30a..1093f01e7 100644 --- a/src/SciMLBase.jl +++ b/src/SciMLBase.jl @@ -551,23 +551,23 @@ $(TYPEDEF) """ abstract type AbstractSensitivitySolution{T, N, S} <: AbstractTimeseriesSolution{T, N, S} end -# Misc -# TODO - deprecate AbstractDiffEqOperator family -""" -$(TYPEDEF) -""" -abstract type AbstractDiffEqOperator{T} <: AbstractSciMLOperator{T} end - -""" -$(TYPEDEF) -""" -abstract type AbstractDiffEqLinearOperator{T} <: AbstractDiffEqOperator{T} end - -""" -$(TYPEDEF) -""" -abstract type AbstractDiffEqCompositeOperator{T} <: AbstractDiffEqLinearOperator{T} end - +# # Misc +# # TODO - deprecate AbstractDiffEqOperator family +# """ +# $(TYPEDEF) +# """ +# abstract type AbstractDiffEqOperator{T} <: AbstractSciMLOperator{T} end +# +# """ +# $(TYPEDEF) +# """ +# abstract type AbstractDiffEqLinearOperator{T} <: AbstractDiffEqOperator{T} end +# +# """ +# $(TYPEDEF) +# """ +# abstract type AbstractDiffEqCompositeOperator{T} <: AbstractDiffEqLinearOperator{T} end +# """ $(TYPEDEF) @@ -668,10 +668,10 @@ $(TYPEDEF) abstract type AbstractParameterizedFunction{iip} <: AbstractODEFunction{iip} end include("retcodes.jl") -include("operators/operators.jl") -include("operators/basic_operators.jl") -include("operators/diffeq_operator.jl") -include("operators/common_defaults.jl") +# include("operators/operators.jl") +# include("operators/basic_operators.jl") +# include("operators/diffeq_operator.jl") +# include("operators/common_defaults.jl") include("symbolic_utils.jl") include("performance_warnings.jl") diff --git a/src/deprecated.jl b/src/deprecated.jl index 2e6527e94..8bee0b097 100644 --- a/src/deprecated.jl +++ b/src/deprecated.jl @@ -16,3 +16,69 @@ const SciMLSolution = AbstractSciMLSolution # Deprecated `destats` @deprecate has_destats(x) has_stats(x) false + +# Deprecated operator interface +const AbstractDiffEqOperator = AbstractSciMLOperator +const AbstractDiffEqLinearOperator = AbstractSciMLOperator +const AbstractDiffEqCompositeOperator = AbstractSciMLOperator + +const DiffEqScaledOperator = ScaledOperator + +#= +function DiffEqScaledOperator(args...; kwargs...) + @warn "SciMLBase.DiffEqScaledOperator is deprecated. + Use SciMLOperators.ScaledOperator instead" + + ScaledOperator(args...; kwargs...) +end + +const FactorizedDiffEqArrayOperator = InvertedOperator +function FactorizedDiffEqArrayOperator(args...; kwargs...) + @warn "SciMLBase.FactorizedDiffEqArrayOperator is deprecated. + Use SciMLOperators.InvertedOperator instead" + + InvertedOperator(args...; kwargs...) +end + +const DiffEqIdentity = IdentityOperator +function DiffEqIdentity(u) + @warn "SciMLBase.DiffEqIdentity is deprecated. + Use SciMLOperators.IdentityOperator instead" + + IdentityOperator{size(u, 1)}() +end + +const DiffEqScalar = SciMLOperators.ScalarOperator +function DiffEqScalar(args...; kwargs...) + @warn "SciMLBase.DiffEqScalar is deprecated. + Use SciMLOperators.ScalarOperator instead" + + ScalarOperator(args...; kwargs...) +end + +const AffineDiffEqOperator = SciMLOperators.AffineOperator +function AffineDiffEqOperator{T}(As, bs, cache = nothing) where {T} + @warn "SciMLBase.AffineDiffEqOperator is deprecated. + Use SciMLOperators.AffineOperator instead" + + bs = isempty(bs) ? (zeros(Bool, size(As[1], 1)),) : bs + + all([size(a) == size(As[1]) for a in As]) || error("Operator sizes do not agree") + all([size(b) == size(bs[1]) for b in bs]) || error("Vector sizes do not agree") + + A = AddedOperator(As) + b = sum(bs) + B = IdentityOperator{size(b, 1)}() + + AffineOperator(A, B, b) +end + +const DiffEqArrayOperator = SciMLOperators.MatrixOperator +function DiffEqArrayOperator(args...; kwargs...) + @warn "SciMLBase.DiffEqArrayOperator is deprecated. + Use SciMLOperators.MatrixOperator instead" + + MatrixOperator(args...; kwargs...) +end +=# +#