Skip to content

Commit

Permalink
fixup: linked cell return warning
Browse files Browse the repository at this point in the history
  • Loading branch information
streeve committed Nov 10, 2023
1 parent a472ab9 commit 0cad8dc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/Cabana_LinkedCellList.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@ class NeighborList<LinkedCellList<MemorySpace, Scalar>>
for ( int k = kmin; k < kmax; ++k )
{
total_count += list.binSize( i, j, k );
// This neighbor is in this bin.
if ( total_count > neighbor_index )
{
int particle_id = list.binOffset( i, j, k ) +
Expand All @@ -741,6 +742,11 @@ class NeighborList<LinkedCellList<MemorySpace, Scalar>>
}
previous_count = total_count;
}

assert( total_count <= totalNeighbor( list ) );

// Should never make it to this point.
return 0;
}
};

Expand Down

0 comments on commit 0cad8dc

Please sign in to comment.