From 2459b29da325d38d9aebf60faab1cf45ac9d16c9 Mon Sep 17 00:00:00 2001 From: Yann Kempf Date: Mon, 10 May 2021 15:26:13 +0300 Subject: [PATCH] Replace invalid loval id value -1 -> -stencil width. --- fsgrid.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsgrid.hpp b/fsgrid.hpp index 526d0b1..7265238 100644 --- a/fsgrid.hpp +++ b/fsgrid.hpp @@ -382,7 +382,7 @@ template class FsGrid { } /*! Transform global cell coordinates into the local domain. - * If the coordinates are out of bounds, (-1,-1,-1) is returned. + * If the coordinates are out of bounds, (-stencil,-stencil,-stencil) is returned. * \param x The cell's global x coordinate * \param y The cell's global y coordinate * \param z The cell's global z coordinate @@ -395,7 +395,7 @@ template class FsGrid { if(retval[0] > localSize[0] || retval[1] > localSize[1] || retval[2] > localSize[2] || retval[0] < 0 || retval[1] < 0 || retval[2] < 0) { - return {-1,-1,-1}; + return {-stencil,-stencil,-stencil}; } return retval;