diff --git a/src/PositiveIntegrators.jl b/src/PositiveIntegrators.jl index f59dcc7a..1075ac12 100644 --- a/src/PositiveIntegrators.jl +++ b/src/PositiveIntegrators.jl @@ -1,10 +1,10 @@ module PositiveIntegrators # 1. Load dependencies -using LinearAlgebra: LinearAlgebra, Tridiagonal, I, diag, diagind, mul! +using LinearAlgebra: LinearAlgebra, Tridiagonal, I, diag, mul! using SparseArrays: SparseArrays, AbstractSparseMatrix, issparse, nonzeros, nzrange, rowvals, spdiagm -using StaticArrays: SVector, MVector, SMatrix, StaticArray, @SVector, @SMatrix +using StaticArrays: SVector, SMatrix, StaticArray, @SVector, @SMatrix using FastBroadcast: @.. using MuladdMacro: @muladd @@ -12,32 +12,25 @@ using SimpleUnPack: @unpack using Reexport: @reexport -@reexport using SciMLBase: ODEFunction, ODEProblem, init, solve +@reexport using SciMLBase: ODEProblem, init, solve -using SciMLBase: AbstractODEFunction, NullParameters, FullSpecialize, NoSpecialize, +using SciMLBase: AbstractODEFunction, NullParameters, FullSpecialize, isinplace # TODO: Check imports and using statements below, reduce if possible using OrdinaryDiffEq: OrdinaryDiffEq, OrdinaryDiffEqAlgorithm, ODESolution -using SymbolicIndexingInterface +using SymbolicIndexingInterface: SymbolicIndexingInterface using LinearSolve: LinearSolve, LinearProblem, LUFactorization, solve! -using SciMLBase: DEFAULT_OBSERVED -import SciMLBase: interp_summary, - __has_mass_matrix, __has_analytic, __has_tgrad, - __has_jac, __has_jvp, __has_vjp, __has_jac_prototype, - __has_sparsity, __has_Wfact, __has_Wfact_t, - __has_paramjac, __has_syms, __has_indepsym, __has_paramsyms, - __has_observed, __has_colorvec, __has_sys +import SciMLBase: interp_summary using OrdinaryDiffEq: @cache, - DEFAULT_PRECS, OrdinaryDiffEqAdaptiveAlgorithm, OrdinaryDiffEqConstantCache, OrdinaryDiffEqMutableCache, False, - recursivefill!, _vec, wrapprecs, dolinsolve + _vec import OrdinaryDiffEq: alg_order, isfsal, calculate_residuals, calculate_residuals!, alg_cache, get_tmp_cache, @@ -68,6 +61,7 @@ include("mprk.jl") # modified Patankar-Runge-Kutta based on the SSP formulation of RK methods (SSPMPRK) include("sspmprk.jl") +# interpolation for dense output include("interpolation.jl") # predefined PDS problems diff --git a/test/Project.toml b/test/Project.toml index c9bfa0be..8855f505 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,5 +1,6 @@ [deps] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" @@ -11,6 +12,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] Aqua = "0.7, 0.8" +ExplicitImports = "1.0.1" LinearSolve = "2.21" OrdinaryDiffEq = "6.59" Plots = "1.11.1" diff --git a/test/runtests.jl b/test/runtests.jl index 45403557..5988d789 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -11,6 +11,7 @@ using PositiveIntegrators using LinearSolve: RFLUFactorization, LUFactorization, KrylovJL_GMRES using Aqua: Aqua +using ExplicitImports: check_no_implicit_imports, check_no_stale_explicit_imports """ experimental_orders_of_convergence(prob, alg, dts; @@ -210,6 +211,11 @@ end ambiguities = false,) end + @testset "ExplicitImports.jl" begin + @test isnothing(check_no_implicit_imports(PositiveIntegrators)) + @test isnothing(check_no_stale_explicit_imports(PositiveIntegrators)) + end + @testset "ConservativePDSFunction" begin prod_1! = (P, u, p, t) -> begin fill!(P, zero(eltype(P)))