Skip to content

Commit 76d6d34

Browse files
authored
Fix Pure SOA RedistributeGPU: size from ptile, not the AoS (#3330)
Follow-up to $2878. The proposed changes: - [x] fix a bug or incorrect behavior in AMReX - [ ] add new capabilities to AMReX - [ ] changes answers in the test suite to more than roundoff level - [ ] are likely to significantly affect the results of downstream AMReX users - [ ] include documentation in the code and/or rst files, if appropriate
1 parent b533128 commit 76d6d34

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Src/Particle/AMReX_ParticleContainerI.H

+1-7
Original file line numberDiff line numberDiff line change
@@ -1284,13 +1284,7 @@ ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt, Allocator>
12841284
auto index = std::make_pair(gid, tid);
12851285

12861286
auto& src_tile = plev[index];
1287-
auto& aos = src_tile.GetArrayOfStructs();
1288-
const size_t np = aos.numParticles();
1289-
1290-
AMREX_ASSERT_WITH_MESSAGE((NumRealComps() == 0 && NumIntComps() == 0) ||
1291-
aos.size() == src_tile.GetStructOfArrays().size(),
1292-
"The AoS and SoA data on this tile are different sizes - "
1293-
"perhaps particles have not been initialized correctly?");
1287+
const size_t np = src_tile.numParticles();
12941288

12951289
int num_stay = partitionParticlesByDest(src_tile, assign_grid, BufferMap(),
12961290
plo, phi, rlo, rhi, is_per, lev, gid, tid,

0 commit comments

Comments
 (0)