@@ -33,7 +33,6 @@ function step_u!(integrator, cache::IMEXARKCache, ::ARS343)
3333 @. U = u + dt * a_exp[i, 1 ] * T_lim[1 ]
3434 lim! (U, p, t_exp, u)
3535 @. U += dt * a_exp[i, 1 ] * T_exp[1 ]
36- dss! (U, p, t_exp)
3736 post_explicit! (U, p, t_exp)
3837
3938 @. temp = U # used in closures
@@ -49,13 +48,18 @@ function step_u!(integrator, cache::IMEXARKCache, ::ARS343)
4948 call_post_implicit! = Ui -> begin
5049 post_implicit! (Ui, p, t_imp)
5150 end
51+ call_post_implicit_last! = Ui -> begin
52+ dss! (Ui, p, t_imp)
53+ post_implicit! (Ui, p, t_imp)
54+ end
5255 solve_newton! (
5356 newtons_method,
5457 newtons_method_cache,
5558 U,
5659 implicit_equation_residual!,
5760 implicit_equation_jacobian!,
5861 call_post_implicit!,
62+ call_post_implicit_last!,
5963 )
6064 end
6165
@@ -69,7 +73,6 @@ function step_u!(integrator, cache::IMEXARKCache, ::ARS343)
6973 @. U = u + dt * a_exp[i, 1 ] * T_lim[1 ] + dt * a_exp[i, 2 ] * T_lim[2 ]
7074 lim! (U, p, t_exp, u)
7175 @. U += dt * a_exp[i, 1 ] * T_exp[1 ] + dt * a_exp[i, 2 ] * T_exp[2 ] + dt * a_imp[i, 2 ] * T_imp[2 ]
72- dss! (U, p, t_exp)
7376 post_explicit! (U, p, t_exp)
7477
7578 @. temp = U # used in closures
@@ -85,13 +88,18 @@ function step_u!(integrator, cache::IMEXARKCache, ::ARS343)
8588 call_post_implicit! = Ui -> begin
8689 post_implicit! (Ui, p, t_imp)
8790 end
91+ call_post_implicit_last! = Ui -> begin
92+ dss! (Ui, p, t_imp)
93+ post_implicit! (Ui, p, t_imp)
94+ end
8895 solve_newton! (
8996 newtons_method,
9097 newtons_method_cache,
9198 U,
9299 implicit_equation_residual!,
93100 implicit_equation_jacobian!,
94101 call_post_implicit!,
102+ call_post_implicit_last!,
95103 )
96104 end
97105
@@ -109,7 +117,6 @@ function step_u!(integrator, cache::IMEXARKCache, ::ARS343)
109117 dt * a_exp[i, 3 ] * T_exp[3 ] +
110118 dt * a_imp[i, 2 ] * T_imp[2 ] +
111119 dt * a_imp[i, 3 ] * T_imp[3 ]
112- dss! (U, p, t_exp)
113120 post_explicit! (U, p, t_exp)
114121
115122 @. temp = U # used in closures
@@ -125,13 +132,18 @@ function step_u!(integrator, cache::IMEXARKCache, ::ARS343)
125132 call_post_implicit! = Ui -> begin
126133 post_implicit! (Ui, p, t_imp)
127134 end
135+ call_post_implicit_last! = Ui -> begin
136+ dss! (Ui, p, t_imp)
137+ post_implicit! (Ui, p, t_imp)
138+ end
128139 solve_newton! (
129140 newtons_method,
130141 newtons_method_cache,
131142 U,
132143 implicit_equation_residual!,
133144 implicit_equation_jacobian!,
134145 call_post_implicit!,
146+ call_post_implicit_last!,
135147 )
136148 end
137149
0 commit comments