From 53c4a694cf1ac9e918f9f9ca03e9079480ebd527 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas Date: Wed, 3 May 2017 08:40:50 -0700 Subject: [PATCH] try inner constructor --- src/integrators/type.jl | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/integrators/type.jl b/src/integrators/type.jl index 570fb859f9..fed2ec8832 100644 --- a/src/integrators/type.jl +++ b/src/integrators/type.jl @@ -72,16 +72,36 @@ type ODEIntegrator{algType<:OrdinaryDiffEqAlgorithm,uType,tType,tTypeNoUnits,tdi fsalfirst::rateType fsallast::rateType - ODEIntegrator(sol,u,k,t,dt,f,uprev,uprev2,tprev, + if VERSION < v"0.6-" + + ODEIntegrator(sol,u,k,t,dt,f,uprev,uprev2,tprev, + alg,rate_prototype,notsaveat_idxs,dtcache,dtchangeable,dtpropose,tdir, + EEst,qold,q11, + iter,saveiter,saveiter_dense,prog,cache, + kshortsize,just_hit_tstop,accept_step,isout,reeval_fsal,u_modified,opts) = new( + sol,u,k,t,dt,f,uprev,uprev2,tprev, + alg,rate_prototype,notsaveat_idxs,dtcache,dtchangeable,dtpropose,tdir, + EEst,qold,q11, + iter,saveiter,saveiter_dense,prog,cache, + kshortsize,just_hit_tstop,accept_step,isout,reeval_fsal,u_modified,opts) # Leave off fsalfirst and last + + else + + function (::ODEIntegrator){algType,uType,tType,tTypeNoUnits,tdirType,ksEltype,SolType, + rateType,F,ProgressType,CacheType,O}(sol,u,k,t,dt,f,uprev,uprev2,tprev, alg,rate_prototype,notsaveat_idxs,dtcache,dtchangeable,dtpropose,tdir, EEst,qold,q11, iter,saveiter,saveiter_dense,prog,cache, - kshortsize,just_hit_tstop,accept_step,isout,reeval_fsal,u_modified,opts) = new( - sol,u,k,t,dt,f,uprev,uprev2,tprev, + kshortsize,just_hit_tstop,accept_step,isout,reeval_fsal,u_modified,opts) + + new{algType,uType,tType,tTypeNoUnits,tdirType,ksEltype,SolType, + rateType,F,ProgressType,CacheType,O}(sol,u,k,t,dt,f,uprev,uprev2,tprev, alg,rate_prototype,notsaveat_idxs,dtcache,dtchangeable,dtpropose,tdir, EEst,qold,q11, iter,saveiter,saveiter_dense,prog,cache, kshortsize,just_hit_tstop,accept_step,isout,reeval_fsal,u_modified,opts) # Leave off fsalfirst and last + end + end end # When this is changed, DelayDiffEq.jl must be changed as well!