-
Notifications
You must be signed in to change notification settings - Fork 1
/
nonlin-opt-sigmoid.jl
2258 lines (1864 loc) · 80 KB
/
nonlin-opt-sigmoid.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
### A Pluto.jl notebook ###
# v0.19.9
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
local el = $(esc(element))
global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el)
el
end
end
# ╔═╡ 93233800-f607-11eb-3ef6-9bc20acb1e57
begin
using DiffEqOperators, OrdinaryDiffEq, SpecialFunctions, Interpolations, Plots, Plots.PlotMeasures, PlutoUI, NPZ, ThreadPools
#import PyPlot
#pyplot()
end;
# ╔═╡ faa8b77f-dfd8-41d6-884c-d4a3775fc086
md"""
# Sigmoid Activation Function for Neural Networks based on Nonlinear Optics
*Supplementary to "All-Photonic Artificial Neural Network Processor Via Non-linear Optics" by Basani, Heuck, Englund, and Krastanov, 2022*
Can be found at:
- Repository github.com/Krastanov/all-photonic-nn
- Interactive at pluto.krastanov.org/nonlin-opt-sigmoid.html
- Archived together with the publication
"""
# ╔═╡ 18d01b35-04d1-4408-bf56-087f7e17d46d
md"""
# Interaction in the nonlinear waveguide
Solving
$\frac{n}{c}\partial_tE_n + \partial_zE_n
=-\kappa E_s^2 - \alpha E_n$
$\frac{n}{c}\partial_tE_s + \partial_zE_s
=\kappa E_n E_s^* - \alpha E_s$
We will work in units of length $z_0$ and units of time $t_0=\frac{n}{c}z_0$. $E_s$ and $E_n$ will be measured in separate units $\varepsilon_s$ and $\varepsilon_n$, leading to dimensionless equations (we use hat to denote dimensionless):
$\partial_\hat{t}\hat{E}_n + \partial_\hat{z}\hat{E}_n
=-\kappa z_0 \frac{\varepsilon_s^2}{\varepsilon_n} \hat{E}_s^2 - \alpha z_0 \hat{E}_n$
$\partial_\hat{t}\hat{E}_s + \partial_\hat{z}\hat{E}_s
=\kappa z_0 \varepsilon_n \hat{E}_n \hat{E}_s^* - \alpha z_0 \hat{E}_s$
The initial conditions are $\hat{E}_n = e^{ -\frac{z^2}{4w^2} } e^{-i\varphi_0}$ and $\hat{E}_s = e^{ -\frac{z^2}{4w^2} }$.
We can simplify the problem additionally by introducing:
- new variables $\partial_\hat{\eta}=\partial_\hat{t}+\partial_\hat{z}$ and $\partial_\hat{\xi}=\partial_\hat{t}-\partial_\hat{z}$,
- i.e. $\hat{t} = \hat{\eta}+\hat{\xi}$ and $\hat{z}=\hat{\eta}-\hat{\xi}$,
- i.e. $2\hat{\eta}=\hat{t}+\hat{z}$ and $2\hat{\xi}=\hat{t}-\hat{z}$.
Boundary conditions like $f_{\hat{t}\hat{z}}(0,z)$ transform into $f_{\hat{\eta}\hat{\xi}}(\frac{z}{2},-\frac{z}{2})=f_{\hat{t}\hat{z}}(0,z)$. The equations to solve are:
$\partial_\hat{\eta}\hat{E}_n =-\kappa z_0 \frac{\varepsilon_s^2}{\varepsilon_n} \hat{E}_s^2 - \alpha z_0 \hat{E}_n$
$\partial_\hat{\eta}\hat{E}_s =\kappa z_0 \varepsilon_n \hat{E}_n \hat{E}_s^* - \alpha z_0 \hat{E}_s$
**TODO: implement the $\eta\xi$ solution as it should be much faster.**
"""
# ╔═╡ 12b6d3a2-e266-4491-8e57-d41c0bdfefe7
begin
const T = 1. # All simulations would be evolved for one unit of time
const Z = 5. # All simulations will span a few units of space
# The above two can be simplified if we rewrite the equations wrt t+z
const w = 0.1 # All pulses will have width of 0.1 units
nknots = 800 # Make smaller for interactive use and larger for higher accuracy
dz = Z/(nknots+1)
const knots = range(dz, step=dz, length=nknots)
ord_deriv = 1
ord_approx = 2 # Make smaller for interactive use and larger for higher accuracy
const Δ = CenteredDifference(ord_deriv, ord_approx, dz, nknots)
const bc = Dirichlet0BC(Float64)
function step!(∂ₜÊ, Ê, p, t)
(kz₀εₛ²εₙ⁻¹, kz₀εₙ, αz₀) = p
∂ₜÊₙ = @view ∂ₜÊ[:,1]
∂ₜÊₛ = @view ∂ₜÊ[:,2]
Êₙ = @view Ê[:,1]
Êₛ = @view Ê[:,2]
ΔÊₙ = Δ*bc*Êₙ
ΔÊₛ = Δ*bc*Êₛ
∂ₜÊₙ .= .-ΔÊₙ .- kz₀εₛ²εₙ⁻¹ .* Êₛ .^ 2 .- αz₀ .* Êₙ
∂ₜÊₛ .= .-ΔÊₛ .+ kz₀εₙ .* Êₙ .* conj.(Êₛ) .- αz₀ .* Êₛ
return ∂ₜÊ
end
Ê₀param(z,w;φ₀=0) = exp( -(z-5*w)^2 / (2*w^2) ) * exp(-im*φ₀) # 5σ should be enough to avoid clipping
end;
# ╔═╡ 25074b34-1361-4795-904f-f9624dca3e74
begin
md"""
`kz₀εₛ²εₙ⁻¹`: $(@bind p1_kz₀εₛ²εₙ⁻¹ Slider(0:0.1:5; default=1, show_value=true))
`kz₀εₙ_____`: $(@bind p1_kz₀εₙ Slider(0:0.1:5; default=1, show_value=true))
`αz₀_______`: $(@bind p1_αz₀ Slider(0:0.1:5; show_value=true))
`φ₀________`: $(@bind p1_φ₀ Slider(0:0.1:2pi; show_value=true))
"""
end
# ╔═╡ 3686615d-c3cd-45cf-897d-791852a64fe9
let
Êₙ₀ = Ê₀param.(knots, w; φ₀=p1_φ₀)
Êₛ₀ = Ê₀param.(knots, w; φ₀=0)
Ê₀ = hcat(Êₙ₀, Êₛ₀)
params = (p1_kz₀εₛ²εₙ⁻¹,p1_kz₀εₙ,p1_αz₀)
εₛ²εₙ⁻² = (p1_kz₀εₛ²εₙ⁻¹/p1_kz₀εₙ)
global p1_εₛ²εₙ⁻² = εₛ²εₙ⁻²
prob = ODEProblem(step!, Ê₀, (0, T), params)
alg = Tsit5()
sol = solve(prob, alg)
Ê₀ₛₒₗ = sol(0.)
Ê₁ₛₒₗ = sol(1.)
global p1_Ê₀ₛₒₗ = Ê₀ₛₒₗ
global p1_Ê₁ₛₒₗ = Ê₁ₛₒₗ
mask₀ = sum(abs.(Ê₀ₛₒₗ),dims=2)[:,1] .> 1e-2
mask₁ = sum(abs.(Ê₁ₛₒₗ),dims=2)[:,1] .> 1e-2
plot( knots[mask₀], abs.(Ê₀ₛₒₗ[mask₀,:]), c=[1 2], ls=[:solid :dash], lw=4,
label=["N @ t=0" "S @ t=0"])
plot!( knots[mask₀], sqrt.(sum(abs.(Ê₀ₛₒₗ[mask₀,:]).^2 .*[1 εₛ²εₙ⁻²],dims=2)), c=:black, ls=:dot, lw=2,
label="Tot @ t=0")
plot!(knots[mask₁], abs.(Ê₁ₛₒₗ[mask₁,:]), c=[1 2], ls=[:solid :dash], lw=4,
label=["N @ t=1" "S @ t=1"])
plot!( knots[mask₁], sqrt.(sum(abs.(Ê₁ₛₒₗ[mask₁,:]).^2 .*[1 εₛ²εₙ⁻²],dims=2)), c=:black, ls=:dot, lw=2,
label="Tot @ t=1")
plot!(xlabel="space - time", ylabel="Abs pulse value", legend=:outertopright)
end
# ╔═╡ ecb69589-5021-4742-ac72-d27bf7977617
begin
en0 = sum(abs.(p1_Ê₀ₛₒₗ[:,1]).^2)*dz
es0 = p1_εₛ²εₙ⁻² * sum(abs.(p1_Ê₀ₛₒₗ[:,2]).^2)*dz
en1 = sum(abs.(p1_Ê₁ₛₒₗ[:,1]).^2)*dz
es1 = p1_εₛ²εₙ⁻² * sum(abs.(p1_Ê₁ₛₒₗ[:,2]).^2)*dz
md"""
The (εₛ/εₙ)² ratio is $(p1_εₛ²εₙ⁻²)
|time |energy in Êₙ | energy in Êₛ| total energy |
| --- | --- | --- | --- |
|0|$(round(en0,digits=3))|$(round(es0,digits=3))|$(round(en0+es0,digits=3))|
|1|$(round(en1,digits=3))|$(round(es1,digits=3))|$(round(en1+es1,digits=3))|
"""
end
# ╔═╡ 76902710-23dc-45fe-95dc-5fcc779bfcb6
md"""
# Capture
Solving
$\frac{{\rm d}A}{{\rm d}t}=-\frac{\gamma+\gamma_h}{2}A + \sqrt \gamma S_i$
$S_o=S_i - \sqrt \gamma A$
where we impose $S_o = 0$ leading to $\sqrt\gamma = \frac{S}{A}$ and
$\frac{{\rm d}A}{{\rm d}t}=-\frac{\gamma_h}{2}A + \frac{S_i^2}{2A}$
and for an Gaussian input $S_i = S e^{-\frac{(t-t_0)^2}{2w^2}}$.
It seems this is a special case of [Bernoulli's equation](https://mathworld.wolfram.com/BernoulliDifferentialEquation.html).
The solution ([from Wolfram Alpha](https://www.wolframalpha.com/input/?i=solve+f%27%28t%29+%3D+-kappa%2F2*f%28t%29+%2B+S%5E2%2F2*exp%28-%28t-t0%29%5E2%2Fw%5E2%29%2Ff%28t%29)):
$A(t) = \sqrt{C_1 e^{-\gamma_h t} - \frac{1}{2}\sqrt\pi S^2 w e^{\frac{\gamma_h}{2} (\frac{\gamma_h w^2}{2} + 2 t_0 - 2 t)} {\rm erf}\left(\frac{\frac{\gamma_h w^2}{2} + t_0 - t}{w}\right)}$
Finding $C_1$ to fullfil $A(0)=0$ leads to:
$A(t) = S\sqrt{\sqrt\pi w e^{\frac{\gamma_h}{2} (\frac{\gamma_h w^2}{2} + 2 t_0 - 2 t)}\frac{\left( 1 + {\rm erf}\left(\frac{\frac{-\gamma_h w^2}{2} - t_0 + t}{w}\right)\right)}{2}}$
"""
# ╔═╡ 1462c607-a4c0-4b65-90b0-9b728711276f
begin
Sᵢ(w,t₀,S,t) = S * exp(-0.5*(t-t₀)^2/w^2)
A(γₕ,w,t₀,S,t) = S * sqrt(√π * w
* exp(γₕ/2*(γₕ/2*w^2 + 2*t₀ - 2*t))
* 0.5 * (1-erf((γₕ/2*w^2 + t₀ - t)/w))
)
function γ(γₕ,w,t₀,t)
if abs(t₀-t)/w > 6
return 0.0
else
return (Sᵢ(w,t₀,1.0,t)/A(γₕ,w,t₀,1.0,t))^2
end
end
end;
# ╔═╡ 49f3d21a-a8fd-4ed2-ae6b-409a34c57d67
md"And example plot with unitless time."
# ╔═╡ 0e0041b3-8641-481b-b5bf-821f54dcb604
let
ts = 0:0.1:20
w = 1.
t₀ = 9.
S = 1.
γₕ = 0.5
mask = ts.>(t₀-2w)
plot(ts, A.(0,w,t₀,S,ts), label="A at no loss", c=1)
plot!(ts, A.(γₕ,w,t₀,S,ts), label="A at γₕ = $(γₕ)", c=2)
plot!(ts[mask], γ.(0,w,t₀,ts)[mask]*(√π*w), label="γ at no loss", c=1, ls=:dot, lw=3)
plot!(ts[mask], γ.(γₕ,w,t₀,ts)[mask]*(√π*w), label="γ at γₕ = $(γₕ)", c=2, ls=:dot, lw=3)
plot!(ts, Sᵢ.(w,t₀,S,ts)*√(√π*w), label="Sᵢₙ (w = $(w))", color=:black, linestyle=:dash)
plot!(legend=:bottomright, yticks=nothing,xlabel="time")
end
# ╔═╡ 1dccf41e-fe5d-487e-9679-58aa08f552ed
md"A quick sanity check comparing to numerical solutions:"
# ╔═╡ 025a3d16-3548-4ba3-9468-e0f67c1c55fb
begin
function dA(A, p, t)
(γfunc, Sfunc, γₕ) = p
γ = γfunc(t)
S = Sfunc(t)
dA = -(γₕ+γ)*A/2 + √γ * S
return dA
end;
function dAelimγ(A, p, t)
(Sfunc, γₕ) = p
S = Sfunc(t)
dA = -γₕ*A/2 + S^2/A/2
return dA
end;
end
# ╔═╡ 783f9b75-de7d-45cb-8ee4-a424184d438a
let
ts = 0:0.1:40
w = 2.
t₀ = 9.
S = 1.0 + 1.0im
γₕ = 0.2
A0 = 1e-6 + 0.0im
plot(xlabel="time",title="Numerical vs Analytical solution")
plot!(ts, A.(γₕ,w,t₀,S,ts), label="A(t) analytical", lw=8)
γfunc(t) = γ(γₕ,w,t₀,t)
Sfunc(t) = Sᵢ(w,t₀,S,t)
param_test_capture = (γfunc, Sfunc, γₕ)
prob = ODEProblem(dA, A0, (0, ts[end]), param_test_capture)
alg = KenCarp4(autodiff=false)
sol = solve(prob, alg)
plot!(sol, label="A(t) semi-numerical", lw=6)
param_test_capture_elimγ = (Sfunc, γₕ)
prob_elimγ = ODEProblem(dAelimγ, A0, (0, ts[end]), param_test_capture_elimγ)
alg = KenCarp4(autodiff=false)
sol_elimγ = solve(prob_elimγ, alg)
plot!(sol_elimγ, label="A(t) numerical", lw=3)
plot!(ylabel="Im", zlabel="Re")
end
# ╔═╡ c23699e9-0a2e-49e8-8f32-3968fa7893f7
md"# Full simulation of the nonlinear activation function"
# ╔═╡ c14acc74-f848-4b00-a3d1-a0ff1c152b96
begin
const offset = 5 # 7σ should be enough to avoid clipping
function nonlinsim(;w=0.1,
kz₀εₛ²εₙ⁻¹ = 0.0,
kz₀εₙ = 1.0,
αz₀=0,
γₕ = 0.1,
φ₀ = 0.0,
use_sub = false
)
# Waveguide propagation parameters
# kz₀εₛ²εₙ⁻¹
# kz₀εₙ
# αz₀
# Capture parameters
# γₕ = 0.1
# Some implementation details constants
t₀ = 0.0
A0 = 1e-6+0.0im
Tcapt = (-offset*w, offset*w)
# Prepare wave before interaction with the subharmonic
Ê₀param(z,φ₀) = exp(-im*φ₀) * exp( -(z-offset*w)^2 / (2*w^2) )
Êₙ₀ = Ê₀param.(knots,φ₀)
Êₛ₀ = Ê₀param.(knots,0.0)
Ê₀ = hcat(Êₙ₀, Êₛ₀)
# Solve the interaction with the subharmonic
params_nonlin = (kz₀εₛ²εₙ⁻¹,kz₀εₙ,αz₀)
prob = ODEProblem(step!, Ê₀, (0, T), params_nonlin)
alg = Tsit5()
sol = solve(prob, alg)
# Time-offset the wave before capture to make the equation simpler
# Remember that time and space have a different direction on the plots
Ê₁ₛₒₗ = sol(T)
neuronpulse = use_sub ? Ê₁ₛₒₗ[:,2] : Ê₁ₛₒₗ[:,1]
Sᵢₙ(t) = LinearInterpolation(knots,neuronpulse)(-t+offset*w+T)
# Solve the capture
γfunc(t) = γ(γₕ,w,t₀,t)
param_test_capture = (γfunc, Sᵢₙ, γₕ)
prob = ODEProblem(dA, A0, Tcapt, param_test_capture)
alg = Tsit5()
capturesol = solve(prob, alg)
(; Ê₀, Sᵢₙ, γfunc, capturesol)
end
normsim = nonlinsim(w=w,kz₀εₛ²εₙ⁻¹=0.0,kz₀εₙ=1.0,αz₀=0.0,γₕ=0.0,φ₀=0.0)
Anorm = normsim.capturesol[end]
end;
# ╔═╡ 9d773718-ff18-404c-8213-41da8062294f
begin
md"""
`kz₀εₛ_`: $(@bind p2_kz₀εₛ Slider(0:0.1:5; default=0.2, show_value=true))
`εₙεₛ⁻¹`: $(@bind p2_εₙεₛ⁻¹ Slider(0:0.1:5; default=1, show_value=true))
`αz₀___`: $(@bind p2_αz₀ Slider(0:0.1:5; show_value=true))
`γₕ____`: $(@bind p2_γₕ Slider(0:0.1:5; show_value=true))
`φ₀____`: $(@bind p2_φ₀ Slider(0:0.1:2pi, show_value=true))
angle of view: $(@bind p2_cam Slider(0:1:90, default=20, show_value=false))
"""
end
# ╔═╡ be709699-4e82-4e1f-b3b0-f40a9f2cab2d
let
kz₀εₛ = p2_kz₀εₛ
εₙεₛ⁻¹ = p2_εₙεₛ⁻¹
kz₀εₛ²εₙ⁻¹ = kz₀εₛ/εₙεₛ⁻¹
kz₀εₙ = kz₀εₛ*εₙεₛ⁻¹
#kz₀εₛ²εₙ⁻¹ = 0.0
#kz₀εₙ = 1.0
αz₀ = p2_αz₀
γₕ = p2_γₕ
φ₀ = p2_φ₀
global p2_sim = nonlinsim(w=w,kz₀εₛ²εₙ⁻¹=kz₀εₛ²εₙ⁻¹,kz₀εₙ=kz₀εₙ,αz₀=αz₀,γₕ=γₕ,φ₀=φ₀)
end;
# ╔═╡ eda4d017-d65f-4c60-a45d-6bbb37a28ff1
let
span = range(-offset*w,offset*w,length=100)
plot()
plot!(-(knots.-offset*w), p2_sim.Ê₀, c=[1 2], ls=[:solid :dash], lw=4,
label=["N@t=0" "S@t=0"])
plot!(span, p2_sim.Sᵢₙ.(span), c=3, ls=:solid, lw=4,
label="N@t=1")
plot!(span, p2_sim.capturesol.(span)/Anorm, label="capture", lw=2)
plot!(xlabel="time", xlim=(span[begin],span[end]), legend=:topleft)
plot!(ylabel="Re", zlabel="Im", camera=(p2_cam,40))
end
# ╔═╡ f803aeec-2ce2-45ca-899f-fe6c31eb3bda
md"""## At φ₀=0"""
# ╔═╡ b40d4754-85c1-4edd-9793-926cc1a912e3
let
αz₀ = 0.0
γₕ = 0.0
global kz₀εₛs = [0, 0.2, 0.3]
global εₙεₛ⁻¹_scale = 20.0
global εₙεₛ⁻¹s = ((-1:0.2:1) .+ 1e-2)*εₙεₛ⁻¹_scale
if isfile("nonlins_phi=0.npz")
f = npzread("nonlins_phi=0.npz")
global Ass_cat = f["allA"]./εₙεₛ⁻¹s
else
Ass = qmap(kz₀εₛs) do kz₀εₛ
As = qmap(εₙεₛ⁻¹s) do εₙεₛ⁻¹
kz₀εₛ²εₙ⁻¹ = kz₀εₛ/εₙεₛ⁻¹
kz₀εₙ = kz₀εₛ*εₙεₛ⁻¹
sim = nonlinsim(w=w,kz₀εₛ²εₙ⁻¹=kz₀εₛ²εₙ⁻¹,kz₀εₙ=kz₀εₙ,
αz₀=αz₀,γₕ=γₕ,φ₀=0.0)
A = sim.capturesol[end]
return A/Anorm
end
return As
end
global Ass_cat = hcat(Ass...)
npzwrite("nonlins_phi=0.npz",
kze=kz₀εₛs,en_over_es=collect(εₙεₛ⁻¹s),
allA=Ass_cat.*εₙεₛ⁻¹s)
end
end;
# ╔═╡ d8ad2e68-886e-4c4a-abc8-073a97d45c2e
begin
plot()
for (kz₀εₛ,As) in zip(kz₀εₛs,eachcol(Ass_cat))
plot!(εₙεₛ⁻¹s,real.(As.*εₙεₛ⁻¹s),marker=true,label=kz₀εₛ)
end
plot!(εₙεₛ⁻¹s,εₙεₛ⁻¹s,color=:gray,alpha=0.5,label=false)
plot!(εₙεₛ⁻¹s,0*εₙεₛ⁻¹s,color=:gray,alpha=0.5,label=false)
plot!(aspect_ratio=:equal,
xlim=(εₙεₛ⁻¹s[begin],εₙεₛ⁻¹s[end]),
ylim=(εₙεₛ⁻¹s[begin],εₙεₛ⁻¹s[end]),
legend_title="kz₀εₛ",legend=:outertopright,
xlabel="input equivalent εₙ in units of (εₛ)",
ylabel="real output equivalent εₙ in units of (εₛ)",
)
end
# ╔═╡ ef69b43b-313d-4770-8654-0cd480470c2b
md"## At arbitrary φ₀"
# ╔═╡ 691659c2-90fd-4077-9014-b60640f2843c
let
αz₀ = 0.0
γₕ = 0.0
global φs = range(0,2pi,length=36)
global εₙεₛ⁻¹s_pos = ((0:0.05:1) .+ 1e-2)*εₙεₛ⁻¹_scale
if isfile("nonlins.npz")
f = npzread("nonlins.npz")
global Asss_withφ_cat = f["allA"]./εₙεₛ⁻¹s_pos'
else
Asss_withφ = qmap(kz₀εₛs) do kz₀εₛ
Ass = qmap(εₙεₛ⁻¹s_pos) do εₙεₛ⁻¹
As = qmap(φs) do φ₀
kz₀εₛ²εₙ⁻¹ = kz₀εₛ/εₙεₛ⁻¹
kz₀εₙ = kz₀εₛ*εₙεₛ⁻¹
sim = nonlinsim(w=w,kz₀εₛ²εₙ⁻¹=kz₀εₛ²εₙ⁻¹,kz₀εₙ=kz₀εₙ,
αz₀=αz₀,γₕ=γₕ,φ₀=φ₀)
A = sim.capturesol[end]
@info "φ₀=$(φ₀), εₙεₛ⁻¹=$(εₙεₛ⁻¹), kz₀εₛ=$(kz₀εₛ)"
return A/Anorm
end
return As
end
return Ass
end
global Asss_withφ_cat = cat([hcat(a...) for a in Asss_withφ]...,dims=(3,))
npzwrite("nonlins.npz",
kze=kz₀εₛs,en_over_es=collect(εₙεₛ⁻¹s_pos),
allA=Asss_withφ_cat.*εₙεₛ⁻¹s_pos',phis=φs);
end
end;
# ╔═╡ c1865065-38a6-48fb-8b3c-c6c40d36b47a
let
i = 2
p1 = heatmap(φs,εₙεₛ⁻¹s_pos,abs.(Asss_withφ_cat[:,:,i])',
aspect_ratio=:equal, proj=:polar, legend=false, colorbar=true,
c=:broc,
clim=(0.,2.), colorbar_title=" \nOutput/Input Ratio", right_margin=3mm,
yticks=[])
p2 = heatmap(φs,εₙεₛ⁻¹s_pos,angle.(
Asss_withφ_cat[:,:,i])',
aspect_ratio=:equal, proj=:polar, legend=false, colorbar=true,
c=:romaO,
clim=(-pi,pi), colorbar_title="Output Phase (radians)",
colorbar_ticks=[-pi,0,pi],# only in pyplot
yticks=[])
plot(p1,p2,layout=(2,1),size=(400,600))
end
# ╔═╡ 41d7a341-95c2-4b0e-b7a5-2c8e8b4b889f
let
data = Asss_withφ_cat[:,:,2]
plot(φs, angle.(data), linez=εₙεₛ⁻¹s_pos',
legend=false, colorbar=true, c=:batlow, colorbar_title="εₙεₛ⁻¹",
# xlim=(0,0.97*pi), ylim=(-pi,0)
)
end
# ╔═╡ 62c3b21b-37f9-47ab-b449-928cce82f97b
let
data = Asss_withφ_cat[1:end÷2,:,2]
plot(εₙεₛ⁻¹s_pos, abs.(data)' .* εₙεₛ⁻¹s_pos,
linez=φs[1:end÷2]',
legend=false, colorbar=true, colorbar_title="input φ",
lw=2, c=:romaO, clim=(-pi,pi),
)
end
# ╔═╡ 648a06a2-6ce6-4cae-ba03-fc937acdf5d4
md"# Instead of the pump being a subharmonic, what if the pump is the second harmonic"
# ╔═╡ 7537e114-6e85-43e4-a526-d2ab194c5bd4
let
αz₀ = 0.0
γₕ = 0.0
global φs_ = range(0,2pi,length=36)
global kz₀εₙs = [1.0,2.0,3.0]
εₛεₙ⁻¹_scale = 0.5
global εₛεₙ⁻¹s = ((0:0.05:1) .+ 1e-2)*εₛεₙ⁻¹_scale
if isfile("nonlins_inverted.npz")
f = npzread("nonlins_inverted.npz")
global Asss_inverted_withφ_cat = f["allA"]./εₛεₙ⁻¹s'
else
global Asss_inverted_withφ = qmap(kz₀εₙs) do kz₀εₙ
Ass = qmap(εₛεₙ⁻¹s) do εₛεₙ⁻¹
As = qmap(φs_) do φ₀
kz₀εₛ²εₙ⁻¹ = kz₀εₙ*εₛεₙ⁻¹^2
kz₀εₙ_ = kz₀εₙ
sim = nonlinsim(w=w,
kz₀εₛ²εₙ⁻¹=kz₀εₛ²εₙ⁻¹,kz₀εₙ=kz₀εₙ_,
αz₀=αz₀,γₕ=γₕ,
φ₀=φ₀,
use_sub=true)
A = sim.capturesol[end]
@info "φ₀=$(φ₀), εₛεₙ⁻¹=$(εₛεₙ⁻¹), kz₀εₛ=$(kz₀εₙ)"
return A/Anorm
end
return As
end
return Ass
end
global Asss_inverted_withφ_cat = cat([hcat(a...)
for a in Asss_inverted_withφ]...,
dims=(3,))
npzwrite("nonlins_inverted.npz",
kze=kz₀εₙs,es_over_en=collect(εₛεₙ⁻¹s),
allA=Asss_inverted_withφ_cat.*εₛεₙ⁻¹s',phis=φs_);
end
end;
# ╔═╡ 594db84f-1d44-4dbb-8f40-3bf743303f0a
let
data = Asss_inverted_withφ_cat[:,:,end]
plot(φs_, angle.(data), linez=εₛεₙ⁻¹s',
legend=false, colorbar=true, c=:batlow, colorbar_title="εₙεₛ⁻¹",
#xlim=(0,0.97*pi), ylim=(-pi,0)
)
end
# ╔═╡ 4acbc103-7e7e-40be-b0f4-4e905c59cbe0
let
data = Asss_inverted_withφ_cat[:,:,2]
plot(εₛεₙ⁻¹s, abs.(data)' .* εₛεₙ⁻¹s,
#linez=φs_[1:end÷2]',
linez=φs_',
legend=false, colorbar=true, colorbar_title="input φ",
lw=2, c=:romaO, clim=(-pi,pi),
)
end
# ╔═╡ e8f9590a-047b-4b65-a2b9-c23016e870f9
let
i = 2 # there is a bug with the r-limits, so we manually rescale
p1 = heatmap(φs_,εₛεₙ⁻¹s*10,abs.(Asss_inverted_withφ_cat[:,:,i])',
aspect_ratio=:equal, proj=:polar, legend=false, colorbar=true,
c=:broc,
clim=(0.,2.), colorbar_title=" \nOutput/Input Ratio", right_margin=3mm,
yticks=[])
p2 = heatmap(φs_,εₛεₙ⁻¹s*10,angle.(
Asss_inverted_withφ_cat[:,:,i])',
aspect_ratio=:equal, proj=:polar, legend=false, colorbar=true,
c=:romaO,
clim=(-pi,pi), colorbar_title="Output Phase (radians)",
colorbar_ticks=[-pi,0,pi],# only in pyplot
yticks=[])
plot(p1,p2,layout=(2,1),size=(400,600))
end
# ╔═╡ 00000000-0000-0000-0000-000000000001
PLUTO_PROJECT_TOML_CONTENTS = """
[deps]
DiffEqOperators = "9fdde737-9c7f-55bf-ade8-46b3f136cc48"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
NPZ = "15e1cf62-19b3-5cfa-8e77-841668bca605"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
ThreadPools = "b189fb0b-2eb5-4ed4-bc0c-d34c51242431"
[compat]
DiffEqOperators = "~4.32.0"
Interpolations = "~0.13.4"
NPZ = "~0.4.1"
OrdinaryDiffEq = "~5.64.0"
Plots = "~1.22.3"
PlutoUI = "~0.7.14"
SpecialFunctions = "~1.7.0"
ThreadPools = "~2.1.0"
"""
# ╔═╡ 00000000-0000-0000-0000-000000000002
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised
julia_version = "1.7.2"
manifest_format = "2.0"
[[deps.AbstractPlutoDingetjes]]
deps = ["Pkg"]
git-tree-sha1 = "8eaf9f1b4921132a4cff3f36a1d9ba923b14a481"
uuid = "6e696c72-6542-2067-7265-42206c756150"
version = "1.1.4"
[[deps.AbstractTrees]]
git-tree-sha1 = "03e0550477d86222521d254b741d470ba17ea0b5"
uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
version = "0.3.4"
[[deps.Adapt]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "af92965fb30777147966f58acb05da51c5616b5f"
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
version = "3.3.3"
[[deps.ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
[[deps.ArnoldiMethod]]
deps = ["LinearAlgebra", "Random", "StaticArrays"]
git-tree-sha1 = "f87e559f87a45bece9c9ed97458d3afe98b1ebb9"
uuid = "ec485272-7323-5ecc-a04f-4719b315124d"
version = "0.1.0"
[[deps.ArrayInterface]]
deps = ["Compat", "IfElse", "LinearAlgebra", "Requires", "SparseArrays", "Static"]
git-tree-sha1 = "1ee88c4c76caa995a885dc2f22a5d548dfbbc0ba"
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
version = "3.2.2"
[[deps.ArrayInterfaceCore]]
deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"]
git-tree-sha1 = "d618d3cf75e8ed5064670e939289698ecf426c7f"
uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2"
version = "0.1.12"
[[deps.ArrayLayouts]]
deps = ["FillArrays", "LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "56c347caf09ad8acb3e261fe75f8e09652b7b05b"
uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
version = "0.7.10"
[[deps.Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
[[deps.AxisAlgorithms]]
deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"]
git-tree-sha1 = "66771c8d21c8ff5e3a93379480a2307ac36863f7"
uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950"
version = "1.0.1"
[[deps.BandedMatrices]]
deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "Random", "SparseArrays"]
git-tree-sha1 = "019aa88766e2493c59cbd0a9955e1bac683ffbcd"
uuid = "aae01518-5342-5314-be14-df237901396f"
version = "0.16.13"
[[deps.Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
[[deps.BitTwiddlingConvenienceFunctions]]
deps = ["Static"]
git-tree-sha1 = "eaee37f76339077f86679787a71990c4e465477f"
uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b"
version = "0.1.4"
[[deps.BlockArrays]]
deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"]
git-tree-sha1 = "21490270d1fcf2efa9ddb2126d6958e9b72a4db0"
uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
version = "0.16.11"
[[deps.BlockBandedMatrices]]
deps = ["ArrayLayouts", "BandedMatrices", "BlockArrays", "FillArrays", "LinearAlgebra", "MatrixFactorizations", "SparseArrays", "Statistics"]
git-tree-sha1 = "d902df32d20d85a2ab56b1ee17a676aeb960dc37"
uuid = "ffab5731-97b5-5995-9138-79e8c1846df0"
version = "0.10.9"
[[deps.Bzip2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2"
uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
version = "1.0.8+0"
[[deps.CEnum]]
git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90"
uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82"
version = "0.4.2"
[[deps.CPUSummary]]
deps = ["CpuId", "IfElse", "Static"]
git-tree-sha1 = "b1a532a582dd18b34543366322d390e1560d40a9"
uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9"
version = "0.1.23"
[[deps.CSTParser]]
deps = ["Tokenize"]
git-tree-sha1 = "b66abc140f8b90a1d6bc7bfad5c80070f8c1ddc6"
uuid = "00ebfdb7-1f24-5e51-bd34-a7502290713f"
version = "3.3.3"
[[deps.Cairo_jll]]
deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2"
uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a"
version = "1.16.1+1"
[[deps.ChainRulesCore]]
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "9489214b993cd42d17f44c36e359bf6a7c919abf"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "1.15.0"
[[deps.ChangesOfVariables]]
deps = ["ChainRulesCore", "LinearAlgebra", "Test"]
git-tree-sha1 = "1e315e3f4b0b7ce40feded39c73049692126cf53"
uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0"
version = "0.1.3"
[[deps.CloseOpenIntervals]]
deps = ["ArrayInterface", "Static"]
git-tree-sha1 = "16cfdcff2db5e6e6b365ae3689b8694741f00a43"
uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9"
version = "0.1.9"
[[deps.ColorSchemes]]
deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Random"]
git-tree-sha1 = "7297381ccb5df764549818d9a7d57e45f1057d30"
uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
version = "3.18.0"
[[deps.ColorTypes]]
deps = ["FixedPointNumbers", "Random"]
git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4"
uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
version = "0.11.4"
[[deps.ColorVectorSpace]]
deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "TensorCore"]
git-tree-sha1 = "d08c20eef1f2cbc6e60fd3612ac4340b89fea322"
uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4"
version = "0.9.9"
[[deps.Colors]]
deps = ["ColorTypes", "FixedPointNumbers", "Reexport"]
git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40"
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
version = "0.12.8"
[[deps.Combinatorics]]
git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860"
uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
version = "1.0.2"
[[deps.CommonMark]]
deps = ["Crayons", "JSON", "URIs"]
git-tree-sha1 = "4cd7063c9bdebdbd55ede1af70f3c2f48fab4215"
uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6"
version = "0.8.6"
[[deps.CommonSolve]]
git-tree-sha1 = "332a332c97c7071600984b3c31d9067e1a4e6e25"
uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2"
version = "0.2.1"
[[deps.CommonSubexpressions]]
deps = ["MacroTools", "Test"]
git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7"
uuid = "bbf7d656-a473-5ed7-a52c-81e309532950"
version = "0.3.0"
[[deps.Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "9be8be1d8a6f44b96482c8af52238ea7987da3e3"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "3.45.0"
[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
[[deps.CompositeTypes]]
git-tree-sha1 = "d5b014b216dc891e81fea299638e4c10c657b582"
uuid = "b152e2b5-7a66-4b01-a709-34e65c35f657"
version = "0.1.2"
[[deps.ConstructionBase]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "f74e9d5388b8620b4cee35d4c5a618dd4dc547f4"
uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
version = "1.3.0"
[[deps.Contour]]
deps = ["StaticArrays"]
git-tree-sha1 = "9f02045d934dc030edad45944ea80dbd1f0ebea7"
uuid = "d38c429a-6771-53c6-b99e-75d170b6e991"
version = "0.5.7"
[[deps.CpuId]]
deps = ["Markdown"]
git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406"
uuid = "adafc99b-e345-5852-983c-f28acb93d879"
version = "0.3.1"
[[deps.Crayons]]
git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15"
uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
version = "4.1.1"
[[deps.DEDataArrays]]
deps = ["ArrayInterface", "DocStringExtensions", "LinearAlgebra", "RecursiveArrayTools", "SciMLBase", "StaticArrays"]
git-tree-sha1 = "fb2693e875ba9db2e64b684b2765e210c0d41231"
uuid = "754358af-613d-5f8d-9788-280bf1605d4c"
version = "0.2.4"
[[deps.DataAPI]]
git-tree-sha1 = "fb5f5316dd3fd4c5e7c30a24d50643b73e37cd40"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.10.0"
[[deps.DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.18.13"
[[deps.DataValueInterfaces]]
git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464"
version = "1.0.0"
[[deps.Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
[[deps.DelimitedFiles]]
deps = ["Mmap"]
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"
[[deps.DensityInterface]]
deps = ["InverseFunctions", "Test"]
git-tree-sha1 = "80c3e8639e3353e5d2912fb3a1916b8455e2494b"
uuid = "b429d917-457f-4dbc-8f4c-0cc954292b1d"
version = "0.4.0"
[[deps.DiffEqBase]]
deps = ["ArrayInterface", "ChainRulesCore", "DEDataArrays", "DataStructures", "Distributions", "DocStringExtensions", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "IterativeSolvers", "LabelledArrays", "LinearAlgebra", "Logging", "MuladdMacro", "NonlinearSolve", "Parameters", "PreallocationTools", "Printf", "RecursiveArrayTools", "RecursiveFactorization", "Reexport", "Requires", "SciMLBase", "Setfield", "SparseArrays", "StaticArrays", "Statistics", "SuiteSparse", "ZygoteRules"]
git-tree-sha1 = "bd3812f2be255da87a2438c3b87a0a478cdbd050"
uuid = "2b5f629d-d688-5b77-993f-72d75c75574e"
version = "6.84.0"
[[deps.DiffEqCallbacks]]
deps = ["DataStructures", "DiffEqBase", "ForwardDiff", "LinearAlgebra", "NLsolve", "Parameters", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArrays"]
git-tree-sha1 = "cfef2afe8d73ed2d036b0e4b14a3f9b53045c534"
uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def"
version = "2.23.1"
[[deps.DiffEqJump]]
deps = ["ArrayInterface", "Compat", "DataStructures", "DiffEqBase", "FunctionWrappers", "LightGraphs", "LinearAlgebra", "PoissonRandom", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "StaticArrays", "TreeViews", "UnPack"]
git-tree-sha1 = "9f47b8ae1c6f2b172579ac50397f8314b460fcd9"
uuid = "c894b116-72e5-5b58-be3c-e6d8d4ac2b12"
version = "7.3.1"
[[deps.DiffEqOperators]]
deps = ["BandedMatrices", "BlockBandedMatrices", "DiffEqBase", "DomainSets", "ForwardDiff", "LazyArrays", "LazyBandedMatrices", "LinearAlgebra", "LoopVectorization", "ModelingToolkit", "NNlib", "NonlinearSolve", "RuntimeGeneratedFunctions", "SciMLBase", "SparseArrays", "StaticArrays", "SuiteSparse", "SymbolicUtils"]
git-tree-sha1 = "eb50a65f87e02cc979a5c4edfb62fec13b125c78"
uuid = "9fdde737-9c7f-55bf-ade8-46b3f136cc48"
version = "4.32.0"
[[deps.DiffResults]]
deps = ["StaticArrays"]
git-tree-sha1 = "c18e98cba888c6c25d1c3b048e4b3380ca956805"
uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5"
version = "1.0.3"
[[deps.DiffRules]]
deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"]
git-tree-sha1 = "28d605d9a0ac17118fe2c5e9ce0fbb76c3ceb120"
uuid = "b552c78f-8df3-52c6-915a-8e097449b14b"
version = "1.11.0"
[[deps.Distances]]
deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"]
git-tree-sha1 = "3258d0659f812acde79e8a74b11f17ac06d0ca04"
uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
version = "0.10.7"
[[deps.Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
[[deps.Distributions]]
deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"]
git-tree-sha1 = "0ec161f87bf4ab164ff96dfacf4be8ffff2375fd"
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
version = "0.25.62"
[[deps.DocStringExtensions]]
deps = ["LibGit2"]
git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.6"
[[deps.DomainSets]]
deps = ["CompositeTypes", "IntervalSets", "LinearAlgebra", "StaticArrays", "Statistics"]
git-tree-sha1 = "c6c5eb6c4fde80d1a90e5a7e05cf2adfb14e3706"
uuid = "5b8099bc-c8ec-5219-889f-1d9e522a28bf"
version = "0.5.10"
[[deps.Downloads]]
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
[[deps.DynamicPolynomials]]
deps = ["DataStructures", "Future", "LinearAlgebra", "MultivariatePolynomials", "MutableArithmetics", "Pkg", "Reexport", "Test"]
git-tree-sha1 = "1b4665a7e303eaa7e03542cfaef0730cb056cb00"
uuid = "7c1d4256-1411-5781-91ec-d7bc3513ac07"
version = "0.3.21"
[[deps.EarCut_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "3f3a2501fa7236e9b911e0f7a588c657e822bb6d"
uuid = "5ae413db-bbd1-5e63-b57d-d24a61df00f5"
version = "2.2.3+0"
[[deps.Expat_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d"
uuid = "2e619515-83b5-522b-bb60-26c02a35a201"
version = "2.4.8+0"
[[deps.ExponentialUtilities]]
deps = ["ArrayInterfaceCore", "GPUArrays", "GenericSchur", "LinearAlgebra", "Printf", "SparseArrays", "libblastrampoline_jll"]
git-tree-sha1 = "343c0b28b7513bbdd8ea91d8500fd1f357944f22"
uuid = "d4d017d3-3776-5f7e-afef-a10c40355c18"
version = "1.17.1"
[[deps.ExprTools]]
git-tree-sha1 = "56559bbef6ca5ea0c0818fa5c90320398a6fbf8d"
uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
version = "0.1.8"
[[deps.FFMPEG]]
deps = ["FFMPEG_jll"]
git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8"
uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a"
version = "0.4.1"
[[deps.FFMPEG_jll]]
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
git-tree-sha1 = "d8a578692e3077ac998b50c0217dfd67f21d1e5f"
uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5"
version = "4.4.0+0"
[[deps.FastBroadcast]]
deps = ["LinearAlgebra", "Polyester", "Static"]
git-tree-sha1 = "edbffa3fc9df6587927b6bc844958c61ffda8a6c"
uuid = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
version = "0.1.16"
[[deps.FastClosures]]
git-tree-sha1 = "acebe244d53ee1b461970f8910c235b259e772ef"
uuid = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a"
version = "0.3.2"
[[deps.FileIO]]
deps = ["Pkg", "Requires", "UUIDs"]
git-tree-sha1 = "9267e5f50b0e12fdfd5a2455534345c4cf2c7f7a"
uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
version = "1.14.0"
[[deps.FillArrays]]
deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"]
git-tree-sha1 = "deed294cde3de20ae0b2e0355a6c4e1c6a5ceffc"
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
version = "0.12.8"