OrdinaryDiffEqOperatorSplitting.jl
Toolbox to handle and solve split formulations of a wide variety of ODE and DAE problems.
Install / Use
/learn @SciML/OrdinaryDiffEqOperatorSplitting.jlREADME
OrdinaryDiffEqOperatorSplitting.jl
OrdinaryDiffEqOperatorSplitting.jl is a component package in the DifferentialEquations ecosystem. It holds operator splitting solvers and utilities.
Installation
Assuming that you already have Julia correctly installed, it suffices to import OrdinaryDiffEqOperatorSplitting.jl in the standard way:
import Pkg;
Pkg.add("OrdinaryDiffEqOperatorSplitting");
API
OrdinaryDiffEqOperatorSplitting.jl is part of the SciML common interface. The only requirement is that the user passes an algorithm
compatible to the corresponding function to solve. For example, we can solve a simple split problem using the Euler() algorithm
for each subproblem with the LieTrotterGodunov algorithm, by defining a problem tree and an analogue solver tree via tuples:
using OrdinaryDiffEqLowOrderRK, OrdinaryDiffEqOperatorSplitting
# This is the true, full ODE.
function ode_true(du, u, p, t)
du .-= 0.1u
du[1] -= 0.01u[3]
du[3] -= 0.01u[1]
end
# This is the first operator of the ODE.
function ode1(du, u, p, t)
@. du = -0.1u
end
f1 = ODEFunction(ode1)
f1dofs = [1, 2, 3]
# This is the second operator of the ODE.
function ode2(du, u, p, t)
du[1] = -0.01u[2]
du[2] = -0.01u[1]
end
f2 = ODEFunction(ode2)
f2dofs = [1, 3]
# This defines the split of the ODE.
f = GenericSplitFunction((f1, f2), (f1dofs, f2dofs))
# Next we can define the split problem.
u0 = [-1.0, 1.0, 0.0]
tspan = (0.0, 1.0)
prob = OperatorSplittingProblem(f, u0, tspan)
# And the time integration algorithm.
alg = LieTrotterGodunov(
(Euler(), Euler())
)
# Right now OrdinaryDiffEqOperatorSplitting.jl does not implement the SciML solution interface,
# but we can obtain intermediate solutions via the iterator interface.
integrator = init(prob, alg, dt = 0.1)
for (u, t) in TimeChoiceIterator(integrator, 0.0:0.5:1.0)
@show t, u
end
Available Solvers
For the list of available solvers, please refer to the OrdinaryDiffEqOperatorSplitting.jl Solvers pages.
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
