Skip to content

Core ParticleList

Sam Reeve edited this page Sep 15, 2023 · 3 revisions

Overview

A ParticleList wraps the particle AoSoA, enables easier particle property management through type tagging, and facilitates a thread-level particle interface. Rather than extracting a single property for all particles as a slice does, the get() interface for a ParticleList returns all properties for a single particle.

Note that a thin wrapper exists in the grid subpackage for the ParticleList to interact with the grid.

Implementation

Cabana_ParticleList.hpp

Interface

template <class MemorySpace, class... FieldTags>
class ParticleList

Template Parameters

  • MemorySpace: Kokkos memory space
  • FieldTags...: Variadic list of particle property field tags

Examples

Usage

    auto fields = Cabana::ParticleTraits<Cabana::Field::Position<3>, Foo, Bar>();
    auto plist =
        Cabana::createParticleList<MemorySpace>( "test_particles", fields );

This is part of the Programming Guide series

Clone this wiki locally