Skip to content

Commit

Permalink
Semiclassical mcwf with display event
Browse files Browse the repository at this point in the history
  • Loading branch information
david-pl committed Sep 11, 2019
1 parent 3ff637d commit 98c720a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/semiclassical.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import OrdinaryDiffEq

# TODO: Remove imports
import DiffEqCallbacks, RecursiveArrayTools.copyat_or_push!
Base.@pure pure_inference(fout,T) = Core.Compiler.return_type(fout, T)

using ..bases, ..states, ..operators, ..operators_dense, ..timeevolution

Expand Down Expand Up @@ -271,7 +272,7 @@ function integrate_mcwf(dmcwf::Function, jumpfun::Function, tspan,

recast!(x, psi_tmp)
jumpfun(rng, t, psi_tmp, tmp)
x .= tmp.data
recast!(tmp, x)

if display_afterevent
affect!.saveiter += 1
Expand All @@ -293,7 +294,7 @@ function integrate_mcwf(dmcwf::Function, jumpfun::Function, tspan,
recast!(dstate, dx)
end

prob = OrdinaryDiffEq.ODEProblem{true}(df_, as_vector(psi0),(tspan[1],tspan[end]))
prob = OrdinaryDiffEq.ODEProblem{true}(df_, x0,(tspan[1],tspan[end]))

sol = OrdinaryDiffEq.solve(
prob,
Expand Down

0 comments on commit 98c720a

Please sign in to comment.