Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Padding the initial condition fails #7

Description

@ChrisRackauckas
ode_prob = ODEProblem((t,u)->u''+(c+1)*u',u0,(0.,1.))
prob = ApproxFunProblem(ode_prob)
@time sol=solve(prob,Tsit5())

is fine, but

ode_prob = ODEProblem((t,u)->u''+(c+1)*u',u0,(0.,1.))
prob = ApproxFunProblem(ode_prob,40)
@time sol=solve(prob,Tsit5())

fails. Notice that

function ApproxFunProblem(prob;n = ncoefficients(prob.u0))
  sp = space(prob.u0)
  _prob = ODEProblem((t,u)->pad!(prob.f(t,Fun(sp,u)).coefficients,n),pad!(prob.u0.coefficients,n),prob.tspan)
  return ApproxFunProblem(_prob,sp)
end

this is just padding u0, so I'm not sure why this would make such a huge difference if it's increased.

@dlfivefifty ?

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