Skip to content

Commit

Permalink
Merge pull request #1233 from utkarsh530/baryeuler
Browse files Browse the repository at this point in the history
Update work calculation and minor fix
  • Loading branch information
ChrisRackauckas committed Aug 7, 2020
2 parents 645f530 + dd636e6 commit 69d9f64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/alg_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ get_current_adaptive_order(alg::ExtrapolationMidpointDeuflhard,cache) = 2cache.n
get_current_adaptive_order(alg::ImplicitDeuflhardExtrapolation,cache) = 2cache.n_curr
get_current_alg_order(alg::ExtrapolationMidpointHairerWanner,cache) = 2(cache.n_curr + 1)
get_current_alg_order(alg::ImplicitHairerWannerExtrapolation,cache) = 2(cache.n_curr + 1)
get_current_alg_order(alg::ImplicitEulerBarycentricExtrapolation,cache) = 2(cache.n_curr + 1)
get_current_alg_order(alg::ImplicitEulerExtrapolation,cache) = 2(cache.n_curr + 1)
get_current_adaptive_order(alg::ExtrapolationMidpointHairerWanner,cache) = 2cache.n_curr
get_current_adaptive_order(alg::ImplicitHairerWannerExtrapolation,cache) = 2cache.n_curr
Expand Down
4 changes: 2 additions & 2 deletions src/caches/extrapolation_caches.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function alg_cache(alg::ImplicitEulerExtrapolation,u,rate_prototype,uEltypeNoUni
for i in 1:n
s += sequence[i]
end
stage_number[n] = 2 * Int(s) + n + 7
stage_number[n] = 2 * Int(s) - n + 7
end
sigma = 9//10
ImplicitEulerExtrapolationConstantCache(Q,dtpropose,T,n_curr,n_old,work,A,step_no,sigma,tf,uf,sequence,stage_number)
Expand Down Expand Up @@ -938,7 +938,7 @@ function alg_cache(alg::ImplicitEulerBarycentricExtrapolation,u,rate_prototype,u
for i in 1:n
s += coefficients.subdividing_sequence[i]
end
stage_number[n] = 2 * Int(s) + n + 7
stage_number[n] = 2 * Int(s) - n + 7
end
sigma = 9//10

Expand Down

0 comments on commit 69d9f64

Please sign in to comment.