Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions paper/paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,29 @@ @INPROCEEDINGS{10820764
doi={10.1109/SCW63240.2024.00154}}

@software{Bourne_Gyselalib,
author = {Bourne, Emily and Grandgirard, Virginie and Asahi, Yuuichi and Bigot, Julien and Donnel, Peter and Hoffmann, Alexander and Kara, Abdelhadi and Krah, Philipp and Legouix, Baptiste and Malaboeuf, Etienne and Midou, Dorian and Munschy, Yann and Peybernes, Mathieu and Protais, Matthieu and Obrejan, Kevin and Padioleau, Thomas and Vidal, Pauline},
license = {MIT},
title = {{Gyselalib++}},
url = {https://github.com/gyselax/gyselalibxx},
version = {0.1.0}
doi = {10.21105/joss.08582},
url = {https://doi.org/10.21105/joss.08582},
year = {2025},
publisher = {The Open Journal},
volume = {10},
number = {113},
pages = {8582},
author = {Bourne, Emily and Grandgirard, Virginie and Asahi, Yuuichi and Bigot, Julien and Donnel, Peter and Hoffmann, Alexander and Kara, Abdelhadi and Krah, Philipp and Legouix, Baptiste and Malaboeuf, Etienne and Munschy, Yann and Obrejan, Kevin and Padioleau, Thomas and Protais, Matthieu and Vidal, Pauline},
title = {Gyselalib++: A Portable C++ Library for Semi-Lagrangian Kinetic and Gyrokinetic Simulations},
journal = {Journal of Open Source Software}
}

@software{kokkos-fft,
author = {{The kokkos-fft team}},
title = {{kokkos-fft}},
url = {https://github.com/kokkos/kokkos-fft},
version = {0.3.0}
@article{kokkos-fft,
doi = {10.21105/joss.08391},
url = {https://doi.org/10.21105/joss.08391},
year = {2025},
publisher = {The Open Journal},
volume = {10},
number = {111},
pages = {8391},
author = {Asahi, Yuuichi and Padioleau, Thomas and Zehner, Paul and Bigot, Julien and Lebrun-Grandie, Damien},
title = {kokkos-fft: A shared-memory FFT for the Kokkos ecosystem},
journal = {Journal of Open Source Software}
}

@software{Pusz_mp-units_2024,
Expand Down
12 changes: 9 additions & 3 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@ authors:
orcid: 0000-0002-3469-2338
affiliation: 2

- name: Baptiste Legouix
orcid: 0009-0006-7585-669X
affiliation: 3

affiliations:

- name: Université Paris-Saclay, UVSQ, CNRS, CEA, Maison de la Simulation, 91191, Gif-sur-Yvette, France
index: 1
- name: SCITAS, EPFL, CH-1015 Lausanne, Switzerland
index: 2
date: 03 April 2025
- name: CEA, IRFM, 13108 Saint-Paul-lez-Durance Cedex, France
index: 3
date: 31 October 2025
bibliography: paper.bib

---
Expand All @@ -47,7 +53,7 @@ Many programming languages commonly used in scientific computing support multidi

Despite their importance, multidimensional arrays introduce several practical challenges. In a sense, they encourage the usage of implicit information in the source code. A frequent source of errors is the inadvertent swapping of indices when accessing elements. Such errors can be difficult to detect, especially given the common convention of using single-letter variable names like `i` and `j` for indexing. Another challenge in medium to large codebases is the lack of semantic clarity in function signatures when using raw multidimensional arrays. When array dimensions carry specific meanings, this information is not explicitly represented in the source code, leaving it up to the user to ensure that dimensions are ordered correctly according to implicit expectations. For example it is quite usual to use the same index for multiple interpretations: looping over mesh cells identified by `i` and interpreting `i+1` as the face to the right. Another example is slicing that removes dimensions, this can shift the positions of remaining dimensions, altering the correspondence between axis indices and their semantic meanings.

Solutions have been proposed to address these issues. For example in Python, the Xarray [@hoyer2017xarray] library allows users to label dimensions that can then be used to perform computations. Following a similar approach, the "Discrete Domain Computation" (DDC) library aims to bring equivalent functionality to the C++ ecosystem. It uses a zero overhead abstraction approach, i.e. with labels fixed at compile-time, on top of different performant portable libraries, such as: Kokkos [@9485033], Kokkos Kernels [@rajamanickam2021kokkos], kokkos-fft [@kokkos-fft] and Ginkgo [@GinkgoJoss2020]. Labelling at compile time is achieved by strongly typing dimensions, an approach similar to that used in units libraries such as mp-units [@Pusz_mp-units_2024], which strongly type quantities rather than dimensions.
Solutions have been proposed to address these issues. For example in Python, the Xarray [@hoyer2017xarray] library allows users to label dimensions that can then be used to perform computations. Following a similar approach, the "Discrete Domain Computation" (DDC) library aims to bring equivalent functionality to the C++ ecosystem. It uses a zero overhead abstraction approach, i.e. with labels fixed at compile-time, on top of different performant portable libraries, such as: Kokkos [@9485033, @9502936], Kokkos Kernels [@rajamanickam2021kokkos], kokkos-fft [@kokkos-fft] and Ginkgo [@GinkgoJoss2020]. Labelling at compile time is achieved by strongly typing dimensions, an approach similar to that used in units libraries such as mp-units [@Pusz_mp-units_2024], which strongly type quantities rather than dimensions.

The library is actively used to modernize the Fortran-based Gysela plasma simulation code [@Bourne_Gyselalib]. This simulation code relies heavily on high-dimensional arrays. While the data stored in the arrays has 7 dimensions, each dimension can have multiple representations, including Fourier, spline, Cartesian, and various curvilinear meshes. The legacy Fortran implementation, used to manipulate multi-dimensional arrays that stored slices of all the possible dimensions with very limited information about which dimensions were actually represented to enforce correctness at the API level. DDC enables a more explicit, strongly-typed representation of these arrays, ensuring at compile-time that function calls respect the expected dimensions. This reduces indexing errors and improves code maintainability, particularly in large-scale scientific software.

Expand Down Expand Up @@ -95,7 +101,7 @@ The library provides several ways to group `DiscreteElement` into sets, each rep

### Multidimensional algorithms

Finally, DDC offers multidimensional algorithms to manipulate the containers and associated `DiscreteElement` indices such as parallel loops and reductions. The parallel versions are based on Kokkos providing performance portability. DDC also provides transform-based algorithms such as discrete Fourier transforms (via a Kokkos-fft wrapper) and spline transforms, enabling conversions between sampled data and coefficients in Fourier or B-spline bases over labeled dimensions.
Finally, DDC offers multidimensional algorithms to manipulate the containers and associated `DiscreteElement` indices such as parallel loops and reductions. The parallel versions are based on Kokkos providing performance portability. DDC also provides transform-based algorithms such as discrete Fourier transforms (via a Kokkos-fft wrapper) and spline transforms [@10820764], enabling conversions between sampled data and coefficients in Fourier or B-spline bases over labeled dimensions.

## Acknowledgements

Expand Down