|
83 | 83 | nlcache = nlsolver.cache.cache |
84 | 84 | step!(nlcache) |
85 | 85 | nlsolver.ztmp = nlcache.u |
86 | | - ndz = opts.internalnorm(nlcache.fu, t) |
| 86 | + |
| 87 | + ustep = compute_ustep(tmp, γ, z, method) |
| 88 | + atmp = calculate_residuals(nlcache.fu, uprev, ustep, opts.abstol, opts.reltol, |
| 89 | + opts.internalnorm, t) |
| 90 | + ndz = opts.internalnorm(atmp, t) |
| 91 | + #ndz = opts.internalnorm(nlcache.fu, t) |
87 | 92 | # NDF and BDF are special because the truncation error is directly |
88 | 93 | # proportional to the total displacement. |
89 | 94 | if integrator.alg isa QNDF |
|
95 | 100 | @muladd function compute_step!(nlsolver::NLSolver{<:NonlinearSolveAlg, true}, integrator) |
96 | 101 | @unpack uprev, t, p, dt, opts = integrator |
97 | 102 | @unpack z, tmp, ztmp, γ, α, cache, method = nlsolver |
98 | | - @unpack tstep, invγdt, ustep = cache |
| 103 | + @unpack tstep, invγdt, atmp, ustep = cache |
99 | 104 |
|
100 | 105 | nlcache = nlsolver.cache.cache |
101 | 106 | step!(nlcache) |
102 | 107 | @.. broadcast=false ztmp=nlcache.u |
103 | | - ndz = opts.internalnorm(nlcache.fu, t) |
| 108 | + |
| 109 | + ustep = compute_ustep!(ustep, tmp, γ, z, method) |
| 110 | + calculate_residuals!(atmp, nlcache.fu, uprev, ustep, opts.abstol, opts.reltol, |
| 111 | + opts.internalnorm, t) |
| 112 | + ndz = opts.internalnorm(atmp, t) |
| 113 | + #ndz = opts.internalnorm(nlcache.fu, t) |
104 | 114 | # NDF and BDF are special because the truncation error is directly |
105 | 115 | # proportional to the total displacement. |
106 | 116 | if integrator.alg isa QNDF |
|
0 commit comments