You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Reference docstrings for algorithm documentation
- Keep examples and troubleshooting sections
- Add algorithm selection guide table
- More concise while maintaining all useful information
Copy file name to clipboardExpand all lines: docs/src/features/dae_initialization.md
+53-89Lines changed: 53 additions & 89 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,97 +20,27 @@ for fully implicit DAEs, or the equivalent constraint for semi-explicit DAEs. Fi
20
20
21
21
## Available Initialization Algorithms
22
22
23
-
The `initializealg` keyword argument to `solve` controls how initialization is performed:
24
-
25
-
### `DefaultInit()`
26
-
27
-
The default initialization algorithm that automatically chooses the most appropriate method based on the problem structure:
28
-
29
-
- If the problem has `initialization_data` (typically from ModelingToolkit), uses `OverrideInit`
30
-
- For DAE problems without `differential_vars`, uses `ShampineCollocationInit`
31
-
- For DAE problems with `differential_vars`, uses `BrownBasicInit`
32
-
- For ODE problems with mass matrices, uses `BrownBasicInit`
33
-
34
-
```julia
35
-
sol =solve(prob, IDA()) # Uses DefaultInit() automatically
36
-
```
37
-
38
-
### `CheckInit()`
39
-
40
-
Only verifies that the provided initial conditions are consistent within tolerance. This is useful when you've already computed consistent initial conditions yourself:
41
-
42
-
```julia
43
-
sol =solve(prob, IDA(), initializealg =CheckInit())
44
-
```
45
-
46
-
If the conditions are not consistent, this will error with a message explaining the inconsistency.
47
-
48
-
### `NoInit()`
49
-
50
-
Skips initialization entirely. Use this when you are certain your initial conditions are consistent:
51
-
52
-
```julia
53
-
sol =solve(prob, IDA(), initializealg =NoInit())
23
+
The `initializealg` keyword argument to `solve` controls how initialization is performed. All algorithms are documented with their docstrings:
24
+
25
+
```@docs
26
+
DiffEqBase.DefaultInit
27
+
DiffEqBase.CheckInit
28
+
DiffEqBase.NoInit
29
+
DiffEqBase.OverrideInit
30
+
DiffEqBase.BrownBasicInit
31
+
DiffEqBase.ShampineCollocationInit
54
32
```
55
33
56
-
⚠️ **Warning**: Using `NoInit()` with inconsistent initial conditions will likely cause solver failures.
57
-
58
-
### `BrownBasicInit()`
59
-
60
-
Implements the algorithm from:
61
-
> P.N. Brown, A.C. Hindmarsh, and L.R. Petzold, "Consistent Initial Condition Calculation for Differential-Algebraic Systems", SIAM J. Sci. Comput., 19(5), pp. 1495-1512, 1998.
62
-
63
-
This method modifies algebraic variables and their derivatives to be consistent while keeping differential variables fixed. It's most effective for index-1 DAEs when `differential_vars` is provided:
0 commit comments