From 603fe64a1871af17061a79baacafa73322e91279 Mon Sep 17 00:00:00 2001 From: Jason Floyd Date: Tue, 3 Oct 2023 14:43:09 -0400 Subject: [PATCH] FDS Source: Fix node coord when no cells in layer --- Source/func.f90 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/func.f90 b/Source/func.f90 index 66183e75c03..e8815a62d62 100644 --- a/Source/func.f90 +++ b/Source/func.f90 @@ -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) @@ -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