diff --git a/src/mcwf.jl b/src/mcwf.jl index 459deec2..bbe64f17 100644 --- a/src/mcwf.jl +++ b/src/mcwf.jl @@ -246,6 +246,7 @@ function integrate_mcwf(dmcwf::Function, jumpfun::Function, tspan, display_beforeevent=false, display_afterevent=false, display_jumps=false, save_everystep=false, callback=nothing, + saveat=tspan, alg=OrdinaryDiffEq.DP5(), kwargs...) where T @@ -282,7 +283,7 @@ function integrate_mcwf(dmcwf::Function, jumpfun::Function, tspan, dstate = copy(psi0) out_type = pure_inference(fout, Tuple{eltype(tspan),typeof(state)}) out = DiffEqCallbacks.SavedValues(Float64,out_type) - scb = DiffEqCallbacks.SavingCallback(fout_,out,saveat=tspan, + scb = DiffEqCallbacks.SavingCallback(fout_,out,saveat=saveat, save_everystep=save_everystep, save_start = false) diff --git a/src/stochastic_base.jl b/src/stochastic_base.jl index e8d89779..7a08c9a3 100644 --- a/src/stochastic_base.jl +++ b/src/stochastic_base.jl @@ -12,7 +12,7 @@ Integrate using StochasticDiffEq """ function integrate_stoch(tspan::Vector{Float64}, df::Function, dg::Function, x0::Vector{ComplexF64}, state::T, dstate::T, fout::Function, n::Int; - save_everystep = false, callback=nothing, + save_everystep = false, callback=nothing, saveat=tspan, alg::StochasticDiffEq.StochasticDiffEqAlgorithm=StochasticDiffEq.EM(), noise_rate_prototype = nothing, noise_prototype_classical = nothing, @@ -58,7 +58,7 @@ function integrate_stoch(tspan::Vector{Float64}, df::Function, dg::Function, x0: out = DiffEqCallbacks.SavedValues(Float64,out_type) - scb = DiffEqCallbacks.SavingCallback(fout_,out,saveat=tspan, + scb = DiffEqCallbacks.SavingCallback(fout_,out,saveat=saveat, save_everystep=save_everystep, save_start = false) diff --git a/src/timeevolution_base.jl b/src/timeevolution_base.jl index 365077c3..e58b449e 100644 --- a/src/timeevolution_base.jl +++ b/src/timeevolution_base.jl @@ -16,7 +16,7 @@ Integrate using OrdinaryDiffEq function integrate(tspan::Vector{Float64}, df::Function, x0::DiffArray, state::T, dstate::T, fout::Function; alg::OrdinaryDiffEq.OrdinaryDiffEqAlgorithm = OrdinaryDiffEq.DP5(), - steady_state = false, tol = 1e-3, save_everystep = false, + steady_state = false, tol = 1e-3, save_everystep = false, saveat=tspan, callback = nothing, kwargs...) where T function df_(dx::DiffArray, x::DiffArray, p, t) @@ -34,7 +34,7 @@ function integrate(tspan::Vector{Float64}, df::Function, x0::DiffArray, out = DiffEqCallbacks.SavedValues(Float64,out_type) - scb = DiffEqCallbacks.SavingCallback(fout_,out,saveat=tspan, + scb = DiffEqCallbacks.SavingCallback(fout_,out,saveat=saveat, save_everystep=save_everystep, save_start = false)