Skip to content

Conversation

@JoshuaLampert
Copy link
Contributor

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Makes it possible to initialize an ArrayPartition with undefs if it only consists of one partition. This came up in NumericalMathematics/DispersiveShallowWater.jl#207 (comment). A more minimal example extracted from that PR is:

using LinearAlgebra, SparseArrays
using OrdinaryDiffEqSDIRK
using SciMLOperators
using RecursiveArrayTools

function rhs_explicit!(du, u, p, t)
    du .= u
end

n = 2
op = MatrixOperator(1.0 * sparse(I, n, n))
func = SplitFunction(op, rhs_explicit!)
u0 = ones(n)
u0 = ArrayPartition(u0)
prob = SplitODEProblem{true}(func, u0, (0.0, 1.0))
sol = solve(prob, KenCarp4(), saveat = 0.1)

Note that this MWE still fails at a later stage, but I guess this is something that would need to be fixed in LinearSolve.jl.

@ChrisRackauckas ChrisRackauckas merged commit 52e98c9 into SciML:master Jan 2, 2026
21 of 28 checks passed
@JoshuaLampert JoshuaLampert deleted the patch1 branch January 2, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants