d2q9: fix processing of non-wrapping borders
authorSebastian <git@sraa.de>
Thu, 1 Jan 1970 00:04:59 +0000 (00:04 +0000)
committerSebastian <git@sraa.de>
Thu, 1 Jan 1970 00:04:59 +0000 (00:04 +0000)
d2q9/esrc/d2q9.c

index bbe6091c360b7612887cab6a7474b651f22a7999..bc67bee41b20a728dfa3c1c1eac78530a5620108 100644 (file)
@@ -85,11 +85,11 @@ void d2q9_stream(d2q9_block_t f, int x, int y)
                if(next_row < 0)             { next_row += CORES_Y; }
                else if(next_row >= CORES_Y) { next_row -= CORES_Y; }
 #else
-               /* full bounce-back on all sides */
-               if(next_col < 0)             { return; }
-               else if(next_col >= CORES_X) { return; }
-               if(next_row < 0)             { return; }
-               else if(next_row >= CORES_Y) { return; }
+               /* don't stream from outside the domain */
+               if(next_col < 0)             { continue; }
+               else if(next_col >= CORES_X) { continue; }
+               if(next_row < 0)             { continue; }
+               else if(next_row >= CORES_Y) { continue; }
 #endif
 
                /* f: local block, g: local or remote block */