Skip to content

Commit b246d17

Browse files
authored
Merge pull request #14017 from mcgratta/master
FDS Source: Issue #14012. Fix BNDF_DEFAULT bug
2 parents c7914cb + b2683f1 commit b246d17

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

Source/dump.f90

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,11 @@ SUBROUTINE INITIALIZE_MESH_DUMPS(NM)
12301230

12311231
! Count and allocate the PATCHes
12321232

1233-
M%N_PATCH = M%N_EXTERIOR_PATCH
1233+
IF (BNDF_DEFAULT) THEN
1234+
M%N_PATCH = M%N_EXTERIOR_PATCH
1235+
ELSE
1236+
M%N_PATCH = 0
1237+
ENDIF
12341238

12351239
DO N=1,M%N_OBST
12361240
OB=>M%OBSTRUCTION(N)
@@ -1248,16 +1252,22 @@ SUBROUTINE INITIALIZE_MESH_DUMPS(NM)
12481252

12491253
M%N_BNDF_POINTS = 0
12501254

1251-
DO IP=1,M%N_EXTERIOR_PATCH
1252-
PA => M%PATCH(IP)
1253-
M%PATCH(IP) = M%EXTERIOR_PATCH(IP)
1254-
M%N_BNDF_POINTS = M%N_BNDF_POINTS + (PA%IG2-PA%IG1+1)*(PA%JG2-PA%JG1+1)*(PA%KG2-PA%KG1+1)
1255-
PA%MESH_INDEX = NM
1256-
ENDDO
1255+
IF (BNDF_DEFAULT) THEN
1256+
DO IP=1,M%N_EXTERIOR_PATCH
1257+
PA => M%PATCH(IP)
1258+
M%PATCH(IP) = M%EXTERIOR_PATCH(IP)
1259+
M%N_BNDF_POINTS = M%N_BNDF_POINTS + (PA%IG2-PA%IG1+1)*(PA%JG2-PA%JG1+1)*(PA%KG2-PA%KG1+1)
1260+
PA%MESH_INDEX = NM
1261+
ENDDO
1262+
ENDIF
12571263

12581264
! Assign coordinate indices for PATCHes that live on the boundaries of obstructions
12591265

1260-
IP = M%N_EXTERIOR_PATCH
1266+
IF (BNDF_DEFAULT) THEN
1267+
IP = M%N_EXTERIOR_PATCH
1268+
ELSE
1269+
IP = 0
1270+
ENDIF
12611271

12621272
DO OBST_INDEX=1,M%N_OBST
12631273
OB => M%OBSTRUCTION(OBST_INDEX)

0 commit comments

Comments
 (0)