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
{{ message }}
Repository navigation
Commit 2ed51bb
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/src/basics/FAQ.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,12 @@
3
3
## Why are my parameters some obscure object?
4
4
5
5
In ModelingToolkit.jl version 9, the parameter vector was replaced with a custom
6
-
`MTKParameters` object. `AutoSpecialize` ODE problems expose an `OpaqueMTKParameters`
7
-
wrapper around that object so solver compilation can be reused across parameter layouts.
8
-
The internals of both types are intentionally undocumented and subject to change without a
9
-
breaking release. This representation enables us to efficiently store and generate code for
10
-
parameters of multiple types. To obtain parameter values use
6
+
`MTKParameters` object. `AutoSpecialize` problems expose a
7
+
[`SciMLBase.DespecializedParameters`](@ref) wrapper around that object so solver compilation
8
+
can be reused across parameter layouts. The internals of `MTKParameters` are intentionally
9
+
undocumented and subject to change without a breaking release. This representation enables
10
+
us to efficiently store and generate code for parameters of multiple types. To obtain
11
+
parameter values use
11
12
[SymbolicIndexingInterface.jl](https://github.com/SciML/SymbolicIndexingInterface.jl/) or
12
13
[SciMLStructures.jl](https://github.com/SciML/SciMLStructures.jl/). For example:
13
14
@@ -19,8 +20,8 @@ getβ(prob)
19
20
```
20
21
21
22
Indexes into these parameter objects take the form of `ParameterIndex` objects, which are
22
-
similarly undocumented. The following behaviors can be relied on for both
23
-
`MTKParameters`and `OpaqueMTKParameters`:
23
+
similarly undocumented. The following behaviors can be relied on for both`MTKParameters`
24
+
and `SciMLBase.DespecializedParameters`:
24
25
25
26
- It implements the SciMLStructures interface.
26
27
- It can be queried for parameters using functions returned from
@@ -30,7 +31,7 @@ similarly undocumented. The following behaviors can be relied on for both
30
31
-`setindex!` with a `ParameterIndex` can be used to set the value of a parameter with the
31
32
given index.
32
33
- The wrapped `MTKParameters` object is available as the `params` field of an
33
-
`OpaqueMTKParameters` object.
34
+
`SciMLBase.DespecializedParameters` object.
34
35
-`parameter_index(sys, sym)` will return a `ParameterIndex` object if `sys` has been
35
36
`complete`d (through `mtkcompile`, `complete` or `@mtkcompile`).
36
37
-`copy` duplicates the parameter object, including the memory used by the underlying
0 commit comments