Skip to content

Single Particle

Slattery, Stuart requested to merge (removed):fix_warnings into master

Adds a single particle to the library. This single particle is simply a tuple which holds access to multidimensional data of a trivial type for a single particle. This new class serves multiple purposes:

  • It provides a convenient get/set infrastructure for individual particles within a list of particles
  • It replaces the BufferParticle. The copy in this case should be more efficient than the byte-wise copy of the BufferParticle and also easier to maintain. This comes at the cost of potentially some extra memory usage because of the padding.
  • Because the particles themselves are trivial, one can make a Kokkos::View of these particles. This is effectively then an implementation of Array-of-Structs.
  • One should be able to easily use a Kokkos::View of particles with MPI because they are of trivial type by casting them to a char pointer.
  • This will hopefully also solve some potentially non-portable code that was doing a bunch of casting in the BufferParticle implementation as found by @gchen

Merge request reports