Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/schemes/fluid/entropically_damped_sph/system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ function update_final!(system::EntropicallyDampedSPHSystem, v, u, v_ode, u_ode,
compute_curvature!(system, surface_tension, v, u, v_ode, u_ode, semi, t)
compute_stress_tensors!(system, surface_tension, v, u, v_ode, u_ode, semi, t)
update_average_pressure!(system, system.transport_velocity, v_ode, u_ode, semi)

# checks for callback dependent models
Comment thread
svchb marked this conversation as resolved.
Outdated
check_tvf_configuration(system, system.transport_velocity, v, u, v_ode, u_ode, semi, t;
Comment thread
svchb marked this conversation as resolved.
update_from_callback)
end

function update_average_pressure!(system, ::Nothing, v_ode, u_ode, semi)
Expand Down
14 changes: 4 additions & 10 deletions src/schemes/fluid/transport_velocity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -165,19 +165,13 @@ function update_callback_used!(system, transport_velocity)
system.cache.update_callback_used[] = true
end

function update_final!(system::FluidSystem, v, u, v_ode, u_ode, semi, t;
update_from_callback=false)
update_final!(system, system.transport_velocity,
v, u, v_ode, u_ode, semi, t; update_from_callback)
end

function update_final!(system::FluidSystem, ::Nothing,
v, u, v_ode, u_ode, semi, t; update_from_callback=false)
function check_tvf_configuration(system::FluidSystem, ::Nothing,
v, u, v_ode, u_ode, semi, t; update_from_callback=false)
return system
end

function update_final!(system::FluidSystem, ::TransportVelocityAdami,
v, u, v_ode, u_ode, semi, t; update_from_callback=false)
function check_tvf_configuration(system::FluidSystem, ::TransportVelocityAdami,
v, u, v_ode, u_ode, semi, t; update_from_callback=false)
Comment thread
svchb marked this conversation as resolved.
if !update_from_callback && !(system.cache.update_callback_used[])
throw(ArgumentError("`UpdateCallback` is required when using `TransportVelocityAdami`"))
end
Expand Down
4 changes: 4 additions & 0 deletions src/schemes/fluid/weakly_compressible_sph/system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ function update_final!(system::WeaklyCompressibleSPHSystem, v, u, v_ode, u_ode,
# Surface normal of neighbor and boundary needs to have been calculated already
compute_curvature!(system, surface_tension, v, u, v_ode, u_ode, semi, t)
compute_stress_tensors!(system, surface_tension, v, u, v_ode, u_ode, semi, t)

# checks for callback dependent models
Comment thread
svchb marked this conversation as resolved.
Outdated
check_tvf_configuration(system, system.transport_velocity, v, u, v_ode, u_ode, semi, t;
update_from_callback)
end

function kernel_correct_density!(system::WeaklyCompressibleSPHSystem, v, u, v_ode, u_ode,
Expand Down
Loading