Skip to content
Merged
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
6 changes: 4 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SciMLBase"
uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
version = "2.122.0"
authors = ["Chris Rackauckas <[email protected]> and contributors"]
version = "2.121.1"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand All @@ -28,6 +28,7 @@ RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
RuntimeGeneratedFunctions = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47"
SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961"
SciMLPublic = "431bcebd-1456-4ced-9d72-93c2757fff0b"
SciMLStructures = "53ae85a6-f571-4167-b2af-e1d143709226"
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Expand Down Expand Up @@ -82,8 +83,8 @@ ConstructionBase = "1.5"
Distributed = "1.10"
Distributions = "0.25"
DocStringExtensions = "0.9"
Enzyme = "0.13"
EnumX = "1"
Enzyme = "0.13"
ForwardDiff = "0.10.36, 1"
FunctionWrappersWrappers = "0.1.3"
IteratorInterfaceExtensions = "^1"
Expand All @@ -110,6 +111,7 @@ Reexport = "1"
ReverseDiff = "1"
RuntimeGeneratedFunctions = "0.5.12"
SciMLOperators = "1.3"
SciMLPublic = "1.0.0"
SciMLStructures = "1.1"
StableRNGs = "1.0"
StaticArrays = "1.7"
Expand Down
2 changes: 2 additions & 0 deletions docs/src/interfaces/Algorithms.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ SciMLBase.isadaptive
SciMLBase.isdiscrete
SciMLBase.forwarddiffs_model
SciMLBase.forwarddiffs_model_time
SciMLBase.has_init
SciMLBase.has_step
```

### Abstract SciML Algorithms
Expand Down
7 changes: 7 additions & 0 deletions src/SciMLBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ import SciMLOperators:

@reexport using SciMLOperators

using SciMLPublic: @public

function __solve end
function __init end

Expand Down Expand Up @@ -930,4 +932,9 @@ export Clocks, TimeDomain, is_discrete_time_domain, isclock, issolverstepclock,

export ODEAliasSpecifier, LinearAliasSpecifier

# Public traits

@public has_init
@public has_step

end
17 changes: 16 additions & 1 deletion src/alg_traits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,23 @@ allows_late_binding_tstops(alg::AbstractODEAlgorithm) = false
"""
$(TYPEDSIGNATURES)

Trait declaration for whether the optimization algorithm supports the `init` interface.
Trait declaration for whether the optimization algorithm supports the `init` interface.

Deprecated as this is not an optimization-specific idea and should use the traits for general caching.
"""
supports_opt_cache_interface(alg) = false

"""
$(TYPEDSIGNATURES)

Trait for specifying whether the passed algorithm supports `init`. Any `init`ed object can `solve!`.
"""
has_init(a::AbstractSciMLAlgorithm) = false

"""
$(TYPEDSIGNATURES)

Trait for specifying whether the passed algorithm supports `step!`, specifying a more direct control over the internal solver process.
See https://docs.sciml.ai/SciMLBase/stable/interfaces/Init_Solve/#init-and-the-Iterator-Interface for more details.
"""
has_step(a::AbstractSciMLAlgorithm) = false
2 changes: 1 addition & 1 deletion src/integrator_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ end
"""
ratenoise_cache(integrator::DEIntegrator)

Returns cache arrays for rate noise in stochastic differential equations.
Returns cache arrays for rate noise in stochastic differential equations.
Returns an empty tuple by default for deterministic problems.
"""
ratenoise_cache(i::DEIntegrator) = ()
Expand Down
Loading