Skip to content

Commit

Permalink
Merge pull request #423 from SciML/sb/docs2
Browse files Browse the repository at this point in the history
docs: fix remake of the prob
  • Loading branch information
ChrisRackauckas authored Oct 27, 2024
2 parents 2c9d81e + f469d95 commit 00f46e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
RuntimeGeneratedFunctions = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
SciMLStructures = "53ae85a6-f571-4167-b2af-e1d143709226"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5"
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
Expand All @@ -40,6 +41,7 @@ PrecompileTools = "1"
RuntimeGeneratedFunctions = "0.5.9"
SafeTestsets = "0.0.1"
SciMLBase = "2"
SciMLStructures = "1.5"
StaticArrays = "1"
SymbolicIndexingInterface = "0.3.0"
SymbolicUtils = "2, 3"
Expand Down
4 changes: 3 additions & 1 deletion docs/src/tutorials/params.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ The system does not need to be re-discretized every time we want to plot with di

```@example ivs2
using ModelingToolkit, MethodOfLines, OrdinaryDiffEq, DomainSets
using SciMLStructures: replace!, Tunable
@parameters t x
@parameters Dn, Dp
Expand Down Expand Up @@ -84,7 +85,8 @@ prob = discretize(pdesys, discretization) # This gives an ODEProblem since it's
sols = []
for (Dnval, Dpval) in zip(rand(10), rand(10))
newprob = remake(prob, p = [Dnval, Dpval])
newprob = remake(prob)
replace!(Tunable(), newprob.p, [Dnval, Dpval])
push!(sols, solve(newprob, Tsit5()))
end
Expand Down

0 comments on commit 00f46e6

Please sign in to comment.