Skip to content

Commit

Permalink
minor simplifcation
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith committed Sep 9, 2024
1 parent 17c43c6 commit 0b0ba2e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/OrdinaryDiffEqStabilizedIRK/src/irkc_perform_step.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function perform_step!(integrator, cache::IRKCConstantCache, repeat_step = false
#maxm = max(2,Int(floor(sqrt(integrator.opts.internalnorm(integrator.opts.reltol,t)/(10 *eps(integrator.opts.internalnorm(uprev,t)))))))
maxm = 50
mdeg = 1 + floor(Int, sqrt(1.54 * abs(dt) * integrator.eigen_est + 1))
mdeg = min(maxm, max(minm, mdeg))
mdeg = clamp(mdeg, minm, maxm)

ω₀ = 1 + 2 / (13 * (mdeg^2))
temp₁ = ω₀^2 - 1
Expand Down Expand Up @@ -156,9 +156,8 @@ function perform_step!(integrator, cache::IRKCCache, repeat_step = false)
# The the number of degree for Chebyshev polynomial
#maxm = max(2,int(floor(sqrt(integrator.opts.internalnorm(integrator.opts.reltol,t)/(10 *eps(integrator.opts.internalnorm(uprev,t)))))))
maxm = 50
mdeg = 1 + Int(floor(sqrt(1.54 * abs(dt) * integrator.eigen_est + 1)))
mdeg = (mdeg < minm) ? minm : mdeg
mdeg = (mdeg >= maxm) ? maxm : mdeg
mdeg = 1 + floor(Int, sqrt(1.54 * abs(dt) * integrator.eigen_est + 1))
mdeg = clamp(mdeg, minm, maxm)

ω₀ = 1 + 2 / (13 * (mdeg^2))
temp₁ = ω₀^2 - 1
Expand Down

0 comments on commit 0b0ba2e

Please sign in to comment.