Skip to content

Commit 98d73ea

Browse files
Merge pull request #298 from agerlach/master
DEU tutorial fix
2 parents d76b37f + 108d530 commit 98d73ea

File tree

3 files changed

+7
-36
lines changed

3 files changed

+7
-36
lines changed

tutorials/DiffEqUncertainty/01-expectation_introduction.jmd

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -358,32 +358,4 @@ The performance gains realized by leveraging batch GPU processing is problem dep
358358
```{julia; echo=false; skip="notebook"}
359359
using SciMLTutorials
360360
SciMLTutorials.tutorial_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file])
361-
```
362-
363-
364-
<!--
365-
## Batch + nout
366-
```julia
367-
using DiffEqGPU
368-
369-
function f(du, u,p,t)
370-
@inbounds begin
371-
du[1] = p[1]*u[1];
372-
end
373-
nothing
374-
end
375-
376-
u0 = Float32[10.0]
377-
p = Float32[-0.3]
378-
tspan = (0.0f0,10.0f0)
379-
prob = ODEProblem(f,u0,tspan,p)
380-
381-
g(sol) = [sol(4.0)[1], sol(6.0)[1]]
382-
383-
u0_dist = [truncated(Normal(3.0f0,2.0f0),-5f0,11f0)]
384-
p_dist = [truncated(Normal(-.7f0, .1f0), -1f0,0f0)]
385-
386-
expectation(g, prob, u0_dist, p_dist, Koopman(), Tsit5(), EnsembleGPUArray();
387-
quadalg = CubaSUAVE(), batch=1000, nout=2)[1]
388-
```
389-
-->
361+
```

tutorials/DiffEqUncertainty/02-AD_and_optimization.jmd

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ The probability of impacting the wall is now
277277
```
278278
We can check if this is within tolerance by
279279
```julia
280-
isapprox(λ, 0.01, atol=1e-5)
280+
abs(λ - 0.01) <= 1e-5
281281
```
282282

283283
Again, we plot some Monte Carlo simulations from this result as follows
@@ -302,12 +302,7 @@ begin
302302
end
303303
```
304304

305-
306-
307-
## Conclusion
308-
309-
310305
```{julia; echo=false; skip="notebook"}
311306
using SciMLTutorials
312307
SciMLTutorials.tutorial_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file])
313-
```
308+
```

tutorials/DiffEqUncertainty/Project.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ DiffEqSensitivity = "41bf760c-e81c-5289-8e54-58b1f1f8abe2"
55
DiffEqUncertainty = "ef61062a-5684-51dc-bb67-a0fcdec5c97d"
66
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
77
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
8+
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
89
NLopt = "76087f3c-5699-56af-9a33-bf431cd00edd"
910
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
1011
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
12+
Quadrature = "67601950-bd08-11e9-3c89-fd23fb4432d2"
1113

1214
[compat]
1315
BenchmarkTools = "0.5"
@@ -16,6 +18,8 @@ DiffEqSensitivity = "6.28"
1618
DiffEqUncertainty = "1.5"
1719
DifferentialEquations = "6.15"
1820
Distributions = "0.23"
21+
ForwardDiff = "0.10"
1922
NLopt = "0.6"
2023
OrdinaryDiffEq = "5.42"
2124
Plots = "1.5"
25+
Quadrature = "1.3"

0 commit comments

Comments
 (0)