Skip to content

Commit

Permalink
Remove stencil calls from neighborList interface of linked cell list …
Browse files Browse the repository at this point in the history
…(still need to update getNeighbor)
  • Loading branch information
lebuller committed Nov 8, 2023
1 parent f071fd1 commit c2929af
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions core/src/Cabana_LinkedCellList.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -619,22 +619,21 @@ class NeighborList<LinkedCellList<DeviceType, ScalarType>>
using list_type = LinkedCellList<DeviceType, ScalarType>;

//! Get the maximum number of neighbors per particle.
template <class CellIndexType, class StencilType>
template <class CellIndexType>
KOKKOS_INLINE_FUNCTION static std::size_t
maxNeighbor( const list_type& list, const CellIndexType cell,
const StencilType stencil )
maxNeighbor( const list_type& list, const CellIndexType cell )
{
int total_count = 0;
for ( int p = 0; p < list.numParticles(); ++p )
total_count += numNeighbor( list, cell, stencil, p );
total_count += numNeighbor( list, cell, p );
return total_count;
}

//! Get the number of neighbors for a given particle index.
template <class CellIndexType, class StencilType>
template <class CellIndexType>
KOKKOS_INLINE_FUNCTION static std::size_t
numNeighbor( const list_type& list, const CellIndexType cell,
const StencilType stencil, const std::size_t particle_index )
const std::size_t particle_index )
{
int total_count = 0;
int imin, imax, jmin, jmax, kmin, kmax;
Expand Down

0 comments on commit c2929af

Please sign in to comment.