Changeset 4013 for palm/trunk/SOURCE


Ignore:
Timestamp:
Jun 3, 2019 7:19:03 AM (5 years ago)
Author:
raasch
Message:

index bugfix concerning reallocation of particle array

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/lpm_exchange_horiz.f90

    r3655 r4013  
    2525! -----------------
    2626! $Id$
     27! index bugfix concerning reallocation of particle array
     28!
     29! 3655 2019-01-07 16:51:22Z knoop
    2730! dz was replaced by dz(1) to allow for right vertical stretching
    2831!
     
    11911194!> particle array to assure enough memory is available.
    11921195!------------------------------------------------------------------------------!
    1193  SUBROUTINE realloc_particles_array (i,j,k,size_in)
     1196 SUBROUTINE realloc_particles_array( i, j, k, size_in )
    11941197
    11951198    IMPLICIT NONE
     
    12001203    INTEGER(iwp), INTENT(in), OPTIONAL             ::  size_in        !<
    12011204
    1202     INTEGER(iwp)                                   :: old_size        !<
    1203     INTEGER(iwp)                                   :: new_size        !<
    1204     TYPE(particle_type), DIMENSION(:), ALLOCATABLE :: tmp_particles_d !<
    1205     TYPE(particle_type), DIMENSION(500)            :: tmp_particles_s !<
     1205    INTEGER(iwp)                                   ::  old_size        !<
     1206    INTEGER(iwp)                                   ::  new_size        !<
     1207    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  tmp_particles_d !<
     1208    TYPE(particle_type), DIMENSION(500)            ::  tmp_particles_s !<
    12061209
    12071210    old_size = SIZE(grid_particles(k,j,i)%particles)
     
    12391242
    12401243    ENDIF
    1241     particles => grid_particles(k,j,i)%particles(1:number_of_particles)
    1242 
    1243     RETURN
     1244    particles => grid_particles(k,j,i)%particles(1:new_size)
     1245
    12441246 END SUBROUTINE realloc_particles_array
    1245 
    1246 
    12471247
    12481248
Note: See TracChangeset for help on using the changeset viewer.