Skip to content

Commit da445e3

Browse files
efaulhabersvchb
andauthored
Fix requires_update_callback of shifting techniques (#925)
Co-authored-by: Sven Berger <[email protected]>
1 parent 0e626e1 commit da445e3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/schemes/fluid/shifting_techniques.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ abstract type AbstractShiftingTechnique end
77
# The version for a specific system type will override this generic version.
88
requires_update_callback(system) = requires_update_callback(shifting_technique(system))
99
requires_update_callback(::Nothing) = false
10-
requires_update_callback(::AbstractShiftingTechnique) = true
10+
requires_update_callback(::AbstractShiftingTechnique) = false
1111

1212
# This is called from the `UpdateCallback`
1313
particle_shifting_from_callback!(u_ode, shifting, system, v_ode, semi, dt) = u_ode
@@ -302,6 +302,10 @@ function ConsistentShiftingSun2019(; kwargs...)
302302
kwargs...)
303303
end
304304

305+
# `ParticleShiftingTechnique{<:Any, false}` means `update_everystage=false`,
306+
# so the `UpdateCallback` is required to update the shifting velocity.
307+
requires_update_callback(::ParticleShiftingTechnique{<:Any, false}) = true
308+
305309
# `ParticleShiftingTechnique{false}` means `integrate_shifting_velocity=false`.
306310
# Zero if PST is applied in a callback as a position correction
307311
# and not with a shifting velocity in the time integration stages

0 commit comments

Comments
 (0)