Skip to content

Commit

Permalink
interpolation diffeqarray
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Jul 1, 2017
1 parent 911ec37 commit 04bace8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/interpolation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ interp_summary(sol::DESolution) = interp_summary(sol.interp)
end
end
end
vals
DiffEqArray(vals,tvals)
end

"""
Expand Down
6 changes: 3 additions & 3 deletions src/solutions/ode_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ function calculate_solution_errors!(sol::AbstractODESolution;fill_uanalytic=true
if sol.dense && dense_errors
densetimes = collect(linspace(sol.t[1],sol.t[end],100))
interp_u = sol(densetimes)
interp_analytic = [f(Val{:analytic},t,sol.u[1]) for t in densetimes]
sol.errors[:L∞] = maximum(vecvecapply((x)->abs.(x),interp_u-interp_analytic))
sol.errors[:L2] = sqrt(recursive_mean(vecvecapply((x)->float.(x).^2,interp_u-interp_analytic)))
interp_analytic = VectorOfArray([f(Val{:analytic},t,sol.prob.u0) for t in densetimes])
sol.errors[:L∞] = maximum(abs.(interp_u.-interp_analytic))
sol.errors[:L2] = sqrt(mean((interp_u.-interp_analytic).^2))
end
end
end
Expand Down

0 comments on commit 04bace8

Please sign in to comment.