Skip to content

Features

GPU backends

ADAM supports three GPU-acceleration backends, all sharing the same numerical core:

BackendMacroCompilerParallelism model
NVF_NVFNVIDIA nvfortranCUDA Fortran device arrays and kernels
FNL_FNLNVIDIA nvfortranOpenACC + FUNDAL memory management
GMP_GMPIntel ifx / GNU gfortranOpenMP target offloading (experimental)

Each application (nasto, prism, …) compiles to separate executables per backend, sharing a common source tree under src/app/<name>/common/.


Adaptive Mesh Refinement

ADAM uses a Morton-order linearized octree/quadtree for AMR:

  • Blocks are sorted by Z-order (Morton) curve for cache-friendly traversal
  • Refinement and coarsening preserve conservation properties
  • Ghost cell exchange via MPI before every stencil operation
  • Configurable ghost cell width ngc (WENO5: 3, WENO7: 4)

Immersed Boundary Method

Complex and moving geometries are handled without body-fitted meshes:

  • Solid body positions are tracked on a background Cartesian grid
  • IB forcing reconstructs boundary conditions at cut cells
  • Eikonal-based signed distance field for geometry representation
  • Compatible with AMR — IB markers trigger local refinement

WENO Schemes

Weighted Essentially Non-Oscillatory finite difference reconstructions:

SchemeOrderGhost cells
WENO-33rdngc = 2
WENO-55thngc = 3
WENO-77thngc = 4
WENO-99thngc = 5
WENO-1111thngc = 6

Reconstruction variables: conservative or characteristic. Order-of-refinement (ROR) switching near shocks is supported.


Temporal Integration

Explicit Runge-Kutta multi-stage methods:

  • SSP-RK3, SSP-RK4, SSP-RK5(4), and standard RK schemes
  • CFL-based time step control
  • Optional leapfrog and Adams-Bashforth integrators

Field Memory Layout

5D field arrays (nv, ni, nj, nk, nb) with Fortran column-major storage:

  • nv — number of variables (density, momentum, energy, …)
  • ni, nj, nk — grid cells per block (including ghost cells)
  • nb — number of blocks (AMR + domain decomposition)

The leftmost index nv is contiguous in memory and is the innermost loop for CPU vectorization and GPU coalesced access.


Parallel I/O

  • HDF5 parallel output with ZLIB/SZIP compression
  • Restart files for checkpoint/resume
  • Slice extraction for in-situ visualization
  • XDMF metadata support for ParaView/VisIt

Compiler Support

CompilerGPU backendsCPU
NVIDIA nvfortran ≥ 25.3NVF, FNLYes
GNU gfortran ≥ 9Yes
Intel ifort / ifxGMP (experimental)Yes
AMD flangPlanned

Design Principles

  • KISS — keep it simple; prefer explicit Fortran over macro magic
  • Portable — a single source tree, per-backend preprocessor guards only where unavoidable
  • Evidence-based — profile first, optimize with benchmarks, document trade-offs
  • Standard-conforming — Fortran 2003+ OOP; implicit none everywhere; explicit intent on all arguments