Skip to content

Commit

Permalink
FDS Source: Issue #12641. Fix bug in algorithm to detect merge pressu…
Browse files Browse the repository at this point in the history
…re zones
  • Loading branch information
mcgratta committed Mar 20, 2024
1 parent 5c6299f commit 15df532
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions Source/main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1793,6 +1793,7 @@ SUBROUTINE EXCHANGE_DIVERGENCE_INFO

INTEGER :: IPZ,IOPZ,IOPZ2
REAL(EB) :: TNOW
LOGICAL :: NEW_CONNECTION

TNOW = CURRENT_TIME()

Expand Down Expand Up @@ -1836,16 +1837,23 @@ SUBROUTINE EXCHANGE_DIVERGENCE_INFO
! Connect zones to others which are not directly connected

DO NM=1,NMESHES
DO IPZ=1,N_ZONE
DO IOPZ=1,N_ZONE
IF (IOPZ==IPZ) CYCLE
IF (CONNECTED_ZONES(IPZ,IOPZ,NM)) THEN
DO IOPZ2=0,N_ZONE
IF (IOPZ==IOPZ2) CYCLE
IF (CONNECTED_ZONES(IOPZ,IOPZ2,NM)) CONNECTED_ZONES(IPZ,IOPZ2,NM) = .TRUE.
IF (CONNECTED_ZONES(IOPZ,IOPZ2,NM)) CONNECTED_ZONES(IOPZ2,IPZ,NM) = .TRUE.
ENDDO
ENDIF
NEW_CONNECTION = .TRUE.
DO WHILE (NEW_CONNECTION)
NEW_CONNECTION = .FALSE.
DO IPZ=1,N_ZONE
DO IOPZ=1,N_ZONE
IF (IOPZ==IPZ) CYCLE
IF (CONNECTED_ZONES(IPZ,IOPZ,NM)) THEN
DO IOPZ2=0,N_ZONE
IF (IOPZ==IOPZ2) CYCLE
IF (CONNECTED_ZONES(IOPZ,IOPZ2,NM)) THEN
IF (.NOT.CONNECTED_ZONES(IPZ,IOPZ2,NM)) NEW_CONNECTION = .TRUE.
CONNECTED_ZONES(IPZ,IOPZ2,NM) = .TRUE.
CONNECTED_ZONES(IOPZ2,IPZ,NM) = .TRUE.
ENDIF
ENDDO
ENDIF
ENDDO
ENDDO
ENDDO
ENDDO
Expand Down

0 comments on commit 15df532

Please sign in to comment.