Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ParamThakkar123 committed Aug 9, 2024
1 parent 120772a commit 49dff07
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_perform_step.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,24 +194,22 @@ end
@muladd function perform_step!(integrator, cache::Union{Rosenbrock23ConstantCache, Rosenbrock32ConstantCache, Rosenbrock33ConstantCache},
repeat_step = false)

if cache isa Rosenbrock32ConstantCache
@unpack t, dt, uprev, u, f, p = integrator
@unpack c₃₂, d, tf, uf = cache

# Precalculations
γ = dt * d
dto2 = dt / 2
dto6 = dt / 6
@unpack t, dt, uprev, u, f, p = integrator
@unpack c₃₂, d, tf, uf = cache

# Precalculations
γ = dt * d
dto2 = dt / 2
dto6 = dt / 6

if cache isa Rosenbrock32ConstantCache
if repeat_step
integrator.fsalfirst = f(uprev, p, t)
integrator.stats.nf += 1
end
end

if cache isa Rosenbrock33ConstantCache
@unpack t, dt, uprev, u, f, p = integrator
@unpack tf, uf = cache
@unpack a21, a31, a32, C21, C31, C32, b1, b2, b3, btilde1, btilde2, btilde3, gamma, c2, c3, d1, d2, d3 = cache.tab

# Precalculations
Expand All @@ -223,6 +221,8 @@ end
dtd2 = dt * d2
dtd3 = dt * d3
dtgamma = dt * gamma

W = calc_W(integrator, cache, dtgamma, repeat_step, true)
end

mass_matrix = integrator.f.mass_matrix
Expand Down

0 comments on commit 49dff07

Please sign in to comment.