### Install and Import LSODA Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve Required setup to access the LSODA wrapper for stiff and non-stiff equations. ```julia import Pkg Pkg.add("LSODA") import LSODA ``` -------------------------------- ### Install and Import ProbNumDiffEq.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve Required setup to use probabilistic numerical ODE solvers. ```julia import Pkg Pkg.add("ProbNumDiffEq") import ProbNumDiffEq ``` -------------------------------- ### Install and Import BridgeDiffEq.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/sde_solve Required setup to access fixed-timestep algorithms optimized for out-of-place functions. ```julia Pkg.clone("https://github.com/SciML/BridgeDiffEq.jl") import BridgeDiffEq ``` -------------------------------- ### Install SteadyStateDiffEq.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/api/steadystatediffeq Standalone installation instructions for the package. ```julia using Pkg Pkg.add("SteadyStateDiffEq") import SteadyStateDiffEq ``` -------------------------------- ### Install OrdinaryDiffEqTsit5 Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/Tsit5 Use the Julia package manager to install the solver library. ```julia using Pkg Pkg.add("OrdinaryDiffEqTsit5") ``` -------------------------------- ### Install and Setup diffeqpy for Python Source: https://docs.sciml.ai/DiffEqDocs/stable Install the Python module via pip and run the installation script to configure Julia dependencies. ```bash pip install diffeqpy ``` ```python >>> import diffeqpy >>> diffeqpy.install() ``` ```bash pip install numba ``` -------------------------------- ### Install and Import QuDiffEq.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve Install the package from GitHub and import it to access quantum algorithm-based solvers. ```julia import Pkg Pkg.add(url = "https://github.com/QuantumBFS/QuDiffEq.jl") import QuDiffEq ``` -------------------------------- ### Install OrdinaryDiffEqStabilizedRK Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/semiimplicit/StabilizedRK Use the Julia package manager to install the library before accessing its solvers. ```julia using Pkg Pkg.add("OrdinaryDiffEqStabilizedRK") ``` -------------------------------- ### Install OrdinaryDiffEqIMEXMultistep Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/imex/IMEXMultistep Use the Julia package manager to install the IMEX Multistep solver library. ```julia using Pkg Pkg.add("OrdinaryDiffEqIMEXMultistep") ``` -------------------------------- ### Install and Import NeuralPDE.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve Required setup to use neural network-based ODE solvers. ```julia import Pkg Pkg.add("NeuralPDE") import NeuralPDE ``` -------------------------------- ### Install OrdinaryDiffEqExponentialRK Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/semilinear/ExponentialRK Use the Julia package manager to install the library. ```julia using Pkg Pkg.add("OrdinaryDiffEqExponentialRK") ``` -------------------------------- ### Install and Import ODE Tableaus Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve Required setup to access explicit and implicit tableau libraries. ```julia import Pkg Pkg.add(["OrdinaryDiffEqExplicitTableaus", "OrdinaryDiffEqImplicitTableaus"]) using OrdinaryDiffEqExplicitTableaus, OrdinaryDiffEqImplicitTableaus ``` -------------------------------- ### Install OrdinaryDiffEqBDF Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/imex/IMEXBDF Use the Julia package manager to install the required solver library. ```julia using Pkg Pkg.add("OrdinaryDiffEqBDF") ``` -------------------------------- ### Install OrdinaryDiffEqFIRK Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/implicit/FIRK Use the Julia package manager to install the FIRK solver library. ```julia using Pkg Pkg.add("OrdinaryDiffEqFIRK") ``` -------------------------------- ### Install and Import SciPyDiffEq.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve Use this to install and load the SciPyDiffEq package for benchmarking or transitioning from SciPy. ```julia import Pkg Pkg.add(url = "https://github.com/SciML/SciPyDiffEq.jl") import SciPyDiffEq ``` -------------------------------- ### Install OrdinaryDiffEqHighOrderRK Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/HighOrderRK Use the Julia package manager to add the library. ```julia using Pkg Pkg.add("OrdinaryDiffEqHighOrderRK") ``` -------------------------------- ### Install and Import ODE.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve Use this to install and load the ODE package for legacy ODE solvers. ```julia import Pkg Pkg.add("ODE") import ODE ``` -------------------------------- ### Install DelayDiffEq.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/api/delaydiffeq Use the Julia package manager to install the standalone package. ```julia using Pkg Pkg.add("DelayDiffEq") import DelayDiffEq ``` -------------------------------- ### Install and Import GeometricIntegratorsDiffEq Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/dynamical_solve Required setup to access GeometricIntegrators.jl algorithms within the DifferentialEquations.jl framework. ```julia Pkg.clone("https://github.com/SciML/GeometricIntegratorsDiffEq.jl") import GeometricIntegratorsDiffEq ``` -------------------------------- ### Install and Import IRKGaussLegendre Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve Required setup to access the 16th order Symplectic Gauss-Legendre scheme. ```julia import Pkg Pkg.add("IRKGaussLegendre") import IRKGaussLegendre ``` -------------------------------- ### Install DiffEqCallbacks.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/api/diffeqcallbacks Use the Julia package manager to install the library standalone. ```julia using Pkg Pkg.add("DiffEqCallbacks") import DiffEqCallbacks ``` -------------------------------- ### Use CheckInit for DAE initialization Source: https://docs.sciml.ai/DiffEqDocs/stable/features/dae_initialization Example of using CheckInit to verify initial conditions before solving a DAE problem. ```julia prob = DAEProblem(f, du0, u0, tspan) sol = solve(prob, IDA(), initializealg = CheckInit()) ``` -------------------------------- ### AMF Usage Example Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/semiimplicit/AMF Example demonstrating the setup of an ODEProblem with an AMF-compatible function and solver. ```julia J1_op = MatrixOperator(UpperTriangular(zeros(20, 20)); update_func! = fjac_upper) J2_op = MatrixOperator(LowerTriangular(zeros(20, 20)); update_func! = fjac_lower) J_op = cache_operator(J1_op + J2_op, zeros(20^2)) func = build_amf_function(f!; jac = J_op, split = (J1_op, J2_op)) prob = ODEProblem(func, u0, tspan) sol = solve(prob, AMF(ROS34PW1a)) ``` -------------------------------- ### Install required packages Source: https://docs.sciml.ai/DiffEqDocs/stable/tutorials/jump_diffusion Install the necessary packages for jump processes and differential equations. ```julia using Pkg Pkg.add("JumpProcesses") Pkg.add("OrdinaryDiffEq") Pkg.add("StochasticDiffEq") Pkg.add("Plots") ``` -------------------------------- ### Install OrdinaryDiffEqPDIRK package Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/implicit/PDIRK Use the Julia package manager to add the experimental PDIRK solver library. ```julia using Pkg Pkg.add("OrdinaryDiffEqPDIRK") ``` -------------------------------- ### ARKODE Solver Configuration Source: https://docs.sciml.ai/DiffEqDocs/stable/api/sundials Examples of how to initialize the ARKODE solver with specific explicit or implicit tableaus. ```APIDOC ## ARKODE Solver Initialization ### Description Initializes the ARKODE solver with a specific tableau for explicit or implicit integration. ### Usage ```julia ARKODE(Sundials.Explicit(), etable = Sundials.DORMAND_PRINCE_7_4_5) ARKODE(Sundials.Implicit(), itable = Sundials.KVAERNO_4_2_3) ``` ``` -------------------------------- ### Install OrdinaryDiffEqRKN package Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/dynamicalodeexplicit/RKN Use the Julia package manager to install the RKN solver library. ```julia using Pkg Pkg.add("OrdinaryDiffEqRKN") ``` -------------------------------- ### Solve ODE with Feagin14 Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/Feagin Example demonstrating the setup and execution of an ODE problem using the Feagin14 solver. ```julia using OrdinaryDiffEqFeagin function lorenz!(du, u, p, t) du[1] = 10.0 * (u[2] - u[1]) du[2] = u[1] * (28.0 - u[3]) - u[2] du[3] = u[1] * u[2] - (8 / 3) * u[3] end u0 = [1.0; 0.0; 0.0] tspan = (0.0, 100.0) prob = ODEProblem(lorenz!, u0, tspan) sol = solve(prob, Feagin14()) ``` -------------------------------- ### Configure CVODE_BDF Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/sundials Examples of initializing the CVODE_BDF solver with various method and linear solver configurations. ```julia CVODE_BDF() # BDF method using Newton + Dense solver CVODE_BDF(method=:Functional) # BDF method using Functional iterations CVODE_BDF(linear_solver=:Band,jac_upper=3,jac_lower=3) # Banded solver with nonzero diagonals 3 up and 3 down CVODE_BDF(linear_solver=:BCG) # Biconjugate gradient method ``` -------------------------------- ### Install OrdinaryDiffEqVerner Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/Verner Use the Julia package manager to add the library before accessing the solvers. ```julia using Pkg Pkg.add("OrdinaryDiffEqVerner") ``` -------------------------------- ### Install OrdinaryDiffEqLowOrderRK Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowOrderRK Use the Julia package manager to add the library. ```julia using Pkg Pkg.add("OrdinaryDiffEqLowOrderRK") ``` -------------------------------- ### Install and Import Sundials.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/api/sundials Required steps to install and load the Sundials package before using its solvers. ```julia using Pkg Pkg.add("Sundials") import Sundials ``` -------------------------------- ### Install and Import ODEInterfaceDiffEq Source: https://docs.sciml.ai/DiffEqDocs/stable/api/odeinterfacediffeq Required steps to add and load the package before using its solvers. ```julia using Pkg Pkg.add("ODEInterfaceDiffEq") import ODEInterfaceDiffEq ``` -------------------------------- ### Solve ODE with ExponentialRK Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/semiimplicit/ExponentialRK Example demonstrating the setup and solution of an ODE problem using the EPIRK5s3 solver. ```julia using OrdinaryDiffEqExponentialRK function lorenz!(du, u, p, t) du[1] = 10.0 * (u[2] - u[1]) du[2] = u[1] * (28.0 - u[3]) - u[2] du[3] = u[1] * u[2] - (8 / 3) * u[3] end u0 = [1.0; 0.0; 0.0] tspan = (0.0, 100.0) prob = ODEProblem(lorenz!, u0, tspan) sol = solve(prob, EPIRK5s3()) ``` -------------------------------- ### Install and Import MATLABDiffEq.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve Use this to install and load the MATLABDiffEq package. Requires a licensed MATLAB installation. ```julia import Pkg Pkg.add(url = "https://github.com/SciML/MATLABDiffEq.jl") import MATLABDiffEq ``` -------------------------------- ### Solve ODE with VCABM Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/AdamsBashforthMoulton Example demonstrating the setup and solution of a Lorenz system using the VCABM solver. ```julia using OrdinaryDiffEqAdamsBashforthMoulton function lorenz!(du, u, p, t) du[1] = 10.0 * (u[2] - u[1]) du[2] = u[1] * (28.0 - u[3]) - u[2] du[3] = u[1] * u[2] - (8 / 3) * u[3] end u0 = [1.0; 0.0; 0.0] tspan = (0.0, 100.0) prob = ODEProblem(lorenz!, u0, tspan) sol = solve(prob, VCABM()) ``` -------------------------------- ### Install Adams-Bashforth-Moulton Solvers Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/AdamsBashforthMoulton Use the Julia package manager to install the OrdinaryDiffEqAdamsBashforthMoulton library. ```julia using Pkg Pkg.add("OrdinaryDiffEqAdamsBashforthMoulton") ``` -------------------------------- ### Install OrdinaryDiffEqStabilizedIRK Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/imex/StabilizedIRK Use the Julia package manager to add the OrdinaryDiffEqStabilizedIRK library. ```julia using Pkg Pkg.add("OrdinaryDiffEqStabilizedIRK") ``` -------------------------------- ### Load and Solve Example SDE Problems Source: https://docs.sciml.ai/DiffEqDocs/stable/types/sde_types Demonstrates how to import the problem library and solve a linear SDE problem. ```julia #] add DiffEqProblemLibrary import DiffEqProblemLibrary.SDEProblemLibrary import StochasticDiffEq as SDE # load problems SDEProblemLibrary.importsdeproblems() prob = SDEProblemLibrary.prob_sde_linear sol = SDE.solve(prob) ``` -------------------------------- ### Install OrdinaryDiffEqSDIRK Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/implicit/SDIRK Use the Julia package manager to add the OrdinaryDiffEqSDIRK library. ```julia using Pkg Pkg.add("OrdinaryDiffEqSDIRK") ``` -------------------------------- ### Solve ODE with FBDF Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/massmatrixdae/BDF Example demonstrating the setup and solution of a Lorenz system using the FBDF solver. ```julia using OrdinaryDiffEqBDF function lorenz!(du, u, p, t) du[1] = 10.0 * (u[2] - u[1]) du[2] = u[1] * (28.0 - u[3]) - u[2] du[3] = u[1] * u[2] - (8 / 3) * u[3] end u0 = [1.0; 0.0; 0.0] tspan = (0.0, 100.0) prob = ODEProblem(lorenz!, u0, tspan) sol = solve(prob, FBDF()) ``` -------------------------------- ### Install OrdinaryDiffEqNordsieck package Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/implicit/Nordsieck Use the Julia package manager to add the library before accessing its solvers. ```julia using Pkg Pkg.add("OrdinaryDiffEqNordsieck") ``` -------------------------------- ### Install and Import TaylorIntegration.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve Install the package and import it to use adaptive order Taylor series methods. ```julia import Pkg Pkg.add("TaylorIntegration") import TaylorIntegration ``` -------------------------------- ### Install and Import SimpleDiffEq.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/api/simplediffeq Use the Julia package manager to add and import the SimpleDiffEq library. ```julia using Pkg Pkg.add("SimpleDiffEq") import SimpleDiffEq ``` -------------------------------- ### Install OrdinaryDiffEqPRK Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/PRK Use the Julia package manager to install the parallel Runge-Kutta solver library. ```julia using Pkg Pkg.add("OrdinaryDiffEqPRK") ``` -------------------------------- ### Install OrdinaryDiffEqQPRK Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/QPRK Use the Julia package manager to add the OrdinaryDiffEqQPRK library. ```julia using Pkg Pkg.add("OrdinaryDiffEqQPRK") ``` -------------------------------- ### Install OrdinaryDiffEq.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq Use the Julia package manager to add the OrdinaryDiffEq package to your environment. ```julia import Pkg; Pkg.add("OrdinaryDiffEq"); ``` -------------------------------- ### Install Feagin Solvers Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/Feagin Use the Julia package manager to add the OrdinaryDiffEqFeagin library. ```julia using Pkg Pkg.add("OrdinaryDiffEqFeagin") ``` -------------------------------- ### Install BoundaryValueDiffEq.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/api/boundaryvaluediffeq Use the Julia package manager to add and import the package for standalone use. ```julia using Pkg Pkg.add("BoundaryValueDiffEq") import BoundaryValueDiffEq ``` -------------------------------- ### Install OrdinaryDiffEqExtrapolation Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/Extrapolation Use the Julia package manager to add the extrapolation solver library to your environment. ```julia using Pkg Pkg.add("OrdinaryDiffEqExtrapolation") ``` -------------------------------- ### Configure ARKODE Tableau Source: https://docs.sciml.ai/DiffEqDocs/stable/api/sundials Examples of setting the stiffness and order for the ARKODE solver. ```julia ARKODE(Sundials.Explicit()) # Solve with explicit tableau of default order 4 ARKODE(Sundials.Implicit(), order = 3) # Solve with explicit tableau of order 3 ``` -------------------------------- ### Configure DAE Initialization Algorithms Source: https://docs.sciml.ai/DiffEqDocs/stable/features/dae_initialization Demonstrates how to set initialization algorithms for OrdinaryDiffEq and Sundials solvers to ensure consistent initial conditions. ```julia using OrdinaryDiffEqBDF # DFBDF # or using Sundials # IDA # Use Brown's algorithm to fix inconsistent conditions sol = solve(prob, DFBDF(), initializealg = BrownFullBasicInit()) # OrdinaryDiffEq sol = solve(prob, IDA(), initializealg = BrownFullBasicInit()) # Sundials # Use Shampine's collocation method for general DAEs sol = solve(prob, DFBDF(), initializealg = ShampineCollocationInit()) # OrdinaryDiffEq sol = solve(prob, IDA(), initializealg = ShampineCollocationInit()) # Sundials # RECOMMENDED: Verify conditions are consistent sol = solve(prob, DFBDF(), initializealg = CheckInit()) # OrdinaryDiffEq sol = solve(prob, IDA(), initializealg = CheckInit()) # Sundials # NOT RECOMMENDED: Skip all initialization checks (dangerous!) # sol = solve(prob, DFBDF(), initializealg = NoInit()) # ⚠️ USE AT YOUR OWN RISK # sol = solve(prob, IDA(), initializealg = NoInit()) # ⚠️ USE AT YOUR OWN RISK ``` -------------------------------- ### Initialize Simulation Domain Source: https://docs.sciml.ai/DiffEqDocs/stable/examples/beeler_reuter Sets up the initial transmembrane potential grid. ```julia const N = 192; u0 = fill(v0, (N, N)); u0[90:102, 90:102] .= v1; # a small square in the middle of the domain ``` -------------------------------- ### Install and Import deSolveDiffEq.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve Use this to install and load the deSolveDiffEq package for benchmarking or transitioning from R's deSolve. ```julia import Pkg Pkg.add(url = "https://github.com/SciML/deSolveDiffEq.jl") import deSolveDiffEq ``` -------------------------------- ### Use NoInit for DAE initialization Source: https://docs.sciml.ai/DiffEqDocs/stable/features/dae_initialization Example of using NoInit when initial conditions are already known to be consistent. ```julia prob = DAEProblem(f, du0_consistent, u0_consistent, tspan) sol = solve(prob, IDA(), initializealg = NoInit()) ``` -------------------------------- ### Install OrdinaryDiffEqSSPRK Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/SSPRK Use the Julia package manager to add the SSPRK solver library. ```julia using Pkg Pkg.add("OrdinaryDiffEqSSPRK") ``` -------------------------------- ### Install Low-Storage RK Solvers Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowStorageRK Use the Julia package manager to add the OrdinaryDiffEqLowStorageRK library. ```julia using Pkg Pkg.add("OrdinaryDiffEqLowStorageRK") ``` -------------------------------- ### Initialize RKO65 Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowOrderRK Tsitouras' Runge-Kutta-Oliver 6-stage 5th order method. ```julia RKO65(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!, step_limiter! = OrdinaryDiffEq.trivial_limiter!, thread = Serial()) ``` -------------------------------- ### Define ODE Problem Source: https://docs.sciml.ai/DiffEqDocs/stable/features/callback_functions Setup for a basic differential equation problem used in subsequent examples. ```julia import DifferentialEquations as DE u0 = [1.0, 0.0] function fun2(du, u, p, t) du[2] = -u[1] du[1] = u[2] end tspan = (0.0, 10.0) prob = DE.ODEProblem(fun2, u0, tspan) ``` -------------------------------- ### Install OrdinaryDiffEqTaylorSeries Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/TaylorSeries Use the Julia package manager to add the required library for Taylor series methods. ```julia using Pkg Pkg.add("OrdinaryDiffEqTaylorSeries") ``` -------------------------------- ### Loading and Solving Example DDE Problems Source: https://docs.sciml.ai/DiffEqDocs/stable/types/dde_types How to load a pre-defined problem from the DDEProblemLibrary and solve it. ```julia #] add DDEProblemLibrary using DDEProblemLibrary prob = DDEProblemLibrary.prob_dde_constant_1delay_ip sol = solve(prob) ``` -------------------------------- ### Define an ODE problem for intervention examples Source: https://docs.sciml.ai/DiffEqDocs/stable/features/callback_functions Setup a basic exponential decay ODE problem for testing callback interventions. ```julia import DifferentialEquations as DE import DiffEqCallbacks as CB # PresetTimeCallback is no longer reexported by DifferentialEquations v8 function f(du, u, p, t) du[1] = -u[1] end u0 = [10.0] const V = 1 prob = DE.ODEProblem(f, u0, (0.0, 10.0)) sol = DE.solve(prob, DE.Tsit5()) import Plots; Plots.plot(sol); ``` -------------------------------- ### Solve ODE with AN5 solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/implicit/Nordsieck Example demonstrating the setup of a Lorenz system and solving it using the AN5 Nordsieck method. ```julia using OrdinaryDiffEqNordsieck function lorenz!(du, u, p, t) du[1] = 10.0 * (u[2] - u[1]) du[2] = u[1] * (28.0 - u[3]) - u[2] du[3] = u[1] * u[2] - (8 / 3) * u[3] end u0 = [1.0; 0.0; 0.0] tspan = (0.0, 100.0) prob = ODEProblem(lorenz!, u0, tspan) sol = solve(prob, AN5()) ``` -------------------------------- ### Display Tutorial Footer Source: https://docs.sciml.ai/DiffEqDocs/stable/examples/beeler_reuter Renders the standard footer for SciML tutorials using the current folder and file context. ```julia import SciMLTutorials SciMLTutorials.tutorial_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` -------------------------------- ### Execute ODE Problem and Visualize Source: https://docs.sciml.ai/DiffEqDocs/stable/examples/beeler_reuter Setup and execution of the ODE problem using the GPU-accelerated solver, followed by visualization. ```Julia import DifferentialEquations as DE, Sundials deriv_gpu = BeelerReuterGpu(u0, 1.0); prob = DE.ODEProblem(deriv_gpu, u0, (0.0, 50.0)); @time sol = DE.solve(prob, Sundials.CVODE_BDF(linear_solver = :GMRES), saveat = 100.0); ``` ```Julia Plots.heatmap(sol.u[end]) ``` -------------------------------- ### Initialize IController Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/api/controllers Constructs the standard integral step size controller. ```julia IController() ``` -------------------------------- ### Use OverrideInit with ModelingToolkit Source: https://docs.sciml.ai/DiffEqDocs/stable/features/dae_initialization Example showing automatic usage of OverrideInit with a simplified ModelingToolkit system. ```julia # Typically used automatically with ModelingToolkit @named sys = ODESystem(eqs, t, vars, params) sys = structural_simplify(sys) prob = DAEProblem(sys, [], (0.0, 1.0), []) # Will automatically use OverrideInit if initialization_data exists sol = solve(prob, IDA()) ``` -------------------------------- ### Example PI Controller Implementation for SDEs Source: https://docs.sciml.ai/DiffEqDocs/stable/extras/timestepping A concrete implementation of a PI controller for SDEs using the AbstractController interface. ```julia struct CustomController <: StochasticDiffEq.AbstractController end function StochasticDiffEq.stepsize_controller!(integrator::StochasticDiffEq.SDEIntegrator, controller::CustomController, alg) integrator.q11 = DiffEqBase.value(FastPower.fastpower( integrator.EEst, controller.beta1)) integrator.q = DiffEqBase.value(integrator.q11 / FastPower.fastpower(integrator.qold, controller.beta2)) integrator.q = DiffEqBase.value(max(inv(integrator.opts.qmax), min(inv(integrator.opts.qmin), integrator.q / integrator.opts.gamma))) nothing end function StochasticDiffEq.step_accept_controller!( integrator::StochasticDiffEq.SDEIntegrator, controller::CustomController, alg) integrator.dtnew = DiffEqBase.value(integrator.dt / integrator.q) * oneunit(integrator.dt) nothing end function step_reject_controller!(integrator::StochasticDiffEq.SDEIntegrator, controller::CustomController, alg) integrator.dtnew = integrator.dt / min(inv(integrator.opts.qmin), integrator.q11 / integrator.opts.gamma) end ``` -------------------------------- ### Solve Steady State Problems Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/steady_state_solve Demonstrates basic usage of SSRootfind and DynamicSS algorithms for finding steady states. ```julia import SteadyStateDiffEq as SS, DifferentialEquations as DE import Sundials sol = SS.solve(prob, SS.SSRootfind()) sol = SS.solve(prob, SS.DynamicSS(DE.Tsit5())) sol = SS.solve(prob, SS.DynamicSS(Sundials.CVODE_BDF()), dt = 1.0) ``` -------------------------------- ### Install diffeqr for R Source: https://docs.sciml.ai/DiffEqDocs/stable Install the package from CRAN or the development version from GitHub. ```r install.packages("diffeqr") ``` ```r devtools::install_github('SciML/diffeqr', build_vignettes=T) ``` -------------------------------- ### Initialize PIController Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/api/controllers Constructs a proportional-integral step size controller with specified beta coefficients. ```julia PIController(beta1, beta2) ``` -------------------------------- ### CVODE_Adams Usage Examples Source: https://docs.sciml.ai/DiffEqDocs/stable/api/sundials Common configurations for the CVODE_Adams solver using different methods and linear solvers. ```julia CVODE_Adams() # Adams method using Newton + Dense solver CVODE_Adams(method=:Functional) # Adams method using Functional iterations CVODE_Adams(linear_solver=:Band,jac_upper=3,jac_lower=3) # Banded solver with nonzero diagonals 3 up and 3 down CVODE_Adams(linear_solver=:BCG) # Biconjugate gradient method ``` -------------------------------- ### Solve an ODE with Rodas5P Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/massmatrixdae/Rosenbrock Demonstrates the basic setup and execution of an ODE problem using the Rodas5P solver. ```julia using OrdinaryDiffEqRosenbrock function lorenz!(du, u, p, t) du[1] = 10.0 * (u[2] - u[1]) du[2] = u[1] * (28.0 - u[3]) - u[2] du[3] = u[1] * u[2] - (8 / 3) * u[3] end u0 = [1.0; 0.0; 0.0] tspan = (0.0, 100.0) prob = ODEProblem(lorenz!, u0, tspan) sol = solve(prob, Rodas5P()) ``` -------------------------------- ### Initialize DP5 Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowOrderRK Dormand-Prince 5/4 Runge-Kutta method with a free 4th order interpolant. ```julia DP5(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!, step_limiter! = OrdinaryDiffEq.trivial_limiter!, thread = Serial()) ``` -------------------------------- ### Install DASSL.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/api/dassl Use the Julia package manager to install and import the DASSL package. ```julia using Pkg Pkg.add("DASSL") import DASSL ``` -------------------------------- ### Load DelayDiffEq and Initialize Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/dde_solve Required package loading for DDE functionality and initialization of the MethodOfSteps algorithm. ```julia using DelayDiffEq # MethodOfSteps, DDEProblem # plus the OrdinaryDiffEq sublib(s) for the inner ODE algorithm, e.g. using OrdinaryDiffEqTsit5: Tsit5 alg = MethodOfSteps(Tsit5()) ``` -------------------------------- ### Load solution with BSON.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/features/io Demonstrates the syntax for loading a BSON file, noting current library limitations. ```julia # New session import OrdinaryDiffEq as ODE import BSON # BSON.load("test.bson") # currently broken: https://github.com/JuliaIO/BSON.jl/issues/109 ``` -------------------------------- ### Initialize CKLLSRK43_2 Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowStorageRK Constructor for the 20-stage, fifth-order low-storage scheme. ```julia CKLLSRK43_2(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!, step_limiter! = OrdinaryDiffEq.trivial_limiter!, thread = Serial()) ``` -------------------------------- ### Define DAE Jacobian Function Source: https://docs.sciml.ai/DiffEqDocs/stable/types/dae_types Example of defining the Jacobian for the DAE residual function provided in the previous example. ```julia function testjac(J,du,u,p,gamma,t) J[1,1] = gamma - 2.0 + 1.2 * u[2] J[1,2] = 1.2 * u[1] J[2,1] = - 1 * u[2] J[2,2] = gamma - 3 - u[1] nothing end ``` -------------------------------- ### Lorenz System Plotting Example Source: https://docs.sciml.ai/DiffEqDocs/stable/basics/plot A comprehensive example demonstrating multi-plot layouts and variable selection for a Lorenz system. ```julia import DifferentialEquations as DE, Plots function lorenz(du, u, p, t) du[1] = p[1] * (u[2] - u[1]) du[2] = u[1] * (p[2] - u[3]) - u[2] du[3] = u[1] * u[2] - p[3] * u[3] end u0 = [1.0, 5.0, 10.0] tspan = (0.0, 100.0) p = (10.0, 28.0, 8 / 3) prob = DE.ODEProblem(lorenz, u0, tspan, p) sol = DE.solve(prob) xyzt = Plots.plot(sol, plotdensity = 10000, lw = 1.5) xy = Plots.plot(sol, plotdensity = 10000, idxs = (1, 2)) xz = Plots.plot(sol, plotdensity = 10000, idxs = (1, 3)) yz = Plots.plot(sol, plotdensity = 10000, idxs = (2, 3)) xyz = Plots.plot(sol, plotdensity = 10000, idxs = (1, 2, 3)) Plots.plot(Plots.plot(xyzt, xyz), Plots.plot(xy, xz, yz, layout = (1, 3), w = 1), layout = ( 2, 1)) ``` -------------------------------- ### Initialize OwrenZen3 Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowOrderRK Constructor for the Owren-Zennaro optimized interpolation 3/2 method. ```julia OwrenZen3(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!, step_limiter! = OrdinaryDiffEq.trivial_limiter!, thread = Serial()) ``` -------------------------------- ### Get Derivative Source: https://docs.sciml.ai/DiffEqDocs/stable/basics/integrator Retrieves the current derivative at time t. ```julia get_du(i::DEIntegrator) ``` ```julia get_du!(out,i::DEIntegrator) ``` -------------------------------- ### Initialize PSRK3p6q5 Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowOrderRK Constructor for the PSRK3p6q5 pseudo-symplectic method. ```julia PSRK3p6q5(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!, step_limiter! = OrdinaryDiffEq.trivial_limiter!, thread = Serial()) ``` -------------------------------- ### Initialize OwrenZen5 Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowOrderRK Constructor for the Owren-Zennaro optimized interpolation 5/4 method. ```julia OwrenZen5(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!, step_limiter! = OrdinaryDiffEq.trivial_limiter!, thread = Serial()) ``` -------------------------------- ### Install OrdinaryDiffEqRosenbrock Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/massmatrixdae/Rosenbrock Adds the OrdinaryDiffEqRosenbrock package to the current Julia environment. ```julia using Pkg Pkg.add("OrdinaryDiffEqRosenbrock") ``` -------------------------------- ### Initialize Solution and Boundary Conditions Source: https://docs.sciml.ai/DiffEqDocs/stable/examples/diffusion_implicit_heat_equation Initializes the temperature vector and sets the top boundary condition. ```julia T = zeros(FT, n + 1); T .= 1; T[n + 1] = T_top; # set top BC ``` ```julia 1 ``` -------------------------------- ### Define an output_func Source: https://docs.sciml.ai/DiffEqDocs/stable/features/ensemble Example of an output_func that extracts specific data from the solution. ```julia output_func(sol, ctx) = (sol[end, 2], false) ``` -------------------------------- ### Iterate Integrator Source: https://docs.sciml.ai/DiffEqDocs/stable/basics/integrator Examples of using the integrator as an iterator to process steps. ```julia for i in take(integrator, n) end ``` ```julia for i in integrator end ``` ```julia for i in integrator u, t = integrator.u, integrator.t @show u, t end ``` ```julia for i in integrator uprev, tprev = integrator.uprev, integrator.tprev u, t = integrator.u, integrator.t @show tprev, t end ``` -------------------------------- ### Install OrdinaryDiffEqLinear Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/semilinear/Linear Use the Julia package manager to add the OrdinaryDiffEqLinear package. ```julia using Pkg Pkg.add("OrdinaryDiffEqLinear") ``` -------------------------------- ### Install AMF and Rosenbrock packages Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/semiimplicit/AMF Add the necessary packages to your Julia environment. ```julia using Pkg Pkg.add(["OrdinaryDiffEqAMF", "OrdinaryDiffEqRosenbrock"]) ``` -------------------------------- ### Define DAE Residual Function Source: https://docs.sciml.ai/DiffEqDocs/stable/types/dae_types Example of a residual function for a DAE system. ```julia function testjac(res,du,u,p,t) res[1] = du[1] - 2.0 * u[1] + 1.2 * u[1]*u[2] res[2] = du[2] -3 * u[2] - u[1]*u[2] end ``` -------------------------------- ### Get proposed timestep Source: https://docs.sciml.ai/DiffEqDocs/stable/basics/integrator Retrieves the proposed dt for the next integration step. ```julia get_proposed_dt(i::DEIntegrator) ``` -------------------------------- ### Initialize Alshina2 Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowOrderRK Constructor for the 2nd order, 2-stage Alshina2 method with optimal parameters. ```julia Alshina2(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!, step_limiter! = OrdinaryDiffEq.trivial_limiter!, thread = Serial()) ``` -------------------------------- ### Basic Plotting with Plots.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/basics/plot Install and import Plots.jl to generate plots from solution objects. ```julia #]add Plots # You need to install Plots.jl before your first time using it! import Plots Plots.plot(sol) # Plots the solution ``` -------------------------------- ### Initialize PSRK3p5q4 Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowOrderRK Constructor for the 4-stage pseudo-symplectic PSRK3p5q4 method. ```julia PSRK3p5q4(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!, step_limiter! = OrdinaryDiffEq.trivial_limiter!, thread = Serial()) ``` -------------------------------- ### Initialize Alshina3 Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowOrderRK Constructor for the 3rd order, 3-stage Alshina3 method with optimal parameters. ```julia Alshina3(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!, step_limiter! = OrdinaryDiffEq.trivial_limiter!, thread = Serial()) ``` -------------------------------- ### Install SymplecticRK package Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/dynamicalodeexplicit/SymplecticRK Use the Julia package manager to add the OrdinaryDiffEqSymplecticRK library. ```julia using Pkg Pkg.add("OrdinaryDiffEqSymplecticRK") ``` -------------------------------- ### Check DAE Consistency Source: https://docs.sciml.ai/DiffEqDocs/stable/features/dae_initialization Recommended approach for verifying user-provided consistent initial conditions using CheckInit. ```julia # If you've computed consistent conditions yourself u0_consistent = [1.0, 0.0, 0.0] du0_consistent = [0.0, -1.0, compute_tension(u0_consistent, p)] prob2 = DAEProblem(pendulum!, du0_consistent, u0_consistent, tspan, p, differential_vars = [true, true, false]) # RECOMMENDED: Verify they're consistent with CheckInit sol = solve(prob2, DFBDF(), initializealg = CheckInit()) # NOT RECOMMENDED: NoInit skips all checks - use at your own risk! # sol = solve(prob2, DFBDF(), initializealg = NoInit()) # ⚠️ DANGEROUS ``` -------------------------------- ### Initialize ddeabm solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/odeinterfacediffeq Adams-Bashforth-Moulton predictor-corrector method suitable for smooth non-stiff problems. ```julia ddeabm() ``` -------------------------------- ### Configure Implicit Extrapolation Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve Example of overriding default parameters for the ImplicitDeuflhardExtrapolation algorithm. ```julia alg = ImplicitDeuflhardExtrapolation(max_order = 7, min_order = 4, init_order = 4, sequence = :bulirsch) solve(prob, alg) ``` -------------------------------- ### Initialize OwrenZen4 Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowOrderRK Constructor for the Owren-Zennaro optimized interpolation 4/3 method. ```julia OwrenZen4(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!, step_limiter! = OrdinaryDiffEq.trivial_limiter!, thread = Serial()) ``` -------------------------------- ### Solve ODE with DP8 Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/HighOrderRK Example of solving the Lorenz system using the DP8 solver. ```julia using OrdinaryDiffEqHighOrderRK function lorenz!(du, u, p, t) du[1] = 10.0 * (u[2] - u[1]) du[2] = u[1] * (28.0 - u[3]) - u[2] du[3] = u[1] * u[2] - (8 / 3) * u[3] end u0 = [1.0; 0.0; 0.0] tspan = (0.0, 100.0) prob = ODEProblem(lorenz!, u0, tspan) sol = solve(prob, DP8()) ``` -------------------------------- ### Initialize SBDF2 and SBDF3 Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/imex/IMEXBDF Convenience functions for initializing two-step and three-step IMEX multistep methods. ```julia SBDF2(;kwargs...) ``` ```julia SBDF3(;kwargs...) ``` -------------------------------- ### Initialize Stepanov5 Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowOrderRK Constructor for the 5-stage Pseudo-Symplectic Stepanov5 method. ```julia Stepanov5(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!, step_limiter! = OrdinaryDiffEq.trivial_limiter!, thread = Serial()) ``` -------------------------------- ### Get Error Estimate Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/api/controllers Retrieves the scalar error estimate from the controller cache or integrator. ```julia get_EEst(controller_cache) get_EEst(integrator) ``` -------------------------------- ### Implement Algebraic Multigrid Preconditioner Source: https://docs.sciml.ai/DiffEqDocs/stable/tutorials/advanced_ode_example Setup and solve using AlgebraicMultigrid as a preconditioner for Sundials. ```julia prectmp2 = AlgebraicMultigrid.aspreconditioner(AlgebraicMultigrid.ruge_stuben(W, presmoother = AlgebraicMultigrid.Jacobi(rand(size(W, 1))), postsmoother = AlgebraicMultigrid.Jacobi(rand(size(W, 1))))) const preccache2 = Ref(prectmp2) function psetupamg(p, t, u, du, jok, jcurPtr, gamma) if jok prob_ode_brusselator_2d_mtk.f.jac(jaccache, u, p, t) jcurPtr[] = true # W = I - gamma*J @. W = -gamma * jaccache idxs = LinearAlgebra.diagind(W) @. @view(W[idxs]) = @view(W[idxs]) + 1 # Build preconditioner on W preccache2[] = AlgebraicMultigrid.aspreconditioner(AlgebraicMultigrid.ruge_stuben( W, presmoother = AlgebraicMultigrid.Jacobi(rand(size(W, 1))), postsmoother = AlgebraicMultigrid.Jacobi(rand(size(W, 1))))) end end function precamg(z, r, p, t, y, fy, gamma, delta, lr) ldiv!(z, preccache2[], r) end BT.@btime DE.solve(prob_ode_brusselator_2d_sparse, Sundials.CVODE_BDF(; linear_solver = :GMRES, prec = precamg, psetup = psetupamg, prec_side = 1); save_everystep = false); ``` -------------------------------- ### Initialize Heun Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowOrderRK Second-order Heun's method with support for stage and step limiters. ```julia Heun(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!, step_limiter! = OrdinaryDiffEq.trivial_limiter!, thread = Serial()) ``` -------------------------------- ### Initialize QNDF2 Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/implicit/BDF Constructor for the QNDF2 adaptive order 2 quasi-constant timestep L-stable numerical differentiation method. ```julia QNDF2(; autodiff = AutoForwardDiff(), concrete_jac = nothing, linsolve = nothing, nlsolve = NLNewton(), extrapolant = :linear, kappa = -1 // 9, step_limiter! = trivial_limiter!) ``` -------------------------------- ### Install and Import DASKR.jl Source: https://docs.sciml.ai/DiffEqDocs/stable/api/daskr Required steps to add and load the DASKR package into the Julia environment. ```julia using Pkg Pkg.add("DASKR") import DASKR ``` -------------------------------- ### Initialize PSRK4p7q6 Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowOrderRK Constructor for the 6-stage pseudo-symplectic PSRK4p7q6 method. ```julia PSRK4p7q6(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!, step_limiter! = OrdinaryDiffEq.trivial_limiter!, thread = Serial()) ``` -------------------------------- ### Initialize BDFController Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/api/controllers Constructs a step-size controller for variable-order BDF families like QNDF, FBDF, and DFBDF. ```julia BDFController(; qmin, qmax, qsteady_min, qsteady_max, gamma, qmax_first_step, failfactor) ``` -------------------------------- ### Solve ODE with BS3 Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/LowOrderRK Example of defining a Lorenz system and solving it using the BS3 solver. ```julia using OrdinaryDiffEqLowOrderRK function lorenz!(du, u, p, t) du[1] = 10.0 * (u[2] - u[1]) du[2] = u[1] * (28.0 - u[3]) - u[2] du[3] = u[1] * u[2] - (8 / 3) * u[3] end u0 = [1.0; 0.0; 0.0] tspan = (0.0, 100.0) prob = ODEProblem(lorenz!, u0, tspan) sol = solve(prob, BS3()) ``` -------------------------------- ### Initialize FBDF Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/implicit/BDF Configuration for the FBDF solver, providing various parameters for stability and order control. ```julia FBDF(; autodiff = AutoForwardDiff(), concrete_jac = nothing, linsolve = nothing, κ = nothing, tol = nothing, nlsolve = NLNewton(), extrapolant = :linear, step_limiter! = trivial_limiter!, max_order::Val{MO} = Val{5}(), stald = true, stald_rrcut = 0.98, stald_vrrtol = 1e-4, stald_vrrt2 = 5e-4, stald_sqtol = 1e-3, stald_rrtol = 1e-2, stald_tiny = 1e-90) ``` -------------------------------- ### Solve ODE with QNDF Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/implicit/BDF Example of defining a Lorenz system and solving it using the QNDF solver. ```julia using OrdinaryDiffEqBDF function lorenz!(du, u, p, t) du[1] = 10.0 * (u[2] - u[1]) du[2] = u[1] * (28.0 - u[3]) - u[2] du[3] = u[1] * u[2] - (8 / 3) * u[3] end u0 = [1.0; 0.0; 0.0] tspan = (0.0, 100.0) prob = ODEProblem(lorenz!, u0, tspan) sol = solve(prob, QNDF()) ``` -------------------------------- ### Initialize SSPRKMSVS43 Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/explicit/SSPRK Constructor for the third-order, four-step explicit SSP linear multistep method. ```julia SSPRKMSVS43(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!, step_limiter! = OrdinaryDiffEq.trivial_limiter!, thread = Serial()) ``` -------------------------------- ### Initialize odex Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/odeinterfacediffeq Initializes the Gragg-Bulirsch-Stoer extrapolation algorithm for smooth non-stiff problems. ```julia odex() ``` -------------------------------- ### Solve ODE with ImplicitEulerBarycentricExtrapolation Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/implicit/Extrapolation Example of defining a Lorenz system and solving it using the ImplicitEulerBarycentricExtrapolation solver. ```julia using OrdinaryDiffEqExtrapolation function lorenz!(du, u, p, t) du[1] = 10.0 * (u[2] - u[1]) du[2] = u[1] * (28.0 - u[3]) - u[2] du[3] = u[1] * u[2] - (8 / 3) * u[3] end u0 = [1.0; 0.0; 0.0] tspan = (0.0, 100.0) prob = ODEProblem(lorenz!, u0, tspan) sol = solve(prob, ImplicitEulerBarycentricExtrapolation()) ``` -------------------------------- ### Initialize CorrelatedWienerProcess Source: https://docs.sciml.ai/DiffEqDocs/stable/tutorials/sde_example Create a CorrelatedWienerProcess starting at zero for the specified time span and correlation matrix. ```julia tspan = (0.0, 1.0) heston_noise = SDE.CorrelatedWienerProcess!(Γ, tspan[1], zeros(2), zeros(2)) ``` -------------------------------- ### Initialize RKL2 Solver Source: https://docs.sciml.ai/DiffEqDocs/stable/api/ordinarydiffeq/semiimplicit/StabilizedRK Initializes the second-order super-time-stepping method based on shifted Legendre polynomials. ```julia RKL2(; min_stages = 3, max_stages = 200, eigen_est = nothing) ``` -------------------------------- ### Basic Solver Configuration Source: https://docs.sciml.ai/DiffEqDocs/stable/basics/common_solver_opts Uses a user-specified algorithm with default integration parameters. ```julia solve(prob, AlgorithmName()) ```