Skip to content

Commit

Permalink
Only take the last nl_iters
Browse files Browse the repository at this point in the history
  • Loading branch information
YingboMa committed Jan 21, 2019
1 parent 9b8c8ee commit 8dfdfa0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/perform_step/kencarp_kvaerno_perform_step.jl
Original file line number Diff line number Diff line change
Expand Up @@ -985,12 +985,10 @@ end
# TODO: Add extrapolation choice
nlcache.z = z₂ = zero(u)

nlcache.nl_iters = 0
nlcache.tmp = uprev + γ*z₁
nlcache.c = 2γ
z₂,η,iter,fail_convergence = nlsolve!(integrator)
fail_convergence && return
nlcache.nl_iters += iter

################################## Solve Step 3

Expand All @@ -1000,7 +998,6 @@ end
nlcache.c = c3
z₃,η,iter,fail_convergence = nlsolve!(integrator)
fail_convergence && return
nlcache.nl_iters += iter

################################## Solve Step 4

Expand All @@ -1010,7 +1007,6 @@ end
nlcache.c = c4
z₄,η,iter,fail_convergence = nlsolve!(integrator)
fail_convergence && return
nlcache.nl_iters += iter

################################## Solve Step 5

Expand All @@ -1020,7 +1016,6 @@ end
nlcache.c = c5
z₅,η,iter,fail_convergence = nlsolve!(integrator)
fail_convergence && return
nlcache.nl_iters += iter

################################## Solve Step 6

Expand All @@ -1030,7 +1025,6 @@ end
nlcache.c = c6
z₆,η,iter,fail_convergence = nlsolve!(integrator)
fail_convergence && return
nlcache.nl_iters += iter

################################## Solve Step 7

Expand All @@ -1047,7 +1041,7 @@ end
################################### Finalize

nlcache.ηold = η
nlcache.nl_iters += iter
nlcache.nl_iters = iter

if integrator.opts.adaptive
tmp = btilde1*z₁ + btilde3*z₃ + btilde4*z₄ + btilde5*z₅ + btilde6*z₆ + btilde7*z₇
Expand Down

0 comments on commit 8dfdfa0

Please sign in to comment.