Skip to content

Commit ed3c8e7

Browse files
committed
Check stencil using particle cutoff, not background
1 parent 0b7d087 commit ed3c8e7

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

core/src/Cabana_VerletList.hpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,11 @@ struct VerletListBuilder
348348
{
349349
// See if we should actually check this box for
350350
// neighbors.
351-
if ( linked_cell_list.cellStencil()
352-
.grid.minDistanceToPoint(
353-
x_p, y_p, z_p, i, j, k ) <= rsqr )
351+
if ( withinCutoff(
352+
pid,
353+
linked_cell_list.cellStencil()
354+
.grid.minDistanceToPoint(
355+
x_p, y_p, z_p, i, j, k ) ) )
354356
{
355357
std::size_t n_offset =
356358
linked_cell_list.binOffset( i, j, k );
@@ -564,9 +566,11 @@ struct VerletListBuilder
564566
{
565567
// See if we should actually check this box for
566568
// neighbors.
567-
if ( linked_cell_list.cellStencil()
568-
.grid.minDistanceToPoint(
569-
x_p, y_p, z_p, i, j, k ) <= rsqr )
569+
if ( withinCutoff(
570+
pid,
571+
linked_cell_list.cellStencil()
572+
.grid.minDistanceToPoint(
573+
x_p, y_p, z_p, i, j, k ) ) )
570574
{
571575
// Check the particles in this bin to see if
572576
// they are neighbors.

0 commit comments

Comments
 (0)