[FLASH-USERS] potential issue on map particle to grid at periodic boundary

Klaus Weide klaus at flash.uchicago.edu
Wed Mar 29 16:40:29 EDT 2017


On Mon, 27 Mar 2017, Suoqing Ji wrote:

> I’m mapping a few particle properties to grid variables, say, mapping 
> from particle MASS_PART_PROP to grid PDEN with CIC method. I initialized 
> uniformly distributed particles with sufficient large number, and set 
> all the boundary conditions to be periodic. I tested three setups with 
> UG and AMR:
> 
> Test 1: nxb=nyb=32, iProcs=2, jProcs=1
> Test 2: nxb=nyb=16, iProcs=4, jProcs=2
> Test 3: nxb=nyb=32, nblockx=2, nblocky=1, lrefine_max=1
> 
> All the tests have the same effective resolution, and should generate 
> the same mapping to PDEN. However, both Test 2 and Test 3 produce single 
> value PDEN as expected, while Test 1 produces artifacts at y-low and 
> y-high boundaries (see attached figure).
> 
> I think this issue is related with the boundaries along which there’s 
> only one block/processor with UG. Say, if I change set iProcs=1 in Test 
> 1, the same artifacts also begin to appear at x-low and x-high 
> boundaries. In addition, I did some additional tests with randomly 
> distributed particles, and can still see the artifacts (but less 
> obvious).

Please try the attached short patch and let me know whether it solves the 
problem.

Klaus
-------------- next part --------------
Index: source/Grid/GridParticles/GridParticlesMapToMesh/gr_ptApplyBCsOneBlk.F90
===================================================================
--- source/Grid/GridParticles/GridParticlesMapToMesh/gr_ptApplyBCsOneBlk.F90	(revision 25665)
+++ source/Grid/GridParticles/GridParticlesMapToMesh/gr_ptApplyBCsOneBlk.F90	(revision 25666)
@@ -53,11 +53,7 @@
   blkSize=blkLimits(HIGH,:)-blkLimits(LOW,:)+1
 
 
-#ifdef FLASH_GRID_UG
-  call Grid_getBlkBC(blockID, faces)
-#else
   call Grid_getBlkBC(blockID, ignoreMe, faces)
-#endif
 
 
   allCenters = 2**NDIM


More information about the flash-users mailing list