@@ -352,13 +352,15 @@ error to estimate the error norm.
352352"""
353353# Defect control
354354@views function error_estimate! (cache:: MIRKCache{iip, T} , controller:: GlobalErrorControl ,
355- errors, sol, nlsolve_alg) where {iip, T}
356- return error_estimate! (cache, controller, controller. method, errors, sol, nlsolve_alg)
355+ errors, sol, nlsolve_alg, abstol) where {iip, T}
356+ return error_estimate! (
357+ cache, controller, controller. method, errors, sol, nlsolve_alg, abstol)
357358end
358359
359360# Global error control
360- @views function error_estimate! (cache:: MIRKCache{iip, T, use_both, DiffCacheNeeded} ,
361- controller:: DefectControl , errors, sol, nlsolve_alg) where {iip, T, use_both}
361+ @views function error_estimate! (
362+ cache:: MIRKCache{iip, T, use_both, DiffCacheNeeded} , controller:: DefectControl ,
363+ errors, sol, nlsolve_alg, abstol) where {iip, T, use_both}
362364 (; f, alg, mesh, mesh_dt) = cache
363365 (; τ_star) = cache. ITU
364366
402404 defect_norm > controller. defect_threshold, ReturnCode. Failure, ReturnCode. Success)
403405 return defect_norm, info
404406end
405- @views function error_estimate! (cache:: MIRKCache{iip, T, use_both, NoDiffCacheNeeded} ,
406- controller:: DefectControl , errors, sol, nlsolve_alg) where {iip, T, use_both}
407+ @views function error_estimate! (
408+ cache:: MIRKCache{iip, T, use_both, NoDiffCacheNeeded} , controller:: DefectControl ,
409+ errors, sol, nlsolve_alg, abstol) where {iip, T, use_both}
407410 (; f, alg, mesh, mesh_dt) = cache
408411 (; τ_star) = cache. ITU
409412
@@ -451,14 +454,14 @@ end
451454# Sequential error control
452455@views function error_estimate! (
453456 cache:: MIRKCache{iip, T} , controller:: SequentialErrorControl ,
454- errors, sol, nlsolve_alg) where {iip, T}
457+ errors, sol, nlsolve_alg, abstol ) where {iip, T}
455458 defect_norm, info = error_estimate! (
456- cache:: MIRKCache{iip, T} , controller. defect, errors, sol, nlsolve_alg)
459+ cache:: MIRKCache{iip, T} , controller. defect, errors, sol, nlsolve_alg, abstol )
457460 error_norm = defect_norm
458461 if defect_norm <= abstol
459462 global_error_norm, info = error_estimate! (
460463 cache:: MIRKCache{iip, T} , controller. global_error,
461- controller. global_error. method, errors, sol, nlsolve_alg)
464+ controller. global_error. method, errors, sol, nlsolve_alg, abstol )
462465 error_norm = global_error_norm
463466 return error_norm, info
464467 end
@@ -467,23 +470,24 @@ end
467470
468471# Hybrid error control
469472function error_estimate! (cache:: MIRKCache{iip, T} , controller:: HybridErrorControl ,
470- errors, sol, nlsolve_alg) where {iip, T}
473+ errors, sol, nlsolve_alg, abstol ) where {iip, T}
471474 L = length (cache. mesh) - 1
472475 defect = errors[:, 1 : L]
473476 global_error = errors[:, (L + 1 ): end ]
474477 defect_norm, _ = error_estimate! (
475- cache:: MIRKCache{iip, T} , controller. defect, defect, sol, nlsolve_alg)
478+ cache:: MIRKCache{iip, T} , controller. defect, defect, sol, nlsolve_alg, abstol )
476479 global_error_norm, _ = error_estimate! (
477480 cache, controller. global_error, controller. global_error. method,
478- global_error, sol, nlsolve_alg)
481+ global_error, sol, nlsolve_alg, abstol )
479482
480483 error_norm = controller. DE * defect_norm + controller. GE * global_error_norm
481484 copyto! (errors, VectorOfArray (vcat (defect. u, global_error. u)))
482485 return error_norm, ReturnCode. Success
483486end
484487
485488@views function error_estimate! (cache:: MIRKCache{iip, T} , controller:: GlobalErrorControl ,
486- global_error_control:: REErrorControl , errors, sol, nlsolve_alg) where {iip, T}
489+ global_error_control:: REErrorControl , errors,
490+ sol, nlsolve_alg, abstol) where {iip, T}
487491 (; prob, alg) = cache
488492
489493 # Use the previous solution as the initial guess
502506end
503507
504508@views function error_estimate! (cache:: MIRKCache{iip, T} , controller:: GlobalErrorControl ,
505- global_error_control:: HOErrorControl , errors, sol, nlsolve_alg) where {iip, T}
509+ global_error_control:: HOErrorControl , errors,
510+ sol, nlsolve_alg, abstol) where {iip, T}
506511 (; prob, alg) = cache
507512
508513 # Use the previous solution as the initial guess
0 commit comments