From b2683f14f0260b96fc3ecae97c5b89c529942913 Mon Sep 17 00:00:00 2001 From: mcgratta Date: Wed, 8 Jan 2025 17:19:46 -0500 Subject: [PATCH] FDS Source: Issue #14012. Fix BNDF_DEFAULT bug --- Source/dump.f90 | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/Source/dump.f90 b/Source/dump.f90 index 1f68921e58..7e0438eed4 100644 --- a/Source/dump.f90 +++ b/Source/dump.f90 @@ -1230,7 +1230,11 @@ SUBROUTINE INITIALIZE_MESH_DUMPS(NM) ! Count and allocate the PATCHes - M%N_PATCH = M%N_EXTERIOR_PATCH + IF (BNDF_DEFAULT) THEN + M%N_PATCH = M%N_EXTERIOR_PATCH + ELSE + M%N_PATCH = 0 + ENDIF DO N=1,M%N_OBST OB=>M%OBSTRUCTION(N) @@ -1248,16 +1252,22 @@ SUBROUTINE INITIALIZE_MESH_DUMPS(NM) M%N_BNDF_POINTS = 0 - DO IP=1,M%N_EXTERIOR_PATCH - PA => M%PATCH(IP) - M%PATCH(IP) = M%EXTERIOR_PATCH(IP) - M%N_BNDF_POINTS = M%N_BNDF_POINTS + (PA%IG2-PA%IG1+1)*(PA%JG2-PA%JG1+1)*(PA%KG2-PA%KG1+1) - PA%MESH_INDEX = NM - ENDDO + IF (BNDF_DEFAULT) THEN + DO IP=1,M%N_EXTERIOR_PATCH + PA => M%PATCH(IP) + M%PATCH(IP) = M%EXTERIOR_PATCH(IP) + M%N_BNDF_POINTS = M%N_BNDF_POINTS + (PA%IG2-PA%IG1+1)*(PA%JG2-PA%JG1+1)*(PA%KG2-PA%KG1+1) + PA%MESH_INDEX = NM + ENDDO + ENDIF ! Assign coordinate indices for PATCHes that live on the boundaries of obstructions - IP = M%N_EXTERIOR_PATCH + IF (BNDF_DEFAULT) THEN + IP = M%N_EXTERIOR_PATCH + ELSE + IP = 0 + ENDIF DO OBST_INDEX=1,M%N_OBST OB => M%OBSTRUCTION(OBST_INDEX)