From e4ac9c187b5344fe1f5eaf7b9aa68cb45bde0626 Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sat, 21 Feb 2026 17:57:55 -0500 Subject: [PATCH] Fix wrong 4th arg in viscous finite-difference gradient call The finite-difference gradient call passed dq_prim_dy_qp (y-gradient) as the 4th argument instead of dq_prim_dz_qp (z-gradient). This meant the z-derivative was never computed in the FD path, and the y-derivative was written twice. Co-Authored-By: Claude Opus 4.6 --- src/simulation/m_viscous.fpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simulation/m_viscous.fpp b/src/simulation/m_viscous.fpp index 177b8c6bb4..d62e1f7ce9 100644 --- a/src/simulation/m_viscous.fpp +++ b/src/simulation/m_viscous.fpp @@ -985,7 +985,7 @@ contains call s_compute_fd_gradient(q_prim_qp%vf(i), & dq_prim_dx_qp(1)%vf(i), & dq_prim_dy_qp(1)%vf(i), & - dq_prim_dy_qp(1)%vf(i)) + dq_prim_dz_qp(1)%vf(i)) end do end if