Skip to content

Commit

Permalink
Unfuse hard-coded ARS updates
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Sep 28, 2023
1 parent 3adc998 commit 82a246d
Showing 1 changed file with 28 additions and 30 deletions.
58 changes: 28 additions & 30 deletions src/time_stepper/hc_ars343.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ function CTS.step_u!(

i = 2
t_exp = t + dt * c_exp[i]
@. U = u + dt * a_exp[i, 1] * T_lim[1]
@. U = u
@. U += dt * a_exp[i, 1] * T_lim[1]
lim!(U, p, t_exp, u)
@. U += dt * a_exp[i, 1] * T_exp[1]
dss!(U, p, t_exp)
Expand Down Expand Up @@ -70,12 +71,13 @@ function CTS.step_u!(

i = 3
t_exp = t + dt * c_exp[i]
@. U = u + dt * a_exp[i, 1] * T_lim[1] + dt * a_exp[i, 2] * T_lim[2]
@. U = u
@. U += dt * a_exp[i, 1] * T_lim[1]
@. U += dt * a_exp[i, 2] * T_lim[2]
lim!(U, p, t_exp, u)
@. 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]
@. U += dt * a_exp[i, 1] * T_exp[1]
@. U += dt * a_exp[i, 2] * T_exp[2]
@. U += dt * a_imp[i, 2] * T_imp[2]
dss!(U, p, t_exp)
post_explicit!(U, p, t_exp)

Expand Down Expand Up @@ -110,18 +112,16 @@ function CTS.step_u!(
T_exp!(T_exp[i], U, p, t_exp)
i = 4
t_exp = t + dt
@. U =
u +
dt * a_exp[i, 1] * T_lim[1] +
dt * a_exp[i, 2] * T_lim[2] +
dt * a_exp[i, 3] * T_lim[3]
@. U = u
@. U += dt * a_exp[i, 1] * T_lim[1]
@. U += dt * a_exp[i, 2] * T_lim[2]
@. U += dt * a_exp[i, 3] * T_lim[3]
lim!(U, p, t_exp, u)
@. U +=
dt * a_exp[i, 1] * T_exp[1] +
dt * a_exp[i, 2] * T_exp[2] +
dt * a_exp[i, 3] * T_exp[3] +
dt * a_imp[i, 2] * T_imp[2] +
dt * a_imp[i, 3] * T_imp[3]
@. U += dt * a_exp[i, 1] * T_exp[1]
@. U += dt * a_exp[i, 2] * T_exp[2]
@. U += dt * a_exp[i, 3] * T_exp[3]
@. U += dt * a_imp[i, 2] * T_imp[2]
@. U += dt * a_imp[i, 3] * T_imp[3]
dss!(U, p, t_exp)
post_explicit!(U, p, t_exp)

Expand Down Expand Up @@ -159,20 +159,18 @@ function CTS.step_u!(
i = -1

t_final = t + dt
@. temp =
u +
dt * b_exp[2] * T_lim[2] +
dt * b_exp[3] * T_lim[3] +
dt * b_exp[4] * T_lim[4]
@. temp = u
@. temp += dt * b_exp[2] * T_lim[2]
@. temp += dt * b_exp[3] * T_lim[3]
@. temp += dt * b_exp[4] * T_lim[4]
lim!(temp, p, t_final, u)
@. u =
temp +
dt * b_exp[2] * T_exp[2] +
dt * b_exp[3] * T_exp[3] +
dt * b_exp[4] * T_exp[4] +
dt * b_imp[2] * T_imp[2] +
dt * b_imp[3] * T_imp[3] +
dt * b_imp[4] * T_imp[4]
@. u = temp
@. u += dt * b_exp[2] * T_exp[2]
@. u += dt * b_exp[3] * T_exp[3]
@. u += dt * b_exp[4] * T_exp[4]
@. u += dt * b_imp[2] * T_imp[2]
@. u += dt * b_imp[3] * T_imp[3]
@. u += dt * b_imp[4] * T_imp[4]
dss!(u, p, t_final)
post_explicit!(u, p, t_final)
return u
Expand Down

0 comments on commit 82a246d

Please sign in to comment.