File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -141,9 +141,10 @@ struct Temperature {
141
141
// Based on the X coordinate compared to the global domain bounds and the Y coordinate compared to the MPI rank Y
142
142
// bounds (integers), return whether or not this translated coordinate is in bounds on this rank
143
143
bool translatedXYInBounds (const double x_translated, const double y_translated, const Grid grid) {
144
+ const int coord_x = Kokkos::round ((x_translated - grid.x_min ) / grid.deltax );
144
145
const int coord_y_global = Kokkos::round ((y_translated - grid.y_min ) / grid.deltax );
145
146
bool xy_in_bounds;
146
- if ((grid. x_min <= x_translated ) && (grid. x_max >= x_translated ) && (coord_y_global >= grid.y_offset ) &&
147
+ if ((coord_x >= 0 ) && (coord_x < grid. nx ) && (coord_y_global >= grid.y_offset ) &&
147
148
(coord_y_global < grid.y_offset + grid.ny_local ))
148
149
xy_in_bounds = true ;
149
150
else
You can’t perform that action at this time.
0 commit comments