@@ -19,8 +19,8 @@ import Lux: tanh, identity
1919 # Space and time domains
2020 domains = [x ∈ Interval (0.0 , 1.0 ), y ∈ Interval (0.0 , 1.0 )]
2121
22- strategy = QuasiRandomTraining (4_000 , minibatch= 500 );
23- discretization= DeepGalerkin (2 , 1 , 30 , 3 , tanh, tanh, identity, strategy);
22+ strategy = QuasiRandomTraining (256 , minibatch= 32 );
23+ discretization= DeepGalerkin (2 , 1 , 20 , 3 , tanh, tanh, identity, strategy);
2424
2525 @named pde_system = PDESystem (eq, bcs, domains, [x, y], [u (x, y)])
2626 prob = discretize (pde_system, discretization)
7171
7272 domains = [t ∈ Interval (0.0 , T), x ∈ Interval (0.0 , S * S_multiplier)]
7373
74- strategy = QuasiRandomTraining (4_000 , minibatch= 500 );
75- discretization= DeepGalerkin (2 , 1 , 30 , 3 , tanh, tanh, identity, strategy);
74+ strategy = QuasiRandomTraining (128 , minibatch= 32 );
75+ discretization= DeepGalerkin (2 , 1 , 40 , 3 , tanh, tanh, identity, strategy);
7676
7777 @named pde_system = PDESystem (eq, bcs, domains, [t, x], [g (t,x)])
7878 prob = discretize (pde_system, discretization)
8686 return false
8787 end
8888
89- res = Optimization. solve (prob, Adam (0.01 ); callback = callback, maxiters = 300 )
89+ res = Optimization. solve (prob, Adam (0.1 ); callback = callback, maxiters = 100 )
9090 prob = remake (prob, u0 = res. u)
91- res = Optimization. solve (prob, Adam (0.001 ); callback = callback, maxiters = 300 )
91+ res = Optimization. solve (prob, Adam (0.01 ); callback = callback, maxiters = 500 )
9292 phi = discretization. phi
9393
9494 function analytical_soln (t, x, K, σ, T)
138138 u_MOL = sol[u (t,x)]
139139
140140 # NeuralPDE
141- strategy = QuasiRandomTraining (4_000 , minibatch= 500 );
141+ strategy = QuasiRandomTraining (256 , minibatch= 32 );
142142 discretization= DeepGalerkin (2 , 1 , 50 , 5 , tanh, tanh, identity, strategy);
143143 @named pde_system = PDESystem (eq, bcs, domains, [t, x], [u (t,x)]);
144144 prob = discretize (pde_system, discretization);
151151 return false
152152 end
153153
154- res = Optimization. solve (prob, Adam (0.01 ); callback = callback, maxiters = 300 );
154+ res = Optimization. solve (prob, Adam (0.01 ); callback = callback, maxiters = 200 );
155+ prob = remake (prob, u0 = res. u);
156+ res = Optimization. solve (prob, Adam (0.001 ); callback = callback, maxiters = 100 );
155157 phi = discretization. phi;
156158
157159 u_predict= [first (phi ([t, x], res. u)) for t in ts, x in xs]
0 commit comments