Skip to content

Commit

Permalink
FDS Source: Fix node coord when no cells in layer
Browse files Browse the repository at this point in the history
  • Loading branch information
drjfloyd committed Oct 3, 2023
1 parent 7c6a231 commit 603fe64
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Source/func.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2701,7 +2701,7 @@ SUBROUTINE GET_WALL_NODE_COORDINATES(N_CELLS,N_CELLS_OLD,N_LAYERS,N_LAYER_CELLS,
STRETCH_FACTOR,REMESH_LAYER,X_S,X_S_OLD,LAYER_THICKNESS)

INTEGER, INTENT(IN) :: N_CELLS,N_CELLS_OLD,N_LAYERS, N_LAYER_CELLS(N_LAYERS),N_LAYER_CELLS_OLD(N_LAYERS)
REAL(EB), INTENT(IN) :: SMALLEST_CELL_SIZE(N_LAYERS),STRETCH_FACTOR(N_LAYERS),X_S_OLD(0:N_CELLS_OLD),LAYER_THICKNESS(N_LAYERS)
REAL(EB), INTENT(IN) :: SMALLEST_CELL_SIZE(N_LAYERS),STRETCH_FACTOR(N_LAYERS),X_S_OLD(0:N_CELLS_OLD),LAYER_THICKNESS(1:N_LAYERS)
REAL(EB), INTENT(OUT) :: X_S(0:N_CELLS)
LOGICAL, INTENT(IN) :: REMESH_LAYER(N_LAYERS)

Expand All @@ -2727,8 +2727,10 @@ SUBROUTINE GET_WALL_NODE_COORDINATES(N_CELLS,N_CELLS_OLD,N_LAYERS,N_LAYER_CELLS,
ENDIF
X_S(II) = X_S(II-1) + DX_S
ENDDO
II = II + 1
X_S(II) = X_S(II-1) + LAYER_THICKNESS(NL) - DX_SUM
IF (N_LAYER_CELLS(NL) > 0) THEN
II = II + 1
X_S(II) = X_S(II-1) + LAYER_THICKNESS(NL) - DX_SUM
ENDIF
IL = IL + N_LAYER_CELLS_OLD(NL)
ENDDO

Expand Down

0 comments on commit 603fe64

Please sign in to comment.