amrex
amrex copied to clipboard
Support SoA-Only Particles
Summary
Further updates of #2853 where @atmyers and @ax3l can also push to.
Additional background
Checklist
The proposed changes:
- [ ] fix a bug or incorrect behavior in AMReX
- [x] 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
@Thierry992 @atmyers let us make sure this PR is passing this week, because @Thierry992 and @np-eazy will use this in ImpactX for the hackathon next week :)
I think amrex::ParticleContainer::make_alike, e.g., in
// create a host-side particle buffer
auto tmp = pc.make_alike<amrex::PinnedArenaAllocator>();
is not yet working.
@Thierry992 please implement make_alike & ContainerLike for the new SoA container for ImpactX/WarpX:
https://github.com/AMReX-Codes/amrex/blob/826cd378f8ba0d844c64e1029f7914c3b066debd/Src/Particle/AMReX_ParticleContainer.H#L1248-L1271
@Thierry992 I think (Const)ParticleTile methods:
int numParticles () const { return m_aos_tile.numParticles(); }int numRealParticles () const { return m_aos_tile.numRealParticles(); }int numNeighborParticles () const { return m_aos_tile.numNeighborParticles(); }int numTotalParticles () const { return m_aos_tile.numTotalParticles() ; }
Do not yet return the number of particles for pure SoA particle containers, right?
@atmyers I updated this branch following AMReX' C++17 transition. Do you potentially have time to look further into the MPI debugging?
I fixed a couple of issues, the ImpactX examples seems to work on multiple ranks now.
Awesome - I merged development in and we can now fix the warnings and get this ready :rocket: :tada:
Looking right now in pyAMReX for changes from this PR to low-level data access: https://github.com/AMReX-Codes/pyamrex/pull/119
Currently, I cannot find these properties (this PR but old layout)
- ParticleTileType::size
- ParticleTileType::numParticles
- ParticleTileType::numRealParticles
- ParticleTileType::numNeighborParticles
- ParticleTileType::numTotalParticles
- ParticleTileDataType::getSuperParticle
update: Ah, maybe need to be explicit to resolve the sfinae in the methods in pybind code - all good.
@atmyers @WeiqunZhang shall we merge this now? :) That way, we have still two weeks to update downstream codes and fix potential regressions before tagging a new release.