Skip to content

Commit

Permalink
Merge pull request firemodels#14017 from mcgratta/master
Browse files Browse the repository at this point in the history
FDS Source: Issue firemodels#14012. Fix BNDF_DEFAULT bug
  • Loading branch information
mcgratta authored Jan 8, 2025
2 parents c7914cb + b2683f1 commit b246d17
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions Source/dump.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit b246d17

Please sign in to comment.