What is Idefix?

Idefix is a computational fluid dynamics code based on a finite-volume, high-order Godunov method, originally designed for astrophysical fluid dynamics. It is performance-portable: thanks to the Kokkos framework, a single C++20 codebase runs on your laptop's CPU and on the largest GPU exascale clusters — in serial, with OpenMP and/or MPI, and with GPU offloading (NVIDIA CUDA, AMD HIP).

It solves the compressible hydrodynamics (HD) and magnetohydrodynamics (MHD) equations in 1D, 2D and 3D on Cartesian, polar and spherical grids, with a wide choice of Riemann solvers and reconstruction schemes.

Gas and dust density in a polydisperse dust-settling-instability simulation run with Idefix

Features

Physics and numerics, all embedded in one performance-portable code.

  • Godunov finite-volume

    High-order Godunov scheme for compressible HD & MHD (1D/2D/3D) with constrained transport, a choice of Riemann solvers (HLLE/HLLD/HLLC, Roe…) and reconstruction (linear, PPM).

  • Performance portable

    One C++20 codebase for CPUs (serial, OpenMP, MPI) and GPUs (NVIDIA CUDA, AMD HIP) through Kokkos — no per-architecture rewrite.

  • Any geometry

    Cartesian, cylindrical/polar and spherical geometries, with variable mesh spacing.

  • Non-ideal MHD & diffusion

    Ohmic, ambipolar and Hall MHD; viscosity, thermal diffusion, super-time-stepping and Braginskii terms.

  • Modules

    Orbital advection (FARGO), self-gravity, dust fluids, planet–disc interaction, radiative transfer (M1), grid coarsening and a Python interface (Pydefix).

  • Validated & tested

    Extensive test suite validated against analytical solutions, continuous integration, and built-in profiling and debugging tools.

Exascale performance

Benchmarked on some of the largest accelerated supercomputers in Europe.

  • 108+ cell/s per NVIDIA V100 GPU (MHD)
  • 3×1011 cell/s on 1024 GPUs (AdAstra)
  • 95% parallel efficiency over 256 nodes
  • 6× more energy-efficient on GPU vs CPU
  • 4096 AMD MI250X GPUs (LUMI-G)

Idefix has been successfully tested on Intel and AMD CPUs (up to 131 072 CPU cores on Irene-Rome at TGCC) as well as on NVIDIA and AMD GPUs (up to 1024 GPUs on AdAstra at CINES, and 4096 MI250X on LUMI-G). It keeps excellent weak- and strong-scaling on both CPU and accelerated architectures, making it a mature exascale-ready open-source code.

Science with Idefix

Results obtained with the code. Figures reproduced from the open-access publications listed below.

Publications

If you use Idefix in your research, please cite the method paper.

  • Method paper Lesur, Baghdadi, Wafflard-Fernandez, Mauxion, Robert & Van den Bossche 2023, “IDEFIX: a versatile performance-portable Godunov code for astrophysical flows”, A&A 677, A9.
    DOI · arXiv · ADS
  • Planet–disc Wafflard-Fernandez & Lesur 2025, “Gone with the wind: the outward migration of eccentric giant planets in windy disks”, A&A 696, A8.
    DOI · arXiv · ADS
  • VSI Lesur, Latter & Ogilvie 2025, “High-resolution models of the vertical shear instability”, A&A 703, A225.
    DOI · arXiv · ADS
  • Inner disc Roberts, Latter & Lesur 2026, “Global magnetohydrodynamic simulations of the inner regions of protoplanetary discs. II. Vertical-net-flux regime”, MNRAS 548, stag609.
    DOI · arXiv · ADS
  • ICM turbulence Kempf et al. 2025, “Non-linear saturation and energy transport in global simulations of magneto-thermal turbulence in the stratified intracluster medium”, A&A 694, A25.
    DOI · arXiv · ADS
  • Dust Aly & Paardekooper 2025, “Non-linear evolution of the unstratified polydisperse dust settling instability”, A&A 701, A105.
    DOI · arXiv · ADS
  • Radiative transfer Scepi & Lesur 2026, “A nonrelativistic radiative transfer module for IDEFIX”, A&A 711, A134.
    DOI · arXiv · ADS

Contributors

The main contributors to the Idefix code.

Geoffroy Lesur
Geoffroy Lesur
Code design & architecture
@glesur
Soufiane Baghdadi
Soufiane Baghdadi
Code optimisation, 2D Riemann solvers, RKL scheme
Gaylor Wafflard-Fernandez
Gaylor Wafflard-Fernandez
Planet–disc interaction
Jonah Mauxion
Jonah Mauxion
Self-gravity module
Clément Robert
Clément Robert
Continuous integration, linter
@neutrinoceros
Jean Kempf
Jean Kempf
Anisotropic diffusion & collisionless thermal conduction
@jbkempf
Victor Reville
Victor Reville
Anisotropic diffusion & collisionless thermal conduction
@vreville
François Rincon
François Rincon
Anisotropic diffusion & collisionless thermal conduction
website
Marc Coiffier
Marc Coiffier
Continuous integration, automatic benchmarking
@lih
Sébastien Valat
Sébastien Valat
Continuous integration, MPI fallback
@svalat

Plus many more — see all GitHub contributors. Photos from GitHub avatars / personal pages; initials where no public photo is available.

Get started in minutes

Clone, configure, compile, run — the same commands on a laptop or on a GPU cluster.

git clone --recurse-submodules https://github.com/idefix-code/idefix.git idefix
cd idefix
export IDEFIX_DIR=$PWD
cd test/HD/sod          # any example setup
cmake $IDEFIX_DIR       # add -DIdefix_MPI=ON, -DKokkos_ENABLE_CUDA=ON, ... as needed
make -j8
./idefix                # or: mpirun -np 8 ./idefix -dec 1 2 4