A physics-agnostic Fortran SDK for adaptive grids, and its solvers, from a laptop to GPU clusters
Documentation · Install · FLUME · PRISM · Citing
ADAM is a modern Fortran library for block-structured adaptive grids — Morton-ordered octree/quadtree AMR, immersed boundaries, WENO reconstruction, Runge-Kutta integration, the FLAIL elliptic solvers and parallel I/O — with a CPU backend (MPI, OpenMP) and a GPU backend (OpenACC with nvfortran, or OpenMP offloading with amdflang). Solvers are built on it by supplying their equations. Two are maintained:
- FLUME — compressible Euler and ideal MHD, with dissipative terms, gravity, self-gravity, cooling and sink particles;
- PRISM — Maxwell equations with particle-in-cell plasmas.
git clone https://github.com/szaghi/adam && cd adam
fobis fetch # dependencies
fobis build --mode flume-cpu-gnu # FLUME, CPU (gfortran + Open MPI)
fobis build --mode flume-fnl-nvf --varset local_nvf # FLUME, GPU (nvfortran); pick your machine's varset
cd src/tests/flume/regression/sod-x && mpirun -np 2 ../../../../../exe/adam_flume_cpu input.ini # a Sod tubeToolchains, HDF5 and the varsets are on the install page; the concepts, the cookbook and the input references are on the documentation site.
ADAM is dual-licensed under the MIT License and the GNU LGPLv3; you may choose either. If you use ADAM in published work, please cite it.