From 5bf3cdf9c0b7fe218158d45721e2d30be320bd9f Mon Sep 17 00:00:00 2001 From: Oscar Smith Date: Fri, 30 Aug 2024 20:17:31 -0400 Subject: [PATCH] cleanup --- .../src/OrdinaryDiffEqBDF.jl | 3 +- lib/OrdinaryDiffEqBDF/src/algorithms.jl | 44 +---------- .../src/OrdinaryDiffEqCore.jl | 2 - lib/OrdinaryDiffEqCore/src/doc_utils.jl | 36 +-------- .../src/OrdinaryDiffEqExtrapolation.jl | 2 +- .../src/OrdinaryDiffEqFIRK.jl | 2 +- .../src/OrdinaryDiffEqIMEXMultistep.jl | 3 +- .../src/algorithms.jl | 3 +- .../src/OrdinaryDiffEqPDIRK.jl | 2 +- .../src/OrdinaryDiffEqRosenbrock.jl | 76 +------------------ .../src/OrdinaryDiffEqSDIRK.jl | 1 - lib/OrdinaryDiffEqSDIRK/src/algorithms.jl | 37 +-------- .../src/OrdinaryDiffEqStabilizedIRK.jl | 2 +- src/OrdinaryDiffEq.jl | 6 +- 14 files changed, 18 insertions(+), 201 deletions(-) diff --git a/lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl b/lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl index 5a2981219b..04ccc94195 100644 --- a/lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl +++ b/lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl @@ -7,8 +7,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, OrdinaryDiffEqMutableCache, OrdinaryDiffEqConstantCache, OrdinaryDiffEqNewtonAdaptiveAlgorithm, OrdinaryDiffEqNewtonAlgorithm, - AbstractController, DEFAULT_PRECS, - CompiledFloats, uses_uprev, + AbstractController, CompiledFloats, uses_uprev, alg_cache, _vec, _reshape, @cache, isfsal, full_cache, constvalue, isadaptive, error_constant, diff --git a/lib/OrdinaryDiffEqBDF/src/algorithms.jl b/lib/OrdinaryDiffEqBDF/src/algorithms.jl index cd41ff9a0c..0ab1955d5b 100644 --- a/lib/OrdinaryDiffEqBDF/src/algorithms.jl +++ b/lib/OrdinaryDiffEqBDF/src/algorithms.jl @@ -10,7 +10,6 @@ function BDF_docstring(description::String, concrete_jac = nothing, diff_type = Val{:forward}, linsolve = nothing, - precs = DEFAULT_PRECS, """ * "\n" * extra_keyword_default keyword_default_description = """ @@ -34,40 +33,6 @@ function BDF_docstring(description::String, For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify `$name(linsolve = KLUFactorization()`). When `nothing` is passed, uses `DefaultLinearSolver`. - - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/) - can be used as a left or right preconditioner. - Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)` - function where the arguments are defined as: - - `W`: the current Jacobian of the nonlinear system. Specified as either - ``I - \\gamma J`` or ``I/\\gamma - J`` depending on the algorithm. This will - commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy - representation of the operator. Users can construct the W-matrix on demand - by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching - the `jac_prototype`. - - `du`: the current ODE derivative - - `u`: the current ODE state - - `p`: the ODE parameters - - `t`: the current ODE time - - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since - the last call to `precs`. It is recommended that this is checked to only - update the preconditioner when `newW == true`. - - `Plprev`: the previous `Pl`. - - `Prprev`: the previous `Pr`. - - `solverdata`: Optional extra data the solvers can give to the `precs` function. - Solver-dependent and subject to change. - The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners. - To specify one-sided preconditioning, simply return `nothing` for the preconditioner - which is not used. Additionally, `precs` must supply the dispatch: - ```julia - Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata) - ``` - which is used in the solver setup phase to construct the integrator - type with the preconditioners `(Pl,Pr)`. - The default is `precs=DEFAULT_PRECS` where the default preconditioner function - is defined as: - ```julia - DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing - ``` """ * "/n" * extra_keyword_description generic_solver_docstring( description, name, "Multistep Method.", references, @@ -658,17 +623,16 @@ function DABDF2(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = V end #= -struct DBDF{CS,AD,F,F2,P,FDT,ST,CJ} <: DAEAlgorithm{CS,AD,FDT,ST,CJ} +struct DBDF{CS,AD,F,F2,FDT,ST,CJ} <: DAEAlgorithm{CS,AD,FDT,ST,CJ} linsolve::F nlsolve::F2 - precs::P extrapolant::Symbol end DBDF(;chunk_size=Val{0}(),autodiff=Val{true}(), standardtag = Val{true}(), concrete_jac = nothing,diff_type=Val{:forward}, - linsolve=nothing,precs = DEFAULT_PRECS,nlsolve=NLNewton(),extrapolant=:linear) = - DBDF{_unwrap_val(chunk_size),_unwrap_val(autodiff),typeof(linsolve),typeof(nlsolve),typeof(precs),diff_type,_unwrap_val(standardtag),_unwrap_val(concrete_jac)}( - linsolve,nlsolve,precs,extrapolant) + linsolve=nothing,nlsolve=NLNewton(),extrapolant=:linear) = + DBDF{_unwrap_val(chunk_size),_unwrap_val(autodiff),typeof(linsolve),typeof(nlsolve),diff_type,_unwrap_val(standardtag),_unwrap_val(concrete_jac)}( + linsolve,nlsolve,extrapolant) =# @doc BDF_docstring("Fully implicit implementation of FBDF based on Shampine's", diff --git a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl index 5673c96f4b..dce854ce79 100644 --- a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl +++ b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl @@ -105,8 +105,6 @@ end Divergence = -2 end const TryAgain = SlowConvergence - -DEFAULT_PRECS(W, p) = nothing, nothing isdiscretecache(cache) = false include("doc_utils.jl") diff --git a/lib/OrdinaryDiffEqCore/src/doc_utils.jl b/lib/OrdinaryDiffEqCore/src/doc_utils.jl index 75eb00dc7d..a75221fcc8 100644 --- a/lib/OrdinaryDiffEqCore/src/doc_utils.jl +++ b/lib/OrdinaryDiffEqCore/src/doc_utils.jl @@ -87,7 +87,6 @@ function differentiation_rk_docstring(description::String, concrete_jac = nothing, diff_type = Val{:forward}, linsolve = nothing, - precs = DEFAULT_PRECS, """ * extra_keyword_default keyword_default_description = """ @@ -111,40 +110,7 @@ function differentiation_rk_docstring(description::String, For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify `$name(linsolve = KLUFactorization()`). When `nothing` is passed, uses `DefaultLinearSolver`. - - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/) - can be used as a left or right preconditioner. - Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)` - function where the arguments are defined as: - - `W`: the current Jacobian of the nonlinear system. Specified as either - ``I - \\gamma J`` or ``I/\\gamma - J`` depending on the algorithm. This will - commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy - representation of the operator. Users can construct the W-matrix on demand - by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching - the `jac_prototype`. - - `du`: the current ODE derivative - - `u`: the current ODE state - - `p`: the ODE parameters - - `t`: the current ODE time - - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since - the last call to `precs`. It is recommended that this is checked to only - update the preconditioner when `newW == true`. - - `Plprev`: the previous `Pl`. - - `Prprev`: the previous `Pr`. - - `solverdata`: Optional extra data the solvers can give to the `precs` function. - Solver-dependent and subject to change. - The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners. - To specify one-sided preconditioning, simply return `nothing` for the preconditioner - which is not used. Additionally, `precs` must supply the dispatch: - ```julia - Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata) - ``` - which is used in the solver setup phase to construct the integrator - type with the preconditioners `(Pl,Pr)`. - The default is `precs=DEFAULT_PRECS` where the default preconditioner function - is defined as: - ```julia - DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing - ``` + """ * extra_keyword_description generic_solver_docstring( diff --git a/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl b/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl index 29bbc6ca8b..6b5726a71a 100644 --- a/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl +++ b/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl @@ -13,7 +13,7 @@ import OrdinaryDiffEqCore: alg_order, alg_maximum_order, get_current_adaptive_or OrdinaryDiffEqAdaptiveAlgorithm, OrdinaryDiffEqAdaptiveImplicitAlgorithm, alg_cache, CompiledFloats, @threaded, stepsize_controller!, - DEFAULT_PRECS, full_cache, + full_cache, constvalue, PolyesterThreads, Sequential, BaseThreads, _digest_beta1_beta2, timedepentdtmin, _unwrap_val, _reshape, _vec, get_fsalfirstlast, generic_solver_docstring, diff --git a/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl b/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl index af3e4a7dd2..bc6bf9e12a 100644 --- a/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl +++ b/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl @@ -10,7 +10,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, constvalue, _unwrap_val, differentiation_rk_docstring, trivial_limiter!, _ode_interpolant!, _ode_addsteps!, AbstractController, - qmax_default, alg_adaptive_order, DEFAULT_PRECS, + qmax_default, alg_adaptive_order, stepsize_controller!, step_accept_controller!, step_reject_controller!, PredictiveController, alg_can_repeat_jac, NewtonAlgorithm, diff --git a/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl b/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl index 567e6b5eae..6771de9751 100644 --- a/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl +++ b/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl @@ -1,8 +1,7 @@ module OrdinaryDiffEqIMEXMultistep import OrdinaryDiffEqCore: alg_order, issplit, OrdinaryDiffEqNewtonAlgorithm, _unwrap_val, - DEFAULT_PRECS, OrdinaryDiffEqConstantCache, - OrdinaryDiffEqMutableCache, + OrdinaryDiffEqConstantCache, OrdinaryDiffEqMutableCache, @cache, alg_cache, initialize!, perform_step!, @unpack, full_cache, get_fsalfirstlast, generic_solver_docstring diff --git a/lib/OrdinaryDiffEqIMEXMultistep/src/algorithms.jl b/lib/OrdinaryDiffEqIMEXMultistep/src/algorithms.jl index 0a16da7b23..75272c874b 100644 --- a/lib/OrdinaryDiffEqIMEXMultistep/src/algorithms.jl +++ b/lib/OrdinaryDiffEqIMEXMultistep/src/algorithms.jl @@ -24,7 +24,6 @@ struct CNAB2{CS, AD, F, F2, FDT, ST, CJ} <: OrdinaryDiffEqNewtonAlgorithm{CS, AD, FDT, ST, CJ} linsolve::F nlsolve::F2 - precs::P extrapolant::Symbol end @@ -58,7 +57,7 @@ end pages={263--276}, year={2015}, publisher={Elsevier}}", "", "") -struct CNLF2{CS, AD, F, F2, P, FDT, ST, CJ} <: +struct CNLF2{CS, AD, F, F2, FDT, ST, CJ} <: OrdinaryDiffEqNewtonAlgorithm{CS, AD, FDT, ST, CJ} linsolve::F nlsolve::F2 diff --git a/lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl b/lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl index 18a4e56205..5248348b0b 100644 --- a/lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl +++ b/lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl @@ -3,7 +3,7 @@ module OrdinaryDiffEqPDIRK import OrdinaryDiffEqCore: isfsal, alg_order, _unwrap_val, OrdinaryDiffEqNewtonAlgorithm, OrdinaryDiffEqConstantCache, OrdinaryDiffEqMutableCache, constvalue, alg_cache, - uses_uprev, @unpack, unwrap_alg, @cache, DEFAULT_PRECS, + uses_uprev, @unpack, unwrap_alg, @cache, @threaded, initialize!, perform_step!, isthreaded, full_cache, get_fsalfirstlast, differentiation_rk_docstring import StaticArrays: SVector diff --git a/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl b/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl index d009f9c7a3..2f3c58328a 100644 --- a/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl +++ b/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl @@ -1,7 +1,7 @@ module OrdinaryDiffEqRosenbrock import OrdinaryDiffEqCore: alg_order, alg_adaptive_order, isWmethod, isfsal, _unwrap_val, - DEFAULT_PRECS, OrdinaryDiffEqRosenbrockAlgorithm, @cache, + OrdinaryDiffEqRosenbrockAlgorithm, @cache, alg_cache, initialize!, @unpack, calculate_residuals!, OrdinaryDiffEqMutableCache, OrdinaryDiffEqConstantCache, _ode_interpolant, _ode_interpolant!, @@ -54,7 +54,6 @@ function rosenbrock_wanner_docstring(description::String, concrete_jac = nothing, diff_type = Val{:central}, linsolve = nothing, - precs = DEFAULT_PRECS, """ * extra_keyword_default keyword_default_description = """ @@ -78,41 +77,7 @@ function rosenbrock_wanner_docstring(description::String, For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify `$name(linsolve = KLUFactorization()`). When `nothing` is passed, uses `DefaultLinearSolver`. - - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/) - can be used as a left or right preconditioner. - Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)` - function where the arguments are defined as: - - `W`: the current Jacobian of the nonlinear system. Specified as either - ``I - \\gamma J`` or ``I/\\gamma - J`` depending on the algorithm. This will - commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy - representation of the operator. Users can construct the W-matrix on demand - by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching - the `jac_prototype`. - - `du`: the current ODE derivative - - `u`: the current ODE state - - `p`: the ODE parameters - - `t`: the current ODE time - - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since - the last call to `precs`. It is recommended that this is checked to only - update the preconditioner when `newW == true`. - - `Plprev`: the previous `Pl`. - - `Prprev`: the previous `Pr`. - - `solverdata`: Optional extra data the solvers can give to the `precs` function. - Solver-dependent and subject to change. - The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners. - To specify one-sided preconditioning, simply return `nothing` for the preconditioner - which is not used. Additionally, `precs` must supply the dispatch: - ```julia - Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata) - ``` - which is used in the solver setup phase to construct the integrator - type with the preconditioners `(Pl,Pr)`. - The default is `precs=DEFAULT_PRECS` where the default preconditioner function - is defined as: - ```julia - DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing - ``` - """ * extra_keyword_description + """ * extra_keyword_description if with_step_limiter keyword_default *= "step_limiter! = OrdinaryDiffEq.trivial_limiter!,\n" @@ -152,41 +117,7 @@ function rosenbrock_docstring(description::String, For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify `$name(linsolve = KLUFactorization()`). When `nothing` is passed, uses `DefaultLinearSolver`. - - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/) - can be used as a left or right preconditioner. - Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)` - function where the arguments are defined as: - - `W`: the current Jacobian of the nonlinear system. Specified as either - ``I - \\gamma J`` or ``I/\\gamma - J`` depending on the algorithm. This will - commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy - representation of the operator. Users can construct the W-matrix on demand - by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching - the `jac_prototype`. - - `du`: the current ODE derivative - - `u`: the current ODE state - - `p`: the ODE parameters - - `t`: the current ODE time - - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since - the last call to `precs`. It is recommended that this is checked to only - update the preconditioner when `newW == true`. - - `Plprev`: the previous `Pl`. - - `Prprev`: the previous `Pr`. - - `solverdata`: Optional extra data the solvers can give to the `precs` function. - Solver-dependent and subject to change. - The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners. - To specify one-sided preconditioning, simply return `nothing` for the preconditioner - which is not used. Additionally, `precs` must supply the dispatch: - ```julia - Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata) - ``` - which is used in the solver setup phase to construct the integrator - type with the preconditioners `(Pl,Pr)`. - The default is `precs=DEFAULT_PRECS` where the default preconditioner function - is defined as: - ```julia - DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing - ``` - """ * extra_keyword_default + """ * extra_keyword_default keyword_default_description = """ - `chunk_size`: TBD @@ -195,7 +126,6 @@ function rosenbrock_docstring(description::String, - `concrete_jac`: function of the form `jac!(J, u, p, t)` - `diff_type`: TBD - `linsolve`: custom solver for the inner linear systems - - `precs`: custom preconditioner for the inner linear solver """ * extra_keyword_description if with_step_limiter diff --git a/lib/OrdinaryDiffEqSDIRK/src/OrdinaryDiffEqSDIRK.jl b/lib/OrdinaryDiffEqSDIRK/src/OrdinaryDiffEqSDIRK.jl index f9fc3bbd9e..201ee7c1db 100644 --- a/lib/OrdinaryDiffEqSDIRK/src/OrdinaryDiffEqSDIRK.jl +++ b/lib/OrdinaryDiffEqSDIRK/src/OrdinaryDiffEqSDIRK.jl @@ -7,7 +7,6 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, OrdinaryDiffEqMutableCache, OrdinaryDiffEqConstantCache, OrdinaryDiffEqNewtonAdaptiveAlgorithm, OrdinaryDiffEqNewtonAlgorithm, - DEFAULT_PRECS, OrdinaryDiffEqAdaptiveAlgorithm, CompiledFloats, uses_uprev, alg_cache, _vec, _reshape, @cache, isfsal, full_cache, constvalue, _unwrap_val, _ode_interpolant, diff --git a/lib/OrdinaryDiffEqSDIRK/src/algorithms.jl b/lib/OrdinaryDiffEqSDIRK/src/algorithms.jl index 38b51b9a3d..bcd31c410d 100644 --- a/lib/OrdinaryDiffEqSDIRK/src/algorithms.jl +++ b/lib/OrdinaryDiffEqSDIRK/src/algorithms.jl @@ -10,7 +10,6 @@ function SDIRK_docstring(description::String, concrete_jac = nothing, diff_type = Val{:forward}, linsolve = nothing, - precs = DEFAULT_PRECS, nlsolve = NLNewton(), """ * extra_keyword_default @@ -35,41 +34,7 @@ function SDIRK_docstring(description::String, For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify `$name(linsolve = KLUFactorization()`). When `nothing` is passed, uses `DefaultLinearSolver`. - - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/) - can be used as a left or right preconditioner. - Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)` - function where the arguments are defined as: - - `W`: the current Jacobian of the nonlinear system. Specified as either - ``I - \\gamma J`` or ``I/\\gamma - J`` depending on the algorithm. This will - commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy - representation of the operator. Users can construct the W-matrix on demand - by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching - the `jac_prototype`. - - `du`: the current ODE derivative - - `u`: the current ODE state - - `p`: the ODE parameters - - `t`: the current ODE time - - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since - the last call to `precs`. It is recommended that this is checked to only - update the preconditioner when `newW == true`. - - `Plprev`: the previous `Pl`. - - `Prprev`: the previous `Pr`. - - `solverdata`: Optional extra data the solvers can give to the `precs` function. - Solver-dependent and subject to change. - The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners. - To specify one-sided preconditioning, simply return `nothing` for the preconditioner - which is not used. Additionally, `precs` must supply the dispatch: - ```julia - Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata) - ``` - which is used in the solver setup phase to construct the integrator - type with the preconditioners `(Pl,Pr)`. - The default is `precs=DEFAULT_PRECS` where the default preconditioner function - is defined as: - ```julia - DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing - ``` - - `nlsolve`: TBD + - `nlsolve`: TBD """ * extra_keyword_description generic_solver_docstring( diff --git a/lib/OrdinaryDiffEqStabilizedIRK/src/OrdinaryDiffEqStabilizedIRK.jl b/lib/OrdinaryDiffEqStabilizedIRK/src/OrdinaryDiffEqStabilizedIRK.jl index f16310de7e..6041a3aee8 100644 --- a/lib/OrdinaryDiffEqStabilizedIRK/src/OrdinaryDiffEqStabilizedIRK.jl +++ b/lib/OrdinaryDiffEqStabilizedIRK/src/OrdinaryDiffEqStabilizedIRK.jl @@ -9,7 +9,7 @@ import OrdinaryDiffEqCore: alg_order, alg_maximum_order, OrdinaryDiffEqMutableCache, OrdinaryDiffEqConstantCache, OrdinaryDiffEqAdaptiveAlgorithm, OrdinaryDiffEqAdaptiveImplicitAlgorithm, - alg_cache, _unwrap_val, DEFAULT_PRECS, @cache, + alg_cache, _unwrap_val, @cache, _reshape, _vec, full_cache, get_fsalfirstlast, generic_solver_docstring diff --git a/src/OrdinaryDiffEq.jl b/src/OrdinaryDiffEq.jl index 503484ac33..9c71609259 100644 --- a/src/OrdinaryDiffEq.jl +++ b/src/OrdinaryDiffEq.jl @@ -35,10 +35,8 @@ import OrdinaryDiffEqCore: trivial_limiter!, CompositeAlgorithm, alg_order, unwrap_alg, apply_step!, initialize_tstops, uses_uprev, initialize_saveat, isimplicit, initialize_d_discontinuities, isdtchangeable, - _searchsortedfirst, - _searchsortedlast, - @unpack, ismultistep, DEFAULT_PRECS, isautoswitch, - get_chunksize_int, + _searchsortedfirst, _searchsortedlast, + @unpack, ismultistep, isautoswitch, get_chunksize_int, _unwrap_val, alg_autodiff, concrete_jac, alg_difftype, standardtag, alg_extrapolates, alg_maximum_order, alg_adaptive_order,