diff --git a/Source/dump.f90 b/Source/dump.f90 index 1fe69412445..4a9a188bf95 100644 --- a/Source/dump.f90 +++ b/Source/dump.f90 @@ -3197,9 +3197,9 @@ SUBROUTINE INITIALIZE_DIAGNOSTIC_FILE(DT) LPC => LAGRANGIAN_PARTICLE_CLASS(N) WRITE(LU_OUTPUT,'(/I4,1X,A)') N,TRIM(LPC%ID) WRITE(LU_OUTPUT,'(4X,A,A)') ' SURFace ID: ',TRIM(SURFACE(LPC%SURF_INDEX)%ID) - WRITE(LU_OUTPUT,'(4X,A,I0)') ' # Reals: ',LPC%N_STORAGE_REALS - WRITE(LU_OUTPUT,'(4X,A,I0)') ' # Integers: ',LPC%N_STORAGE_INTEGERS - WRITE(LU_OUTPUT,'(4X,A,I0)') ' # Logicals: ',LPC%N_STORAGE_LOGICALS + WRITE(LU_OUTPUT,'(4X,A,I0)') ' # Reals: ',LPC%N_REALS + WRITE(LU_OUTPUT,'(4X,A,I0)') ' # Integers: ',LPC%N_INTEGERS + WRITE(LU_OUTPUT,'(4X,A,I0)') ' # Logicals: ',LPC%N_LOGICALS ENDDO PARTLOOP ! Print out information about all Devices diff --git a/Source/func.f90 b/Source/func.f90 index e17d1752e49..31d6331e61d 100644 --- a/Source/func.f90 +++ b/Source/func.f90 @@ -1058,8 +1058,6 @@ SUBROUTINE ALLOCATE_STORAGE(NM,LP_INDEX,LPC_INDEX,SURF_INDEX,WALL_INDEX,CFACE_IN LP%B2_INDEX = B2_INDEX LP%BR_INDEX = BR_INDEX - CALL PACK_PARTICLE(NM,OS_DUMMY,LP,LPC_INDEX,LP%N_REALS,LP%N_INTEGERS,LP%N_LOGICALS,UNPACK_IT=.FALSE.,COUNT_ONLY=.TRUE.) - ELSEIF (PRESENT(WALL_INDEX)) THEN SF => SURFACE(SURF_INDEX) @@ -1484,9 +1482,6 @@ SUBROUTINE PACK_PARTICLE(NM,OS,LP,LPC_INDEX,RC,IC,LC,UNPACK_IT,COUNT_ONLY) IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),LP%INIT_INDEX,UNPACK_IT) IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),LP%CFACE_INDEX,UNPACK_IT) IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),LP%PROP_INDEX,UNPACK_IT) -IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),LP%N_REALS,UNPACK_IT) -IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),LP%N_INTEGERS,UNPACK_IT) -IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),LP%N_LOGICALS,UNPACK_IT) ! Assign logical pointers and values diff --git a/Source/main.f90 b/Source/main.f90 index f151d64a0a4..5d9bd0b22d6 100644 --- a/Source/main.f90 +++ b/Source/main.f90 @@ -2037,11 +2037,11 @@ SUBROUTINE INITIALIZE_MESH_EXCHANGE_1(NM) CALL ALLOCATE_STORAGE(NM,LP_INDEX=1,LPC_INDEX=ILC,SURF_INDEX=LPC%SURF_INDEX) LP => M%LAGRANGIAN_PARTICLE(1) OS => LPC%PARTICLE_STORAGE - CALL PACK_PARTICLE(NM,OS,LP,ILC,LPC%N_STORAGE_REALS,LPC%N_STORAGE_INTEGERS,LPC%N_STORAGE_LOGICALS,& - UNPACK_IT=.FALSE.,COUNT_ONLY=.TRUE.) - IF (.NOT.ALLOCATED(LPC%PARTICLE_STORAGE%REALS)) ALLOCATE(LPC%PARTICLE_STORAGE%REALS(LPC%N_STORAGE_REALS)) - IF (.NOT.ALLOCATED(LPC%PARTICLE_STORAGE%INTEGERS)) ALLOCATE(LPC%PARTICLE_STORAGE%INTEGERS(LPC%N_STORAGE_INTEGERS)) - IF (.NOT.ALLOCATED(LPC%PARTICLE_STORAGE%LOGICALS)) ALLOCATE(LPC%PARTICLE_STORAGE%LOGICALS(LPC%N_STORAGE_LOGICALS)) + LPC%N_REALS=0 ; LPC%N_INTEGERS=0 ; LPC%N_LOGICALS=0 + CALL PACK_PARTICLE(NM,OS,LP,ILC,LPC%N_REALS,LPC%N_INTEGERS,LPC%N_LOGICALS,UNPACK_IT=.FALSE.,COUNT_ONLY=.TRUE.) + IF (.NOT.ALLOCATED(LPC%PARTICLE_STORAGE%REALS)) ALLOCATE(LPC%PARTICLE_STORAGE%REALS(LPC%N_REALS)) + IF (.NOT.ALLOCATED(LPC%PARTICLE_STORAGE%INTEGERS)) ALLOCATE(LPC%PARTICLE_STORAGE%INTEGERS(LPC%N_INTEGERS)) + IF (.NOT.ALLOCATED(LPC%PARTICLE_STORAGE%LOGICALS)) ALLOCATE(LPC%PARTICLE_STORAGE%LOGICALS(LPC%N_LOGICALS)) CALL NULLIFY_PARTICLE(NM,1) ENDDO diff --git a/Source/part.f90 b/Source/part.f90 index e644bb6bfe2..a0cc7c5d21e 100644 --- a/Source/part.f90 +++ b/Source/part.f90 @@ -4734,17 +4734,17 @@ SUBROUTINE ADD_TO_PARTICLE_SEND_BUFFER IF (NOM/=0 .AND. NOM/=NM) THEN OS => OMESH(NOM)%PARTICLE_SEND_BUFFER - IF (OS%N_REALS+LP%N_REALS>OS%N_REALS_DIM) THEN - CALL REALLOCATE_STORAGE_ARRAYS(OS,N_REALS=OS%N_REALS_DIM,N_REALS_NEW=OS%N_REALS_DIM+10*LP%N_REALS) - OS%N_REALS_DIM = OS%N_REALS_DIM + 10*LP%N_REALS + IF (OS%N_REALS+LPC%N_REALS>OS%N_REALS_DIM) THEN + CALL REALLOCATE_STORAGE_ARRAYS(OS,N_REALS=OS%N_REALS_DIM,N_REALS_NEW=OS%N_REALS_DIM+10*LPC%N_REALS) + OS%N_REALS_DIM = OS%N_REALS_DIM + 10*LPC%N_REALS ENDIF - IF (OS%N_INTEGERS+LP%N_INTEGERS>OS%N_INTEGERS_DIM) THEN - CALL REALLOCATE_STORAGE_ARRAYS(OS,N_INTEGERS=OS%N_INTEGERS_DIM,N_INTEGERS_NEW=OS%N_INTEGERS_DIM+10*LP%N_INTEGERS) - OS%N_INTEGERS_DIM = OS%N_INTEGERS_DIM + 10*LP%N_INTEGERS + IF (OS%N_INTEGERS+LPC%N_INTEGERS>OS%N_INTEGERS_DIM) THEN + CALL REALLOCATE_STORAGE_ARRAYS(OS,N_INTEGERS=OS%N_INTEGERS_DIM,N_INTEGERS_NEW=OS%N_INTEGERS_DIM+10*LPC%N_INTEGERS) + OS%N_INTEGERS_DIM = OS%N_INTEGERS_DIM + 10*LPC%N_INTEGERS ENDIF - IF (OS%N_LOGICALS+LP%N_LOGICALS>OS%N_LOGICALS_DIM) THEN - CALL REALLOCATE_STORAGE_ARRAYS(OS,N_LOGICALS=OS%N_LOGICALS_DIM,N_LOGICALS_NEW=OS%N_LOGICALS_DIM+10*LP%N_LOGICALS) - OS%N_LOGICALS_DIM = OS%N_LOGICALS_DIM + 10*LP%N_LOGICALS + IF (OS%N_LOGICALS+LPC%N_LOGICALS>OS%N_LOGICALS_DIM) THEN + CALL REALLOCATE_STORAGE_ARRAYS(OS,N_LOGICALS=OS%N_LOGICALS_DIM,N_LOGICALS_NEW=OS%N_LOGICALS_DIM+10*LPC%N_LOGICALS) + OS%N_LOGICALS_DIM = OS%N_LOGICALS_DIM + 10*LPC%N_LOGICALS ENDIF OS%N_ITEMS = OS%N_ITEMS + 1 diff --git a/Source/type.f90 b/Source/type.f90 index 371f9c06e83..7c8fff082ad 100644 --- a/Source/type.f90 +++ b/Source/type.f90 @@ -131,9 +131,9 @@ MODULE TYPES INTEGER :: NEAREST_RAD_ANGLE_INDEX=0 !< Index of the radiation angle nearest the given orientation vector INTEGER :: CNF_RAMP_INDEX=-1 !< Ramp index for Cumulative Number Fraction function INTEGER :: BREAKUP_CNF_RAMP_INDEX=-1 !< Ramp index for break-up Cumulative Number Fraction function - INTEGER :: N_STORAGE_REALS=0 !< Number of reals to store for this particle class - INTEGER :: N_STORAGE_INTEGERS=0 !< Number of integers to store for this particle class - INTEGER :: N_STORAGE_LOGICALS=0 !< Number of logicals to store for this particle class + INTEGER :: N_REALS=0 !< Number of reals to store for this particle class + INTEGER :: N_INTEGERS=0 !< Number of integers to store for this particle class + INTEGER :: N_LOGICALS=0 !< Number of logicals to store for this particle class INTEGER :: NEW_PARTICLE_INCREMENT=1000 !< Number of new storage slots to allocate when NPLDIM is exceeded INTEGER :: EVAP_MODEL !< Evaporation correlation @@ -392,9 +392,6 @@ MODULE TYPES INTEGER :: DUCT_CELL_INDEX=0 !< Index of duct cell INTEGER :: CFACE_INDEX=0 !< Index of immersed boundary CFACE that the droplet has attached to INTEGER :: PROP_INDEX=0 !< Index of the PROPERTY_TYPE assigned to the particle - INTEGER :: N_REALS=0 !< Number of reals to pack into restart or send/recv buffer - INTEGER :: N_INTEGERS=0 !< Number of integers to pack into restart or send/recv buffer - INTEGER :: N_LOGICALS=0 !< Number of logicals to pack into restart or send/recv buffer LOGICAL :: SHOW=.FALSE. !< Show the particle in Smokeview LOGICAL :: SPLAT=.FALSE. !< The liquid droplet has hit a solid