Closed JianghuiDu closed 5 years ago
what options?
opt_radau=OptionsODE(
OPT_RTOL => rtol,
OPT_ATOL => atol,
OPT_INITIALSS => 1e-3,
OPT_JACRECOMPFACTOR => 0.1,
OPT_FREEZESSLEFT => 1.0,
OPT_FREEZESSRIGHT => 1.2,
OPT_SSMINSEL => 0.1,
OPT_SSMAXSEL => 10.0,
OPT_JACOBIMATRIX => reactran_steady_jac_int,
OPT_JACOBIBANDSTRUCT => (bandwth,bandwth),
OPT_RHS_CALLMODE => RHS_CALL_INSITU,
OPT_LOGLEVEL => LOG_NOTHING,
OPT_OUTPUTMODE => OUTPUTFCN_NEVER
)
I see that options like RTOL
and the output are inherited by solve
, what about the other ones?
Most of it is handled automatically to match the common solve interface. Tolerances, inital step size, qmin/qmax, declaring Jacobians, log functions, call mode, and output mode are all handled. I guess we miss a few that can be added as solver specific.
Are the jacobian bandwidths inferred if specifying jac_prototype
?
ahh, we missed banded Jacobians here. That would be worth adding for sure.
That would be great. I think ODEInterface
has its own BandedMatrix
type, not sure how it compares to BandedMatrices
. I find out that ddebdf
is a contender of CVODE_BDF
. It's surprisingly fast. Also it is interesting that using the DifferentialEquations
interface reduces allocations a lot when compared to the original ODEInterface
interface.
Interesting. Can you share that problem where it's fast? All of the cases in DiffEqBenchmarks.jl shows it's slow, so I'm curious what properties of the ODE allowed it to work well.
One small glitch should be resolved quite easily. ODEInterface
requires the rtol
and atol
be the same length. So I can't use a scalar for one and a vector for the other like I do in DifferentialEquations
.
It's in my private repo and I've added you as collaborator. The relevant file is https://github.com/JianghuiDu/diagenetic-model/blob/master/testing.ode.jl
. It's large system (3000) reaction transport model.
Try https://github.com/JuliaDiffEq/ODEInterfaceDiffEq.jl/pull/22 . dde_bdf(jac_lower=bandwidth,jac_upper=bandwidth)
. It's interesting that's doing well since every test that we have shows CVODE_BDF as faster than it, so by now I've almost given up on it.
That model looks pretty nice. Would you mind submitting it to DiffEqBenchmarks after it's done and published? It would be a good one to keep testing and improving against.
Yes. I'll submit it for benchmark after I'm done. It'd be good to have a large system among the examples.
I can't figure out how the solver specific options in
ODEInterface
are passed tosolve
. Can you give an example?