From a05a68d91fbe1b0ff769a7cbcf98093893ff51f9 Mon Sep 17 00:00:00 2001 From: Huiyu Xie Date: Sun, 13 Oct 2024 18:33:40 -1000 Subject: [PATCH] Fix small amount of `Float64` computation --- src/equations/compressible_euler_multicomponent_1d.jl | 11 +++++------ src/equations/compressible_euler_multicomponent_2d.jl | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/equations/compressible_euler_multicomponent_1d.jl b/src/equations/compressible_euler_multicomponent_1d.jl index c25a4631185..f9413e0f1f9 100644 --- a/src/equations/compressible_euler_multicomponent_1d.jl +++ b/src/equations/compressible_euler_multicomponent_1d.jl @@ -204,13 +204,12 @@ function initial_condition_weak_blast_wave(x, t, prim_rho = SVector{ncomponents(equations), real(equations)}(r > 0.5f0 ? 2^(i - 1) * (1 - 2) / + (RealT(1) - + 2^ncomponents(equations)) : + 2^(i - 1) * (1 - 2) * + RealT(1.1691) / (1 - - 2^ncomponents(equations)) * - one(RealT) : - 2^(i - 1) * (1 - 2) / - (1 - - 2^ncomponents(equations)) * - convert(RealT, 1.1691) + 2^ncomponents(equations)) for i in eachcomponent(equations)) v1 = r > 0.5f0 ? zero(RealT) : convert(RealT, 0.1882) * cos_phi diff --git a/src/equations/compressible_euler_multicomponent_2d.jl b/src/equations/compressible_euler_multicomponent_2d.jl index 2278fe58eb3..bac76c9a021 100644 --- a/src/equations/compressible_euler_multicomponent_2d.jl +++ b/src/equations/compressible_euler_multicomponent_2d.jl @@ -222,13 +222,12 @@ function initial_condition_weak_blast_wave(x, t, prim_rho = SVector{ncomponents(equations), real(equations)}(r > 0.5f0 ? 2^(i - 1) * (1 - 2) / + (RealT(1) - + 2^ncomponents(equations)) : + 2^(i - 1) * (1 - 2) * + RealT(1.1691) / (1 - - 2^ncomponents(equations)) * - one(RealT) : - 2^(i - 1) * (1 - 2) / - (1 - - 2^ncomponents(equations)) * - convert(RealT, 1.1691) + 2^ncomponents(equations)) for i in eachcomponent(equations)) v1 = r > 0.5f0 ? zero(RealT) : convert(RealT, 0.1882) * cos_phi