From 5c772f6c3be861bf751478a4afd468793e0c65cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Rueda-Ram=C3=ADrez?= Date: Wed, 18 Dec 2024 13:55:41 +0100 Subject: [PATCH] Skip computation of collision sources of an ion species with itself --- src/equations/ideal_glm_mhd_multiion.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/equations/ideal_glm_mhd_multiion.jl b/src/equations/ideal_glm_mhd_multiion.jl index de39bf006e..0f151139b4 100644 --- a/src/equations/ideal_glm_mhd_multiion.jl +++ b/src/equations/ideal_glm_mhd_multiion.jl @@ -334,6 +334,9 @@ function source_terms_collision_ion_ion(u, x, t, S_q3 = zero(eltype(u)) S_E = zero(eltype(u)) for l in eachcomponent(equations) + # Do not compute collisions of an ion species with itself + k == l && continue + rho_l, v1_l, v2_l, v3_l, p_l = get_component(l, prim, equations) T_l = p_l / (rho_l * gas_constants[l])