Skip to content

TestSolution is dense even if the solution itself is not #3284

@ChrisRackauckas-Claude

Description

@ChrisRackauckas-Claude

Migrated from SciML/DiffEqDevTools.jl#96 (reported by @nathanaelbosch).

TestSolution always reports dense=true even when constructed from a non-dense solution:

using OrdinaryDiffEq, DiffEqDevTools
import ODEProblemLibrary: prob_ode_linear
prob = prob_ode_linear

solve(prob, Tsit5(), dense=false).dense          # false ✓
TestSolution(solve(prob, Tsit5(), dense=false)).dense  # true ✗

The TestSolution constructor unconditionally sets dense=true based on the presence of t and u fields, rather than checking the source solution's dense flag.

Verified still present as of 2026-03-30.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions