Miscellaneous Solvers

These are solvers that do not fall clearly into any of the major categories.

OrdinaryDiffEqFunctionMap.FunctionMapType
FunctionMap(; scale_by_time = false, step_limiter = trivial_limiter!)

Fixed-step algorithm for discrete dynamical systems. By default, each step applies the problem function directly, $u_{n + 1} = f(u_n, p, t_n)$. With scale_by_time = true, it instead applies an explicit-Euler update, $u_{n + 1} = u_n + dt * f(u_n, p, t_n)$.

FunctionMap is non-adaptive. Supply dt when using scale_by_time = true with an ODE problem.

Fields

  • step_limiter!: function applied after each completed step. It receives the ordinary DifferentialEquations limiter arguments and can enforce problem-specific constraints.

Keywords

  • scale_by_time = false: choose the direct map update. Set to true for the explicit-Euler update.
  • step_limiter = trivial_limiter!: post-step limiter. The legacy step_limiter! keyword is also accepted for compatibility; prefer step_limiter in new code.

Throws

  • ArgumentError: unsupported keyword arguments are supplied.

Examples

using OrdinaryDiffEqFunctionMap
using SciMLBase: DiscreteProblem, solve

prob = DiscreteProblem((u, p, t) -> 0.5u, 1.0, (0.0, 3.0))
sol = solve(prob, FunctionMap())
source
OrdinaryDiffEqExplicitRK.ExplicitRKType
ExplicitRK(; tableau = ODE_DEFAULT_TABLEAU)

A generic explicit Runge-Kutta method that allows you to define a custom tableau. The default tableau is Dormand-Prince 4/5. This solver is primarily for research purposes or when you need a specific tableau not already implemented.

Parameters

  • tableau: A DiffEqBase.ExplicitRKTableau object defining the Runge-Kutta tableau.

For most applications, prefer the named methods like DP5(), Tsit5(), etc.

source

Internal Interpolation Utilities

OrdinaryDiffEqExplicitRK.generic_rk_interpolantFunction
generic_rk_interpolant(Θ, dt, y₀, k, B_interp; idxs = nothing, order = 0)

Evaluate the dense-output polynomial for an explicit Runge-Kutta method. B_interp contains one coefficient row per stage and Θ is the normalized time within the step.

Arguments

  • Θ: Normalized position in the step.
  • dt: Step size.
  • y₀: State at the beginning of the step.
  • k: Stage derivatives.
  • B_interp: Dense-output coefficient matrix.
  • bi: Precomputed interpolation data associated with the tableau.

Keywords

  • idxs: Optional component or index selection applied to y₀ and k.
  • order: Derivative order to evaluate. 0 returns the interpolated state.

Returns

The interpolated state, or the requested derivative, at Θ.

Examples

using OrdinaryDiffEqExplicitRK

# Solver internals call this with a method tableau and stage derivatives.
generic_rk_interpolant(0.5, 0.1, y₀, k, B_interp, bi)
source