Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] deprecate DiffEqOperator family #461

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions src/SciMLBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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")

Expand Down
66 changes: 66 additions & 0 deletions src/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
=#
#
Loading