Skip to content
Snippets Groups Projects
Commit 4ad839f2 authored by Brian Groenke's avatar Brian Groenke
Browse files

Fix compat issues with CryoGridProblem and sundials

parent cfdbe015
No related branches found
No related tags found
1 merge request!60Fix compat issues with CryoGridProblem and sundials
......@@ -9,6 +9,8 @@ Specialized problem type for CryoGrid `ODEProblem`s.
"""
struct CryoGridODEProblem end
Strat.Tile(integrator::SciMLBase.DEIntegrator) = integrator.sol.prob.f.f
"""
CryoGridProblem(setup::Tile, tspan::NTuple{2,Float64}, p=nothing;kwargs...)
......@@ -31,7 +33,7 @@ function CryoGridProblem(
expandtstep(tstep::Number) = tspan[1]:tstep:tspan[end]
expandtstep(tstep::AbstractVector) = tstep
getsavestate(model::Tile, u, du) = deepcopy(Strat.getvars(model.state, u, du, savevars...))
savefunc(u, t, integrator) = getsavestate(integrator.f.f, Strat.withaxes(u, integrator.f.f), get_du(integrator))
savefunc(u, t, integrator) = getsavestate(Tile(integrator), Strat.withaxes(u, Tile(integrator)), get_du(integrator))
pmodel = Model(tile)
p = isnothing(p) ? dustrip.(collect(pmodel[:val])) : p
du0 = zero(u0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment