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

Upstream #12

Merged
merged 57 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
03852a7
CompatHelper: add new compat entry for OrdinaryDiffEqVerner at versio…
Aug 16, 2024
0dfb328
CompatHelper: add new compat entry for OrdinaryDiffEqHighOrderRK at v…
Aug 16, 2024
9de3fe3
CompatHelper: add new compat entry for OrdinaryDiffEqLowOrderRK at ve…
Aug 16, 2024
12592dd
CompatHelper: add new compat entry for OrdinaryDiffEqDifferentiation …
Aug 16, 2024
5c4f0d0
CompatHelper: add new compat entry for OrdinaryDiffEqTsit5 at version…
Aug 16, 2024
1ec4e1a
add strip interpolation and cache
jClugstor Aug 19, 2024
03d5437
add strip_cache function
jClugstor Aug 19, 2024
ba0ad3a
CompatHelper: add new compat entry for OrdinaryDiffEqFunctionMap at v…
Aug 19, 2024
165b352
CompatHelper: add new compat entry for OrdinaryDiffEqExtrapolation at…
Aug 19, 2024
67295af
CompatHelper: add new compat entry for OrdinaryDiffEqRKN at version 1…
Aug 19, 2024
f5897e6
CompatHelper: add new compat entry for OrdinaryDiffEqAdamsBashforthMo…
Aug 19, 2024
6431bf4
CompatHelper: add new compat entry for OrdinaryDiffEqNonlinearSolve a…
Aug 19, 2024
91b3a2e
CompatHelper: add new compat entry for OrdinaryDiffEqPRK at version 1…
Aug 19, 2024
d38941c
CompatHelper: add new compat entry for OrdinaryDiffEqQPRK at version …
Aug 19, 2024
3037381
CompatHelper: add new compat entry for OrdinaryDiffEqFeagin at versio…
Aug 19, 2024
339710b
CompatHelper: add new compat entry for OrdinaryDiffEqStabilizedRK at …
Aug 19, 2024
9fe376c
CompatHelper: add new compat entry for OrdinaryDiffEqLowStorageRK at …
Aug 19, 2024
28acbff
change the way the cache stripping works
jClugstor Aug 21, 2024
0f8d9d4
namespace for typename
jClugstor Aug 21, 2024
18448c7
add strip_cache to imports of OrdinaryDiffEq
jClugstor Aug 21, 2024
adc6181
add tests for interp and cache stripping
jClugstor Aug 21, 2024
ce1ff43
add strip_interpolation to OrdinaryDiffEq imports
jClugstor Aug 21, 2024
7f34b3c
actually add to run test
jClugstor Aug 21, 2024
c47ce94
fix test
jClugstor Aug 21, 2024
ed4d619
actually fix test I think
jClugstor Aug 21, 2024
aa9b374
fix test again
jClugstor Aug 21, 2024
c1e3ed1
I was being silly
jClugstor Aug 21, 2024
05f9229
Merge pull request #2393 from jClugstor/cache_stripping
ChrisRackauckas Aug 22, 2024
0478a8f
Merge pull request #2384 from SciML/compathelper/new_version/2024-08-…
ChrisRackauckas Aug 22, 2024
4723872
Merge branch 'master' into compathelper/new_version/2024-08-16-22-07-…
ChrisRackauckas Aug 22, 2024
5e5f876
Merge pull request #2386 from SciML/compathelper/new_version/2024-08-…
ChrisRackauckas Aug 22, 2024
e3b4626
Merge branch 'master' into compathelper/new_version/2024-08-16-22-07-…
ChrisRackauckas Aug 22, 2024
4b50447
Merge pull request #2385 from SciML/compathelper/new_version/2024-08-…
ChrisRackauckas Aug 22, 2024
99aebc8
Merge branch 'master' into compathelper/new_version/2024-08-16-22-07-…
ChrisRackauckas Aug 22, 2024
bdc05bb
Merge pull request #2387 from SciML/compathelper/new_version/2024-08-…
ChrisRackauckas Aug 22, 2024
12a59f5
Merge branch 'master' into compathelper/new_version/2024-08-16-22-07-…
ChrisRackauckas Aug 22, 2024
a6c8838
Merge pull request #2388 from SciML/compathelper/new_version/2024-08-…
ChrisRackauckas Aug 22, 2024
770abe4
Merge branch 'master' into compathelper/new_version/2024-08-19-23-08-…
ChrisRackauckas Aug 22, 2024
d5b51a0
Merge pull request #2395 from SciML/compathelper/new_version/2024-08-…
ChrisRackauckas Aug 22, 2024
4fa25ab
Merge branch 'master' into compathelper/new_version/2024-08-19-23-08-…
ChrisRackauckas Aug 22, 2024
05a539c
Merge pull request #2396 from SciML/compathelper/new_version/2024-08-…
ChrisRackauckas Aug 22, 2024
90d2551
Merge pull request #2398 from SciML/compathelper/new_version/2024-08-…
ChrisRackauckas Aug 22, 2024
bd6afd8
Merge branch 'master' into compathelper/new_version/2024-08-19-23-08-…
ChrisRackauckas Aug 22, 2024
15bcaa9
Merge pull request #2397 from SciML/compathelper/new_version/2024-08-…
ChrisRackauckas Aug 22, 2024
c780d32
Merge branch 'master' into compathelper/new_version/2024-08-19-23-08-…
ChrisRackauckas Aug 22, 2024
2745a6d
Merge pull request #2399 from SciML/compathelper/new_version/2024-08-…
ChrisRackauckas Aug 22, 2024
6c29b3a
Merge branch 'master' into compathelper/new_version/2024-08-19-23-08-…
ChrisRackauckas Aug 22, 2024
5a6f934
Merge pull request #2400 from SciML/compathelper/new_version/2024-08-…
ChrisRackauckas Aug 22, 2024
e890a3d
Merge branch 'master' into compathelper/new_version/2024-08-19-23-08-…
ChrisRackauckas Aug 22, 2024
1b25703
Merge pull request #2401 from SciML/compathelper/new_version/2024-08-…
ChrisRackauckas Aug 22, 2024
5efedb8
Merge branch 'master' into compathelper/new_version/2024-08-19-23-08-…
ChrisRackauckas Aug 22, 2024
d752b11
Merge pull request #2402 from SciML/compathelper/new_version/2024-08-…
ChrisRackauckas Aug 22, 2024
08d4aa3
Merge branch 'master' into compathelper/new_version/2024-08-19-23-08-…
ChrisRackauckas Aug 22, 2024
faccae0
Merge pull request #2403 from SciML/compathelper/new_version/2024-08-…
ChrisRackauckas Aug 22, 2024
431d0e3
Merge branch 'master' into compathelper/new_version/2024-08-19-23-08-…
ChrisRackauckas Aug 22, 2024
64a5938
Merge pull request #2404 from SciML/compathelper/new_version/2024-08-…
ChrisRackauckas Aug 22, 2024
b609a4d
Update Project.toml
ChrisRackauckas Aug 22, 2024
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
15 changes: 15 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,22 @@ Logging = "1.9"
MacroTools = "0.5"
MuladdMacro = "0.2.1"
NonlinearSolve = "3"
OrdinaryDiffEqAdamsBashforthMoulton = "1"
OrdinaryDiffEqCore = "1"
OrdinaryDiffEqDifferentiation = "1"
OrdinaryDiffEqExtrapolation = "1"
OrdinaryDiffEqFeagin = "1"
OrdinaryDiffEqFunctionMap = "1"
OrdinaryDiffEqLowOrderRK = "1"
OrdinaryDiffEqLowStorageRK = "1"
OrdinaryDiffEqHighOrderRK = "1"
OrdinaryDiffEqNonlinearSolve = "1"
OrdinaryDiffEqPRK = "1"
OrdinaryDiffEqQPRK = "1"
OrdinaryDiffEqRKN = "1"
OrdinaryDiffEqStabilizedRK = "1"
OrdinaryDiffEqTsit5 = "1"
OrdinaryDiffEqVerner = "1"
Polyester = "0.7"
PreallocationTools = "0.4"
PrecompileTools = "1"
Expand Down
2 changes: 1 addition & 1 deletion lib/OrdinaryDiffEqCore/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "OrdinaryDiffEqCore"
uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
authors = ["ParamThakkar123 <[email protected]>"]
version = "1.1.0"
version = "1.2.0"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down
26 changes: 26 additions & 0 deletions lib/OrdinaryDiffEqCore/src/interp_func.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,29 @@ function InterpolationData(id::InterpolationData, f)
id.differential_vars,
id.sensitivitymode)
end

# strip interpolation of function information
function SciMLBase.strip_interpolation(id::InterpolationData)

cache = strip_cache(id.cache)

InterpolationData(nothing, id.timeseries,
id.ts,
id.ks,
id.alg_choice,
id.dense,
cache,
id.differential_vars,
id.sensitivitymode)
end

function strip_cache(cache)
if hasfield(typeof(cache), :jac_config) || hasfield(typeof(cache), :grad_config)
fieldnums = length(fieldnames(typeof(cache)))
noth_list = fill(nothing,fieldnums)
cache_type_name = Base.typename(typeof(cache)).wrapper
cache_type_name(noth_list...)
else
cache
end
end
2 changes: 1 addition & 1 deletion src/OrdinaryDiffEq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import OrdinaryDiffEqCore: trivial_limiter!, CompositeAlgorithm, alg_order,
_change_t_via_interpolation!, ODEIntegrator, _ode_interpolant!,
current_interpolant, resize_nlsolver!, _ode_interpolant,
handle_tstop!, _postamble!, update_uprev!, resize_J_W!,
DAEAlgorithm, get_fsalfirstlast
DAEAlgorithm, get_fsalfirstlast, strip_cache, strip_interpolation

export CompositeAlgorithm, ShampineCollocationInit, BrownFullBasicInit, NoInit
AutoSwitch
Expand Down
17 changes: 17 additions & 0 deletions test/interface/ode_strip_test.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using OrdinaryDiffEq, Test
import SciMLBase

function lorenz!(du, u, p, t)
du[1] = 10.0 * (u[2] - u[1])
du[2] = u[1] * (28.0 - u[3]) - u[2]
du[3] = u[1] * u[2] - (8 / 3) * u[3]
end

u0 = [1.0; 0.0; 0.0]
tspan = (0.0, 0.5)
prob = ODEProblem(lorenz!, u0, tspan)

sol = solve(prob, Rosenbrock23())

@test isnothing(SciMLBase.strip_interpolation(sol.interp).f)
@test isnothing(SciMLBase.strip_interpolation(sol.interp).cache.jac_config)
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ end
@time @safetestset "Inplace Interpolation Tests" include("interface/inplace_interpolation.jl")
@time @safetestset "Algebraic Interpolation Tests" include("interface/algebraic_interpolation.jl")
@time @safetestset "Default Solver Tests" include("interface/default_solver_tests.jl")
@time @safetestset "Interpolation and Cache Stripping Tests" include("interface/ode_strip_test.jl")
end

if !is_APPVEYOR && (GROUP == "All" || GROUP == "InterfaceII" || GROUP == "Interface")
Expand Down
Loading