Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace invalid local id value -1 -> -stencil width. #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fsgrid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ template <typename T, int stencil> 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
Expand All @@ -395,7 +395,7 @@ template <typename T, int stencil> 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;
Expand Down