Skip to content

Commit

Permalink
NeighborList: Sign Compare Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Jan 5, 2024
1 parent bdc00ee commit 3dd5932
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Src/Particle/AMReX_NeighborList.H
Expand Up @@ -310,8 +310,8 @@ public:
m_pstruct = aos().dataPtr();
auto* const pstruct_ptr = aos().dataPtr();

const size_t np_total = aos.size();
const size_t np_real = src_tile.numRealParticles();
const int np_total = aos.size();
const int np_real = src_tile.numRealParticles();

auto const* off_bins_p = off_bins_v.data();
auto const* dxi_p = dxi_v.data();
Expand All @@ -333,7 +333,7 @@ public:

// First pass: count the number of neighbors for each particle
//---------------------------------------------------------------------------------------------------------
const size_t np_size = (num_bin_types > 1) ? np_total : np_real;
const int np_size = (num_bin_types > 1) ? np_total : np_real;
m_nbor_counts.resize( np_size+1, 0);
m_nbor_offsets.resize(np_size+1);

Expand Down
2 changes: 1 addition & 1 deletion Src/Particle/AMReX_NeighborParticlesI.H
Expand Up @@ -1065,7 +1065,7 @@ selectActualNeighbors (CheckPair&& check_pair, int num_cells)
if (isActualNeighbor) { break; }
int nbr_cell_id = (ii * ny + jj) * nz + kk;
for (auto p = poffset[nbr_cell_id]; p < poffset[nbr_cell_id+1]; ++p) {
if (pperm[p] == i) { continue; }
if (pperm[p] == int(i)) { continue; }
if (call_check_pair(check_pair, ptile_data, ptile_data, i, pperm[p])) {
IntVect cell_ijk = getParticleCell(pstruct[pperm[p]], plo, dxi, domain);
if (!box.contains(cell_ijk)) {
Expand Down

0 comments on commit 3dd5932

Please sign in to comment.