Skip to content

Commit

Permalink
Make simulations run with Float32 (#662)
Browse files Browse the repository at this point in the history
* Replace hardcoded Float64 values

* Avoid Float64 `eps()`

* Remove the last Float64 occurrence in fluid-fluid kernel

* Fix tests

* Make all smoothing kernels preserve types and add test for this

* Make eps(typeof(h)) consistent

* Reformat code

* Fix tests
  • Loading branch information
efaulhaber authored and LasNikas committed Nov 18, 2024
1 parent 2af6e8f commit b9a9450
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/schemes/fluid/viscosity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,12 @@ end
v_neighbor_system,
particle, neighbor,
pos_diff, distance,
sound_speed, m_a, m_b,
rho_a, rho_b, grad_kernel)
rho_mean = 0.5 * (rho_a + rho_b)
sound_speed,
m_a, m_b, rho_a, rho_b,
grad_kernel)
(; smoothing_length) = particle_system

rho_mean = (rho_a + rho_b) / 2

v_a = viscous_velocity(v_particle_system, particle_system, particle)
v_b = viscous_velocity(v_neighbor_system, neighbor_system, neighbor)
Expand Down

0 comments on commit b9a9450

Please sign in to comment.