Skip to content

Commit 5351c6a

Browse files
Move single column ARS into safetestset
1 parent c64bcdd commit 5351c6a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ include("convergence.jl")
1616
include("callbacks.jl")
1717
include("test_convergence_checker.jl")
1818
include("test_newtons_method.jl")
19-
include("single_column_ARS_test.jl")
19+
@safetestset "Single column ARS" begin include("single_column_ARS_test.jl") end
2020
include("compare_generated.jl") # TODO: Remove this.
2121
@safetestset "Aqua" begin include("aqua.jl") end
2222

test/single_column_ARS_test.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ end
198198
spatial_residual!(du, u, ss, 0.0)
199199

200200
end
201-
function jac_imp(J, u)
201+
function jac_imp(J, u)
202202
jacobian!(J, u, ss, 0.0)
203203
end
204204

@@ -236,7 +236,7 @@ end
236236
0 (1-γ)/2 γ 0;
237237
0 b1 b2 γ;]
238238
b_imp = [0, b1, b2, γ]
239-
239+
240240

241241
n_stage = size(a_imp)[1] - 1
242242
K_exp = zeros(3*N+1, n_stage + 1)
@@ -246,14 +246,14 @@ end
246246
u_stage = copy(u)
247247
for i_stage = 1:n_stage
248248
f_exp(@view(K_exp[:, i_stage]), u_stage)
249-
u_stage_temp = u + dt*(K_imp[:, 1:i_stage-1]*a_imp[i_stage+1, 2:i_stage]
249+
u_stage_temp = u + dt*(K_imp[:, 1:i_stage-1]*a_imp[i_stage+1, 2:i_stage]
250250
+ K_exp[:, 1:i_stage]*a_exp[i_stage+1, 1:i_stage])
251251

252252
K_imp[:, i_stage] = f_imp_solve(f_imp, jac_imp, u_stage_temp, dt*a_imp[i_stage+1, i_stage+1])
253-
u_stage = u_stage_temp + dt*K_imp[:, i_stage]*a_imp[i_stage+1, i_stage+1]
253+
u_stage = u_stage_temp + dt*K_imp[:, i_stage]*a_imp[i_stage+1, i_stage+1]
254254
end
255255
f_exp(@view(K_exp[:, n_stage+1]), u_stage)
256-
u .+= dt*(K_exp[:, 1:n_stage+1]*b_exp[1:n_stage+1] + K_imp[:, 1:n_stage]*b_imp[2:n_stage+1])
256+
u .+= dt*(K_exp[:, 1:n_stage+1]*b_exp[1:n_stage+1] + K_imp[:, 1:n_stage]*b_imp[2:n_stage+1])
257257
end
258258
ref_ARS343 = norm(u)
259259
end
@@ -271,7 +271,7 @@ end
271271
ARS222(NewtonsMethod(; max_iters = 1)),
272272
ARS343(NewtonsMethod(; max_iters = 1)),
273273
)
274-
reference_sol_norm = [860.2745315698107; 860.2745315698107; 860.4393569534262;
274+
reference_sol_norm = [860.2745315698107; 860.2745315698107; 860.4393569534262;
275275
860.452530117785; 860.452530117785; ref_ARS343]
276276

277277

@@ -289,7 +289,7 @@ end
289289
),
290290
copy(u0),(0.0, N_iter*dt), ss)
291291

292-
292+
293293
u = solve(single_column_prob_wfact_split , algo; dt=dt)
294294
@info norm(u.u[end])
295295
@test norm(u.u[end]) reference_sol_norm[i] atol = 1e3eps()

0 commit comments

Comments
 (0)