From a7aad50c9161e0e12fe9ab8c6c68928f0a43b7bb Mon Sep 17 00:00:00 2001 From: Mohit-Ak Date: Fri, 14 Aug 2026 02:05:15 -0400 Subject: [PATCH] Run inactive-patch validation over all patch slots Three of the four validation loops in s_check_patches were bounded at num_patches rather than num_patches_max, so their else branches -- the inactive-slot validators -- were unreachable. Widen those bounds to match the first loop, which already gets this right. --- src/pre_process/m_check_patches.fpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pre_process/m_check_patches.fpp b/src/pre_process/m_check_patches.fpp index 5d31c8dc0..3eb6b2d2e 100644 --- a/src/pre_process/m_check_patches.fpp +++ b/src/pre_process/m_check_patches.fpp @@ -95,7 +95,7 @@ contains end do ! Constraints on overwrite rights initial condition patch parameters - do i = 1, num_patches + do i = 1, num_patches_max if (i <= num_patches) then call s_check_active_patch_alteration_rights(i) else @@ -104,7 +104,7 @@ contains end do ! Constraints on smoothing initial condition patch parameters - do i = 1, num_patches + do i = 1, num_patches_max if (i > 1 .and. (patch_icpp(i)%geometry == 2 .or. patch_icpp(i)%geometry == 3 .or. patch_icpp(i)%geometry == 4 & & .or. patch_icpp(i)%geometry == 5 .or. patch_icpp(i)%geometry == 8 .or. patch_icpp(i)%geometry == 9 & & .or. patch_icpp(i)%geometry == 10 .or. patch_icpp(i)%geometry == 11 .or. patch_icpp(i)%geometry == 12 & @@ -116,7 +116,7 @@ contains end do ! Constraints on flow variables initial condition patch parameters - do i = 1, num_patches + do i = 1, num_patches_max if (i <= num_patches) then call s_check_active_patch_primitive_variables(i) else