Skip to content

Commit

Permalink
Fix velocity half step
Browse files Browse the repository at this point in the history
  • Loading branch information
efaulhaber committed Jan 3, 2025
1 parent 6ae5b60 commit fc41626
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/OrdinaryDiffEqSymplecticRK/src/symplectic_perform_step.jl
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ end
u = uprev + dt * half * ku

# update velocity half step
kdu = f.f1(duprev, u, p, t)
kdu = f.f1(duprev, uprev, p, t)
du = duprev + dt * half * kdu

# full step
Expand Down Expand Up @@ -293,7 +293,7 @@ end
@.. broadcast=false u=uprev + dt * half * ku

# update velocity half step
f.f1(kdu, duprev, u, p, t)
f.f1(kdu, duprev, uprev, p, t)
@.. broadcast=false du=duprev + dt * half * kdu

# full step
Expand Down

0 comments on commit fc41626

Please sign in to comment.