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 660d8cc commit 4ca30da
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 @@ -976,14 +976,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 @@ -1021,14 +1014,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 4ca30da

Please sign in to comment.