Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
937eb1a
init
vyudu Feb 14, 2025
55cecfe
begin implementing NLSolve
vyudu Feb 20, 2025
f54da74
basic implementation working
vyudu Feb 20, 2025
ea68831
bump Project.toml
vyudu Feb 20, 2025
1e14e64
refactor: refactor to
vyudu Feb 26, 2025
05cd4db
refactor
vyudu Feb 26, 2025
d8bb4c1
more renaming
vyudu Feb 26, 2025
9780da7
thin dependencies
vyudu Mar 1, 2025
23205f5
Update Project.toml
vyudu Mar 3, 2025
918d83d
add dep to NonlinearSolve
vyudu Mar 12, 2025
8ec870b
refactor: do not use similar(p)
vyudu Mar 12, 2025
d9c0782
fix: can't broadcast over MTKParameter
vyudu Mar 12, 2025
0e56572
feat: add
vyudu Mar 12, 2025
5ad133c
feat: add for ImplicitDiscreteProblem
vyudu Mar 12, 2025
94dcaf1
Add initialization
vyudu Mar 13, 2025
85c33fb
comment out initialize method
vyudu Mar 13, 2025
4c54e07
Update Project.toml
ChrisRackauckas Mar 13, 2025
20be376
Update lib/SimpleImplicitDiscreteSolve/src/solve.jl
ChrisRackauckas Mar 13, 2025
b90176d
use u retcode
vyudu Mar 13, 2025
7faedf3
refactor: SimpleImplicitDiscreteSolve
vyudu Mar 24, 2025
8f10a85
fix test
vyudu Mar 24, 2025
878dc5f
add Project
vyudu Mar 24, 2025
4f52f5a
add License and CI
vyudu Apr 21, 2025
9bff4c8
fix CI script
vyudu Apr 21, 2025
8663f26
fix: don't load SIDS in script
vyudu Apr 21, 2025
fe465cc
fix test compat
vyudu Apr 21, 2025
f6b2579
change SimpleImplicitDiscreteSolve UUID
vyudu Apr 21, 2025
aa126f7
format
vyudu Apr 21, 2025
6725fc8
Update src/NonlinearSolve.jl
ChrisRackauckas Apr 21, 2025
d532041
Update src/NonlinearSolve.jl
ChrisRackauckas Apr 21, 2025
6cba7b7
Update Project.toml
ChrisRackauckas Apr 21, 2025
5d119bc
add StaticArrays
vyudu Apr 21, 2025
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
2 changes: 2 additions & 0 deletions lib/SimpleImplicitDiscreteSolve/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
SimpleNonlinearSolve = "727e6d20-b764-4bd8-a329-72de5adea6c7"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[compat]
DiffEqBase = "6.164.1"
OrdinaryDiffEqSDIRK = "1.2.0"
Reexport = "1.2.2"
SciMLBase = "2.74.1"
SimpleNonlinearSolve = "2.1.0"
StaticArrays = "1.9.13"
Test = "1.10"

[extras]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module SimpleImplicitDiscreteSolve
using SciMLBase
using SimpleNonlinearSolve
using Reexport
using StaticArrays
@reexport using DiffEqBase

"""
Expand Down Expand Up @@ -49,16 +50,13 @@ function DiffEqBase.solve(prob::ImplicitDiscreteProblem, alg::SimpleIDSolve;
tf = prob.tspan[2]
ts = tspan[1]:dt:tspan[2]

if save_everystep && save_start
us = Vector{typeof(u0)}(undef, length(ts))
us[1] = u0
elseif save_everystep
us = Vector{typeof(u0)}(undef, length(ts) - 1)
elseif save_start
us = Vector{typeof(u0)}(undef, 2)
l = save_everystep ? length(ts) - 1 : 1
save_start && (l = l + 1)
u0type = typeof(u0)
us = u0type <: StaticArray ? MVector{l, u0type}(undef) : Vector{u0type}(undef, l)
Comment on lines +53 to +56
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't infer though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm how would I do this then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a switch in the alg that is type based? We can follow up with that though. Let's get a first version and then get that non-allocating.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I'll open it in OrdinaryDiffEq


if save_start
us[1] = u0
else
us = Vector{typeof(u0)}(undef, 1) # for interface compatibility
end

u = u0
Expand Down
Loading