Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize W matrix formation and fix fastconvergence judgment #706

Merged
merged 15 commits into from
Mar 21, 2019

Conversation

YingboMa
Copy link
Member

ηold is approximately ndz/ndzprev, so the lower it is, the faster convergence the Newton iteration has.

@YingboMa
Copy link
Member Author

I also changed W = M - gamma*J to W = -M + gamma*J

@coveralls
Copy link

coveralls commented Mar 20, 2019

Coverage Status

Coverage increased (+6.0%) to 76.411% when pulling 938b627 on myb/W_transform into 01c54e0 on master.

@YingboMa
Copy link
Member Author

hires
rober
pollution

@codecov
Copy link

codecov bot commented Mar 20, 2019

Codecov Report

Merging #706 into master will increase coverage by 0.05%.
The diff coverage is 89.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #706      +/-   ##
==========================================
+ Coverage   72.69%   72.75%   +0.05%     
==========================================
  Files          93       93              
  Lines       29177    29220      +43     
==========================================
+ Hits        21211    21259      +48     
+ Misses       7966     7961       -5
Impacted Files Coverage Δ
src/caches/rosenbrock_caches.jl 90.69% <ø> (+0.47%) ⬆️
src/perform_step/rosenbrock_perform_step.jl 93.44% <100%> (+0.21%) ⬆️
src/perform_step/firk_perform_step.jl 90.84% <100%> (+0.91%) ⬆️
src/nlsolve/newton.jl 93.15% <100%> (+0.19%) ⬆️
src/alg_utils.jl 32.92% <22.22%> (-0.74%) ⬇️
src/derivative_wrappers.jl 87.5% <77.77%> (-2.83%) ⬇️
src/derivative_utils.jl 85.88% <83.33%> (+7.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 01c54e0...938b627. Read the comment docs.

@YingboMa
Copy link
Member Author

BNGNetwork:

julia> sol_cvodebdf = @time solve(prob, CVODE_BDF());
 29.039184 seconds (1.80 M allocations: 112.732 MiB, 0.83% gc time)

julia> sol_cvodebdf.destats
DiffEqBase.DEStats
Number of function 1 evaluations: 1309
Number of function 2 evaluations: -1
Number of W matrix evaluations: 152
Number of linear solves:        -1
Number of Jacobians created:        26
Number of nonlinear solver iterations:        1305
Number of nonlinear solver convergence failures:        0
Number of rootfind condition calls:        0
Number of accepted steps:       736
Number of rejected steps:       55

julia> sol_kencarp4 = @time solve(prob, KenCarp4(autodiff=false));
 24.699485 seconds (4.23 k allocations: 26.708 MiB, 0.03% gc time)

julia> sol_kencarp4.destats
DiffEqBase.DEStats
Number of function 1 evaluations: 275678
Number of function 2 evaluations: 0
Number of W matrix evaluations: 242
Number of linear solves:        4103
Number of Jacobians created:        242
Number of nonlinear solver iterations:        3909
Number of nonlinear solver convergence failures:        51
Number of rootfind condition calls:        0
Number of accepted steps:       193
Number of rejected steps:       1

@YingboMa
Copy link
Member Author

YingboMa commented Mar 21, 2019

Rober release

rober_release

Rober PR

rober_PR

Hires release

hires_release

Hires PR

hires_PR

Pollution release

pollution_release

Pollution PR

pollution_PR

@YingboMa YingboMa merged commit 98412e9 into master Mar 21, 2019
@YingboMa YingboMa deleted the myb/W_transform branch March 21, 2019 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants