From 8e1cca58d72c3288e56bfca97714c6ab163406d9 Mon Sep 17 00:00:00 2001 From: huiyuxie Date: Mon, 24 Jun 2024 21:02:02 -1000 Subject: [PATCH] start --- src/equations/lattice_boltzmann_2d.jl | 2 +- src/equations/lattice_boltzmann_3d.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/equations/lattice_boltzmann_2d.jl b/src/equations/lattice_boltzmann_2d.jl index 272dd897ce3..3ff23f357a4 100644 --- a/src/equations/lattice_boltzmann_2d.jl +++ b/src/equations/lattice_boltzmann_2d.jl @@ -253,7 +253,7 @@ end else v_alpha = equations.v_alpha2 end - return 0.5 * (v_alpha .* (u_ll + u_rr) - abs.(v_alpha) .* (u_rr - u_ll)) + return 0.5f0 * (v_alpha .* (u_ll + u_rr) - abs.(v_alpha) .* (u_rr - u_ll)) end """ diff --git a/src/equations/lattice_boltzmann_3d.jl b/src/equations/lattice_boltzmann_3d.jl index d3eada15f56..6a29a0a7310 100644 --- a/src/equations/lattice_boltzmann_3d.jl +++ b/src/equations/lattice_boltzmann_3d.jl @@ -243,7 +243,7 @@ end else # z-direction v_alpha = equations.v_alpha3 end - return 0.5 * (v_alpha .* (u_ll + u_rr) - abs.(v_alpha) .* (u_rr - u_ll)) + return 0.5f0 * (v_alpha .* (u_ll + u_rr) - abs.(v_alpha) .* (u_rr - u_ll)) end """ @@ -391,7 +391,7 @@ end rho = density(u, equations) v1, v2, v3 = velocity(u, equations) - return 0.5 * (v1^2 + v2^2 + v3^2) / rho / equations.rho0 + return 0.5f0 * (v1^2 + v2^2 + v3^2) / rho / equations.rho0 end # Calculate nondimensionalized kinetic energy for a conservative state `u`