This repository provides a Fortran Package Manager (fpm) compatible version of the dual number implementation for arbitrary-order automatic differentiation (DNAOAD).
src/— Fortran source modulesapp/— Executable programsdocs/— Documentation of module functionsfpm.toml— Project configuration file
- A Fortran compiler (e.g.,
gfortran,ifx) - A recent version of
fpm
To install fpm, visit:
👉 https://github.com/fortran-lang/fpm
From the project root:
FPM_FC=ifx fpm buildFPM_FC=ifx fpm run ex1By default, MAX_ORDER_DUALZN = 5. The example ex2 requires at least 10:
FPM_FC=ifx fpm run --flag "-DMAX_ORDER_DUALZN=10" ex2To build and run using real128 precision:
FPM_FC=ifx fpm build --flag "-DUSE_REAL128"Run ex2 with higher derivative order:
FPM_FC=ifx fpm run --flag "-DUSE_REAL128 -DMAX_ORDER_DUALZN=10" ex2