Skip to content

Commit

Permalink
Hotfix for depwarn
Browse files Browse the repository at this point in the history
  • Loading branch information
efaulhaber committed Dec 13, 2023
1 parent 6cb6bbc commit 7ec4e77
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/n_body/n_body_solar_system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ sol = solve(ode, SymplecticEuler(),
save_everystep=false, callback=callbacks);

@printf("%.9e\n", energy(ode.u0.x..., particle_system, semi))
@printf("%.9e\n", energy(sol[end].x..., particle_system, semi))
@printf("%.9e\n", energy(sol.u[end].x..., particle_system, semi))

# Enable timers again.
TrixiParticles.TimerOutputs.enable_debug_timings(TrixiParticles)
6 changes: 3 additions & 3 deletions src/general/semidiscretization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ function restart_with!(semi, sol; reset_threads=true)
end

foreach_system(semi) do system
v = wrap_v(sol[end].x[1], system, semi)
u = wrap_u(sol[end].x[2], system, semi)
v = wrap_v(sol.u[end].x[1], system, semi)
u = wrap_u(sol.u[end].x[2], system, semi)

restart_with!(system, v, u)
end
Expand Down Expand Up @@ -433,7 +433,7 @@ end

# Function barrier to make benchmarking interactions easier.
# One can benchmark, e.g. the fluid-fluid interaction, with:
# dv_ode, du_ode = copy(sol[end]).x; v_ode, u_ode = copy(sol[end]).x;
# dv_ode, du_ode = copy(sol.u[end]).x; v_ode, u_ode = copy(sol.u[end]).x;
# @btime TrixiParticles.interact!($dv_ode, $v_ode, $u_ode, $fluid_system, $fluid_system, $semi);
@inline function interact!(dv_ode, v_ode, u_ode, system, neighbor, semi; timer_str="")
dv = wrap_v(dv_ode, system, semi)
Expand Down
2 changes: 1 addition & 1 deletion src/visualization/write2vtk.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Convert Trixi simulation data to VTK format.
# Example
```julia
trixi2vtk(sol[end], semi, 0.0, iter=1, output_directory="output", prefix="solution")
trixi2vtk(sol.u[end], semi, 0.0, iter=1, output_directory="output", prefix="solution")
TODO: example for custom_quantities
"""
Expand Down

0 comments on commit 7ec4e77

Please sign in to comment.