Skip to content

Different solutions for in-place and not in-place functions with Vern7 #86

@devmotion

Description

@devmotion

During testing of PR SciML/DelayDiffEq.jl#17 I discovered that Vern7 produces slightly different results for in-place and not in-place functions already for ODEs:

julia> using OrdinaryDiffEq, DiffEqProblemLibrary

julia> prob_inplace = ODEProblem(DiffEqProblemLibrary.f_2dlinear, [0.5, 1.0], (0., 10.))

julia> prob_notinplace = ODEProblem(DiffEqProblemLibrary.f_2dlinear_notinplace, [0.5, 1.0], (0., 10.))

julia> sol_inplace = solve(prob_inplace, Vern7())

julia> sol_notinplace = solve(prob_notinplace, Vern7())

julia> sol_inplace.t == sol_notinplace.t
false

julia> sol_inplace.t[3]
0.6807461486962336

julia> sol_notinplace.t[3]
0.6807461622279954

julia> sol_inplace.errors[:l2]
0.006139913326522092

julia> sol_notinplace.errors[:l2]
0.006139913425004702

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