Dual Numbers for Arbitrary Order Automatic Differentiation
This library performs automatic forward differentiation of code, by setting the independent variable to be of a specific type and initializing it's value and first derivative, then performing standard operations on it.
The code uses cmake and make to compile. Simple compilation, on unix-like systems, from the top source directory compile in the selected _build directory via
cmake -B_build .
cd _build
make
For windows compilation, either use a framework like MinGW and the above compilation, or cmake is integrated with visual studio.
The source code uses the fypp preprocessor for .F90 source files. This tool is downloaded during the compilation phase if not already installed. As a result, building the code has a requirement for Python3.5 or above.
In the build directory, after compilation type:
ctest
to run unit tests for a number of functions of the code with the current build.
The fortuno framework is used for testing, and is also downloaded during the compilation phase if not installed.
The github repository also runs these tests on push or PR for code changes, testing is currently performed for
| OS | Compiler | Version |
|---|---|---|
| Linux | gfortran | 13 |
| Linus | intel ifx | one-api latest |
| Windows | gfortran | mingw latest |
See
.github/workflows
for the actions that are invoked.
See the examples folder for demonstrations of the library. Again,
these are compiled by the cmake framework.
For more details, see Section 4 of the article
DNAOAD is licensed under the MIT license. The SPDX license identifier for this project is MIT.