From ee1aff8103e78e2747524610ad0c34c93570750a Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 1 Jan 1970 00:04:59 +0000 Subject: [PATCH] d2q9: fix processing of non-wrapping borders --- d2q9/esrc/d2q9.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/d2q9/esrc/d2q9.c b/d2q9/esrc/d2q9.c index bbe6091..bc67bee 100644 --- a/d2q9/esrc/d2q9.c +++ b/d2q9/esrc/d2q9.c @@ -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 */ -- 2.30.2