Skip to content

Commit 5ce7dac

Browse files
committed
docs: document DAEProblem constructor
1 parent 60e202e commit 5ce7dac

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Diff for: docs/src/systems/ODESystem.md

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jacobian_sparsity
6262
ODEFunction(sys::ModelingToolkit.AbstractODESystem, args...)
6363
ODEProblem(sys::ModelingToolkit.AbstractODESystem, args...)
6464
SteadyStateProblem(sys::ModelingToolkit.AbstractODESystem, args...)
65+
DAEProblem(sys::ModelingToolkit.AbstractODESystem, args...)
6566
```
6667

6768
## Expression Constructors

Diff for: src/systems/diffeqs/abstractodesystem.jl

+3-1
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,8 @@ DiffEqBase.DAEProblem{iip}(sys::AbstractODESystem, du0map, u0map, tspan,
941941
942942
Generates a DAEProblem from an ODESystem and allows for automatically
943943
symbolically calculating numerical enhancements.
944+
945+
Note: Solvers for DAEProblems like DFBDF, DImplicitEuler, DABDF2 are generally slower than the ones for ODEProblems. If possible, it is recommended to formulate your problem in terms of an ODEProblem and use the corresponding ODE Solvers.
944946
"""
945947
function DiffEqBase.DAEProblem(sys::AbstractODESystem, args...; kwargs...)
946948
DAEProblem{true}(sys, args...; kwargs...)
@@ -951,7 +953,7 @@ function DiffEqBase.DAEProblem{iip}(sys::AbstractODESystem, du0map, u0map, tspan
951953
warn_initialize_determined = true,
952954
check_length = true, eval_expression = false, eval_module = @__MODULE__, kwargs...) where {iip}
953955
if !iscomplete(sys)
954-
error("A completed system is required. Call `complete` or `structural_simplify` on the system before creating a `DAEProblem`")
956+
error("A completed system is required. Call `complete` or `structural_simplify` on the system before creating a `DAEProblem`.")
955957
end
956958
f, du0, u0, p = process_SciMLProblem(DAEFunction{iip}, sys, u0map, parammap;
957959
implicit_dae = true, du0map = du0map, check_length,

0 commit comments

Comments
 (0)