Skip to content

Commit

Permalink
fixup: use getParticle in LinkedCell Neighbor
Browse files Browse the repository at this point in the history
  • Loading branch information
streeve committed May 17, 2024
1 parent 5264ae5 commit ec1acc4
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions core/src/Cabana_LinkedCellList.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -977,14 +977,7 @@ class NeighborList<LinkedCellList<MemorySpace, Scalar, NumSpaceDim>>
{
int particle_id = list.binOffset( ijk ) +
( neighbor_index - previous_count );
if ( list.sorted() )
{
return particle_id + list.getParticleBegin();
}
else
{
return list.permutation( particle_id );
}
return list.getParticle( particle_id );
}
// Update previous to all bins so far.
previous_count = total_count;
Expand Down Expand Up @@ -1022,14 +1015,7 @@ class NeighborList<LinkedCellList<MemorySpace, Scalar, NumSpaceDim>>
{
int particle_id = list.binOffset( ij ) +
( neighbor_index - previous_count );
if ( list.sorted() )
{
return particle_id + list.getParticleBegin();
}
else
{
return list.permutation( particle_id );
}
return list.getParticle( particle_id );
}
// Update previous to all bins so far.
previous_count = total_count;
Expand Down

0 comments on commit ec1acc4

Please sign in to comment.