Skip to content

Commit

Permalink
FDS Source: Fix bug in CONNECTED_ZONES calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgratta committed Nov 16, 2024
1 parent 9c0adf3 commit 8a1713d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ PROGRAM FDS
CALL DIVERGENCE_PART_1(T_BEGIN,DT,NM)
ENDDO

IF (HVAC_SOLVE .AND. N_ZONE>0 .AND. .NOT.SOLID_PHASE_ONLY) CALL EXCHANGE_DIVERGENCE_INFO
IF (N_ZONE>0 .AND. .NOT.SOLID_PHASE_ONLY) CALL EXCHANGE_DIVERGENCE_INFO

CALL GLOBAL_MATRIX_REASSIGN(FORCE_REASSIGN=.TRUE.)

Expand Down Expand Up @@ -1816,11 +1816,11 @@ SUBROUTINE EXCHANGE_DIVERGENCE_INFO
! Connect zones to others which are not directly connected

IF (OBST_CREATED_OR_REMOVED) THEN
IF (N_MPI_PROCESSES>1) CALL MPI_ALLREDUCE(MPI_IN_PLACE,CONNECTED_ZONES,(N_ZONE+1)**2,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,IERR)
IF (N_MPI_PROCESSES>1) CALL MPI_ALLREDUCE(MPI_IN_PLACE,CONNECTED_ZONES,(N_ZONE+1)**2,MPI_INTEGER,MPI_MAX,MPI_COMM_WORLD,IERR)
DO IPZ=1,N_ZONE
CONNECTED_ZONES = MATMUL(CONNECTED_ZONES,CONNECTED_ZONES)
CONNECTED_ZONES = MIN(1,CONNECTED_ZONES)
ENDDO
CONNECTED_ZONES = MIN(1,CONNECTED_ZONES)
ENDIF

T_USED(11)=T_USED(11) + CURRENT_TIME() - TNOW
Expand Down

0 comments on commit 8a1713d

Please sign in to comment.