diff --git a/Project.toml b/Project.toml index b944284..570e54f 100644 --- a/Project.toml +++ b/Project.toml @@ -10,19 +10,19 @@ ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" GridVisualize = "5eed8a63-0fb0-45eb-886d-8d5a387d12b8" Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" +PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee" Roots = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" VoronoiFVM = "82b139dc-5afc-11e9-35da-9b9bdfd336f3" -PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee" [compat] DocStringExtensions = "0.8,0.9" ExtendableGrids = "^0.9,1" ForwardDiff = "^0.10" GridVisualize = "^1.0.0" -Interpolations = "^0.14.7" -Roots = "^2.0" -VoronoiFVM = "^1.13" +Interpolations = "0.14.7, 0.15" PyPlot = "^2.11.2" +Roots = "^2.0" +VoronoiFVM = "1.13,2" julia = "^1.6" diff --git a/examples/Ex104_PSC_Photogeneration.jl b/examples/Ex104_PSC_Photogeneration.jl index 6724c83..d215b20 100644 --- a/examples/Ex104_PSC_Photogeneration.jl +++ b/examples/Ex104_PSC_Photogeneration.jl @@ -19,7 +19,7 @@ function main(;n = 5, Plotter = PyPlot, # you can also use other Plotters, if you add them to the example file plotting = false, verbose = false, test = false, ######################## - parameter_file = "../parameter_files/Params_PSC_TiO2_MAPI_spiro.jl", # choose the parameter file + parameter_file = joinpath(@__DIR__,"..","parameter_files","Params_PSC_TiO2_MAPI_spiro.jl"), # choose the parameter file ######################## userdefinedGeneration = false) # you can choose between predefined and user-defined generation profiles @@ -363,7 +363,6 @@ function main(;n = 5, println("Reverse scan protocol") end ################################################################################ - inivalReverse = sol(tend) solReverse = solve(ctsys, inival = inivalReverse, times=(tend, 2 * tend), control = control) @@ -387,8 +386,8 @@ function main(;n = 5, for istep = 2:number_tsteps Δt = tvalues[istep] - tvalues[istep-1] # Time step size - inival = sol[istep-1] - solution = sol[istep] + inival = sol.u[istep-1] + solution = sol.u[istep] I = integrate(ctsys, tf, solution, inival, Δt) @@ -408,8 +407,8 @@ function main(;n = 5, for istep = 2:number_tstepsReverse Δt = tvaluesReverse[istep] - tvaluesReverse[istep-1] # Time step size - inival = solReverse[istep-1] - solution = solReverse[istep] + inival = solReverse.u[istep-1] + solution = solReverse.u[istep] I = integrate(ctsys, tf, solution, inival, Δt) diff --git a/examples/Ex107_MoS2_withIons_BarrierLowering.jl b/examples/Ex107_MoS2_withIons_BarrierLowering.jl index c71cadf..9c5c183 100644 --- a/examples/Ex107_MoS2_withIons_BarrierLowering.jl +++ b/examples/Ex107_MoS2_withIons_BarrierLowering.jl @@ -291,8 +291,8 @@ function main(;Plotter = PyPlot, plotting = false, verbose = false, test = false push!(IV, 0.0) for istep = 2:number_tsteps Δt = tvalues[istep] - tvalues[istep-1] # Time step size - inival = sol[istep-1] - solution = sol[istep] + inival = sol.u[istep-1] + solution = sol.u[istep] I = integrate(ctsys, tf, solution, inival, Δt) @@ -330,4 +330,4 @@ function test() end -end # module \ No newline at end of file +end # module