-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: test
remake_buffer
with array symbolics
- Loading branch information
1 parent
62a010f
commit f5e96c6
Showing
2 changed files
with
12 additions
and
0 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[deps] | ||
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" | ||
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5" | ||
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" |
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,11 @@ | ||
using ModelingToolkit | ||
using ModelingToolkit: t_nounits as t | ||
using SymbolicIndexingInterface | ||
|
||
@variables x(t)[1:2] y(t) | ||
@named sys = ODESystem(Equation[], t, [x, y], []) | ||
sys = complete(sys) | ||
|
||
u0 = [1.0, 2.0, 3.0] | ||
newu0 = remake_buffer(sys, u0, Dict(x => [5.0, 6.0], y => 7.0)) | ||
@test newu0 == [5.0, 6.0, 7.0] |