NESO-Particles
NESO-Particles is a performance portable library for particle data and looping operations for the fusion use case.

Overview
NESO-Particles (NP) is designed for representing particles with general properties that exist on and traverse unstructured meshes. We provide hardware independent abstractions for describing particle properties and looping operations. Users describe an algorithm in terms of these operations once then can execute the same code on CPU and GPU architectures without modification.
We prescribe a mesh interface specification which greatly decouples the particle specific components from mesh specific implementation details. This allows NP to be coupled to new libraries by creating a specific mesh interface for the new mesh representation. We provide a built-in Cartesian mesh, an in-development interface to PETSc DMPlex and a coupling to the Nektar++ mesh in the NESO project.
Note: As NP is an abstract library for data and looping operations, we do not provide any physics models or ‘solvers’ for a particular system of equations. We intend to be a library in which users can write such implementations.
Who it’s designed for
NESO-Particles allows domain specialists to describe particle-based algorithms in terms of particle data, mesh data and looping operations without significant expertise of HPC hardware required. An example of such a user is a tokamak exhaust physicist who wants to calculate neutral particle reaction physics.
Key benefits
Benefits of using NESO-Particles include:
- very general description of particle data and looping operations that are immediately portable to CPU and GPU architectures
- robust and efficient mechanisms for moving particles between MPI processes on domain decomposed unstructured meshes
- flexible interfaces for coupling to different mesh representations
NESO-Particles details
Technical specification
- Currently NESO-Particles is implemented as an MPI+SYCL library. However, for the highest-level interface we provide, users never have to write SYCL.
- Users should have a working understanding of MPI.
- Users should have a working understanding of “trivially copyable” and the “one definition rule” in C++.
Programming language
C++ 17
Compatible platforms / systems
- Any system with a MPI implementation and SYCL2020 implementation.
- Users should refer to https://excalibur-neptune.github.io/NESO-Particles/main/sphinx/html/guide-user/installation.html.
Dependencies
SYCL2020, MPI 3.0+, HDF5 (optional), PETSc (optional). See https://excalibur-neptune.github.io/NESO-Particles/main/sphinx/html/guide-user/installation.html.
System requirements
Linux supported. macOS is not officially supported due to time and hardware constraints. Windows is not supported (WSL should work).
Key features
The key features of NESO-Particles are:
- the ParticleGroup is a container which represents a collection of particles on a mesh
- ParticleSubGroup is a lightweight representation of a subset of a ParticleGroup
- ParticleLoop is a looping construct for looping over an iteration set of particles and applying an operation to all particles within the iteration set. Both ParticleGroup and ParticleSubGroup are valid iteration sets
- ParticleLoop APIs for accessing mesh data for the cell particles are contained in for read, write accumulate access
- ParticleLoop APIs for sampling random numbers
- ParticleLoop APIs for creating new particles from existing particles
- Input / Output (IO) via HDF5
- methods to create ParticleSubGroups easily – for example, create the sub-group of all particles which intersected the boundary
Use cases
- This is the particle component created in project NEPTUNE and hence is the particle component of NESO and all downstream projects from NESO that involve particles.
- Particle implementation for the VANTAGE-Reactions library.
Licence information
NESO-Particles is available under the MIT open source licence.
Support
Documentation is available on GitHub.
For support, use GitHub issues.
Development status
Active
Contributors
- Will Saunders
- The support of the UK Meteorological Office and Strategic Priorities Fund is acknowledged.
- NESO-Particles acknowledges funding from FARSCAPE.