|
7 | 7 |
|
8 | 8 | ## Status |
9 | 9 |
|
| 10 | +[](https://github.com/jacobwilliams/NumDiff/releases/latest) |
10 | 11 |  |
| 12 | +[](https://codecov.io/gh/jacobwilliams/NumDiff) |
11 | 13 |
|
12 | 14 | This is currently a work in progress. The goal is a comprehensive library that contains a full suite of computationally efficient implementations of algorithms for sparsity determination and numerical differentiation. This code is hosted on GitHub at: https://github.com/jacobwilliams/NumDiff |
13 | 15 |
|
@@ -46,42 +48,48 @@ This is currently a work in progress. The goal is a comprehensive library that c |
46 | 48 |
|
47 | 49 | ### FPM |
48 | 50 |
|
49 | | -A `fmp.toml` file is provided for compiling roots-fortran with the [Fortran Package Manager](https://github.com/fortran-lang/fpm). For example, to build: |
| 51 | +A [Fortran Package Manager](https://github.com/fortran-lang/fpm) manifest file is included, so that the library and tests cases can be compiled with FPM. For example: |
50 | 52 |
|
51 | 53 | ``` |
52 | | - fpm build --profile release |
| 54 | +fpm build --profile release |
| 55 | +fpm test --profile release |
53 | 56 | ``` |
54 | 57 |
|
55 | | -And to run the unit tests: |
56 | | - |
57 | | -``` |
58 | | - fpm test |
| 58 | +To use `NumDiff` within your FPM project, add the following to your `fpm.toml` file: |
| 59 | +```toml |
| 60 | +[dependencies] |
| 61 | +NumDiff = { git="https://github.com/jacobwilliams/NumDiff.git" } |
59 | 62 | ``` |
60 | 63 |
|
61 | | -### FoBiS |
| 64 | +To generate the documentation using [FORD](https://github.com/Fortran-FOSS-Programmers/ford), run: |
62 | 65 |
|
63 | | -A [FoBiS](https://github.com/szaghi/FoBiS) configuration file (`numdiff.fobis`) is also provided that can also build the library and examples. Use the `mode` flag to indicate what to build. For example: |
| 66 | +``` |
| 67 | + ford numdiff.md |
| 68 | +``` |
64 | 69 |
|
65 | | - * To build all the examples using gfortran: `FoBiS.py build -f numdiff.fobis -mode tests-gnu` |
66 | | - * To build all the examples using ifort: `FoBiS.py build -f numdiff.fobis -mode tests-intel` |
67 | | - * To build a static library using gfortran: `FoBiS.py build -f numdiff.fobis -mode static-gnu` |
68 | | - * To build a static library using ifort: `FoBiS.py build -f numdiff.fobis -mode static-intel` |
| 70 | +By default, the library is built with double precision (`real64`) real values. Explicitly specifying the real kind can be done using the following processor flags: |
69 | 71 |
|
70 | | - The full set of modes are: `static-gnu`, `static-gnu-debug`, `static-intel`, `static-intel-debug`, `shared-gnu`, `shared-gnu-debug`, `shared-intel`, `shared-intel-debug`, `tests-gnu`, `tests-gnu-debug`, `tests-intel`, `tests-intel-debug` |
| 72 | +Preprocessor flag | Kind | Number of bytes |
| 73 | +----------------- | ----- | --------------- |
| 74 | +`REAL32` | `real(kind=real32)` | 4 |
| 75 | +`REAL64` | `real(kind=real64)` | 8 |
| 76 | +`REAL128` | `real(kind=real128)` | 16 |
71 | 77 |
|
72 | | - To generate the documentation using [ford](https://github.com/Fortran-FOSS-Programmers/ford), run: ```FoBis.py rule --execute makedoc -f numdiff.fobis``` |
| 78 | +For example, to build a single precision version of the library, use: |
73 | 79 |
|
74 | | - To run the test programs, run: ```FoBis.py rule --execute tests -f numdiff.fobis``` |
| 80 | +``` |
| 81 | +fpm build --profile release --flag "-DREAL32" |
| 82 | +``` |
75 | 83 |
|
76 | 84 | ## Documentation |
77 | 85 |
|
78 | | -The latest API documentation can be found [here](http://jacobwilliams.github.io/NumDiff/). This was generated from the source code using [FORD](https://github.com/Fortran-FOSS-Programmers/ford) (note that the included `build.sh` script will also generate these files). |
| 86 | +The latest API documentation can be found [here](https://jacobwilliams.github.io/NumDiff/). This was generated from the source code using [FORD](https://github.com/Fortran-FOSS-Programmers/ford) (note that the included `build.sh` script will also generate these files). |
79 | 87 |
|
80 | 88 | ## License |
81 | 89 |
|
82 | 90 | The NumDiff source code and related files and documentation are distributed under a permissive free software [license](https://github.com/jacobwilliams/NumDiff/blob/master/LICENSE) (BSD-style). |
83 | 91 |
|
84 | 92 | ## References |
85 | 93 |
|
86 | | - * J. Oliver, "An algorithm for numerical differentiation of a function of one real variable", Journal of Computational and Applied Mathematics 6 (2) (1980) 145–160. Fortran 77 code from [NIST](ftp://math.nist.gov/pub/repository/diff/src/DIFF) |
| 94 | + * J. Oliver, "An algorithm for numerical differentiation of a function of one real variable", Journal of Computational and Applied Mathematics 6 (2) (1980) 145-160. Fortran 77 code from [NIST](ftp://math.nist.gov/pub/repository/diff/src/DIFF) |
87 | 95 | * Thomas F. Coleman, Burton S. Garbow, Jorge J. More, "Algorithm 618: FORTRAN subroutines for estimating sparse Jacobian Matrices", ACM Transactions on Mathematical Software (TOMS), Volume 10 Issue 3, Sept. 1984, Pages 346-347 |
0 commit comments