-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #594 from AayushSabharwal/as/override-init
feat: support `initialize_dae!` for `SDEIntegrator`
- Loading branch information
Showing
6 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ authors = ["Chris Rackauckas <[email protected]>"] | |
version = "6.71.1" | ||
|
||
[deps] | ||
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" | ||
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" | ||
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" | ||
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" | ||
|
@@ -20,6 +21,7 @@ Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" | |
MuladdMacro = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" | ||
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" | ||
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" | ||
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
RandomNumbers = "e6cf234a-135c-5ec9-84dd-332b85af5143" | ||
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" | ||
|
@@ -32,6 +34,7 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" | |
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" | ||
|
||
[compat] | ||
ADTypes = "1" | ||
Adapt = "3, 4" | ||
ArrayInterface = "6, 7" | ||
DataStructures = "0.18" | ||
|
@@ -48,11 +51,12 @@ Logging = "1.6" | |
MuladdMacro = "0.2.1" | ||
NLsolve = "4" | ||
OrdinaryDiffEq = "6.87" | ||
OrdinaryDiffEqCore = "1.12.1" | ||
Random = "1.6" | ||
RandomNumbers = "1.5.3" | ||
RecursiveArrayTools = "2, 3" | ||
Reexport = "0.2, 1.0" | ||
SciMLBase = "2.59.2" | ||
SciMLBase = "2.65" | ||
SciMLOperators = "0.2.9, 0.3" | ||
SparseArrays = "1.6" | ||
SparseDiffTools = "2" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
struct SDEDefaultInit <: DiffEqBase.DAEInitializationAlgorithm end | ||
|
||
function DiffEqBase.initialize_dae!(integrator::Union{AbstractSDEIntegrator, AbstractSDDEIntegrator}, initializealg = integrator.initializealg) | ||
OrdinaryDiffEqCore._initialize_dae!(integrator, integrator.sol.prob, initializealg, Val(DiffEqBase.isinplace(integrator.sol.prob))) | ||
end | ||
|
||
function OrdinaryDiffEqCore._initialize_dae!(integrator::Union{AbstractSDEIntegrator, AbstractSDDEIntegrator}, prob, ::SDEDefaultInit, isinplace) | ||
if SciMLBase.has_initializeprob(prob.f) | ||
OrdinaryDiffEqCore._initialize_dae!(integrator, prob, SciMLBase.OverrideInit(), isinplace) | ||
elseif SciMLBase.__has_mass_matrix(prob.f) | ||
OrdinaryDiffEqCore._initialize_dae!(integrator, prob, SciMLBase.CheckInit(), isinplace) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters