-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2074: Use SciMLBase over OrdinaryDiffEq where possible r=charleskawczynski a=charleskawczynski This PR is an attempt to remove our dependency on OrdinaryDiffEq, in favor of using the lighter weight package, SciMLBase. Unfortunately, we can't remove the dependency because, for example, `ODE.Tsit5()` is an ODE algorithm that is (I think) first defined in OrdinaryDiffEq. Same goes for a bunch of methods defined in `type_getters.jl`: ```julia is_explicit_CTS_algo_type(alg_or_tableau) = alg_or_tableau <: CTS.ERKAlgorithmName is_imex_CTS_algo_type(alg_or_tableau) = alg_or_tableau <: CTS.IMEXARKAlgorithmName is_implicit_type(::typeof(ODE.IMEXEuler)) = true is_implicit_type(alg_or_tableau) = alg_or_tableau <: Union{ ODE.OrdinaryDiffEqImplicitAlgorithm, ODE.OrdinaryDiffEqAdaptiveImplicitAlgorithm, } || is_imex_CTS_algo_type(alg_or_tableau) is_ordinary_diffeq_newton(::typeof(ODE.IMEXEuler)) = true is_ordinary_diffeq_newton(alg_or_tableau) = alg_or_tableau <: Union{ ODE.OrdinaryDiffEqNewtonAlgorithm, ODE.OrdinaryDiffEqNewtonAdaptiveAlgorithm, } is_imex_CTS_algo(::CTS.IMEXAlgorithm) = true is_imex_CTS_algo(::SciMLBase.AbstractODEAlgorithm) = false is_implicit(::ODE.OrdinaryDiffEqImplicitAlgorithm) = true is_implicit(::ODE.OrdinaryDiffEqAdaptiveImplicitAlgorithm) = true is_implicit(ode_algo) = is_imex_CTS_algo(ode_algo) is_rosenbrock(::ODE.Rosenbrock23) = true is_rosenbrock(::ODE.Rosenbrock32) = true is_rosenbrock(::SciMLBase.AbstractODEAlgorithm) = false use_transform(ode_algo) = !(is_imex_CTS_algo(ode_algo) || is_rosenbrock(ode_algo)) additional_integrator_kwargs(::SciMLBase.AbstractODEAlgorithm) = (; adaptive = false, progress = isinteractive(), progress_steps = isinteractive() ? 1 : 1000, ) additional_integrator_kwargs(::CTS.DistributedODEAlgorithm) = (; kwargshandle = ODE.KeywordArgSilent, # allow custom kwargs adjustfinal = true, # TODO: enable progress bars in ClimaTimeSteppers ) is_cts_algo(::SciMLBase.AbstractODEAlgorithm) = false is_cts_algo(::CTS.DistributedODEAlgorithm) = true ``` A bunch of these ODE. types are (I think) first defined in OrdinaryDiffEq.jl. Co-authored-by: Charles Kawczynski <[email protected]>
- Loading branch information
Showing
21 changed files
with
75 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.