[FLASH-USERS] Particles_sinkSyncWithParticles

Joshua Wall joshua.e.wall at gmail.com
Wed Apr 26 15:58:14 EDT 2017


Hello Flash Users,

      I'm currently running with multiple particle types, one of which is
sink particles. I've been debugging some of my own code, and in the process
came across the following in Particles_sinkSyncWithParticles.F90 (note in
the first call there is no mention of BLK_PART_PROP in the call):

#ifdef TYPE_PART_PROP
  call Grid_sortParticles(particles,NPART_PROPS,pt_numLocal,NPART_TYPES, &
       pt_maxPerProc,particlesPerBlk,TYPE_PART_PROP)
#else
  call Grid_sortParticles(particles,NPART_PROPS,pt_numLocal,NPART_TYPES, &
       pt_maxPerProc,particlesPerBlk,BLK_PART_PROP)
#endif
  ! Now update the pt_typeInfo data structure
  call pt_updateTypeDS(particlesPerBlk)

However, in other places in the code I normally see (like in
Particles_advance.F90 here):

  ! Sort particles there so we only have to move the minimum of them.
  !  Sort by type, and then within each sort by block

#ifdef TYPE_PART_PROP
  call Grid_sortParticles(particles,NPART_PROPS,pt_numLocal,NPART_TYPES, &
       pt_maxPerProc,particlesPerBlk,BLK_PART_PROP, TYPE_PART_PROP)
#else
  call Grid_sortParticles(particles,NPART_PROPS,pt_numLocal,NPART_TYPES, &
       pt_maxPerProc,particlesPerBlk,BLK_PART_PROP)
#endif


as well as in the description of pt_updateTypeDS I see:

!! NOTES
!!   The values are actually calculated already in Grid_sortParticles but
!!   encapsulation rules make recalculating there here easier than passing
them
!!   back and forth in data, etc.
!!
!!   If there is only one particle type, the operation is trivial.
!!   Otherwise, it is assumed that particles are sorted with the particle
!!   type as the sort key of highest priority, as in
!!
!!      call
Grid_sortParticles(particles,NPART_PROPS,pt_numLocal,NPART_TYPES, &
!!           pt_maxPerProc,particlesPerBlk,BLK_PART_PROP, TYPE_PART_PROP)

So my question is basically, should Particles_sinkSyncWithParticles be
modified to include the BLK_PART_PROP
in the call to Grid_sortParticles when TYPE_PART_PROP is defined as seen in
other sections of the code? Doing
so in my case seems to fix a problem where sinks and a second particle type
appear to get their places exchanged in the particles array after a
particle file is written (which calls Particles_sinkSyncWithParticles).

Cordially,

Josh
-- 
Joshua Wall
Doctoral Candidate
Department of Physics
Drexel University
3141 Chestnut Street
Philadelphia, PA 19104
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20170426/7aa92e39/attachment.htm>


More information about the flash-users mailing list