Skip to content

Commit 8266cd3

Browse files
committed
added FPM support
updates to readme and added logo
1 parent 4d5325f commit 8266cd3

8 files changed

Lines changed: 61 additions & 12 deletions

File tree

.github/workflows/CI.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,16 @@ jobs:
2828
- name: Setup Graphviz
2929
uses: ts-graphviz/setup-graphviz@v1
3030

31+
- name: Setup Fortran Package Manager
32+
uses: fortran-lang/setup-fpm@v3
33+
with:
34+
github-token: ${{ secrets.GITHUB_TOKEN }}
35+
3136
- name: Install Python dependencies
3237
if: contains( matrix.os, 'ubuntu')
3338
run: |
3439
python -m pip install --upgrade pip
35-
pip install ford FoBiS.py
40+
pip install ford
3641
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3742
3843
- name: Install GFortran Linux
@@ -46,13 +51,10 @@ jobs:
4651
--slave /usr/bingcov gcov /usr/bin/gcov-${GCC_V}
4752
4853
- name: Compile
49-
run: |
50-
FoBiS.py build -f numdiff.fobis -mode tests-gnu
54+
run: fpm build --profile release
5155

5256
- name: Run tests
53-
run: |
54-
./bin/dsm_test
55-
./bin/test1
57+
run: fpm test
5658

5759
- name: Build documentation
5860
run: ford ./numdiff.md

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
# NumDiff
1+
![NumDiff](media/logo.png)
2+
============
23

34
## Brief description
45

5-
NumDiff provides a modern Fortran interface for computing the Jacobian (derivative) matrix of `m` nonlinear functions which depend on `n` variables. The Jacobian matrix is required for various applications, including numerical optimization. The library also provides for computing the sparsity of this matrix, and returning the Jacobian in sparse or dense form.
6+
**NumDiff** provides a modern Fortran interface for computing the Jacobian (derivative) matrix of `m` nonlinear functions which depend on `n` variables. The Jacobian matrix is required for various applications, including numerical optimization. It can also be used to test the accuracy of gradients computed by other means. The library also provides for computing the sparsity of this matrix, and returning the Jacobian in sparse or dense form.
67

78
## Status
89

910
![CI Status](https://github.com/jacobwilliams/NumDiff/actions/workflows/CI.yml/badge.svg)
1011

11-
This is currently an experimental work in progress and is not production ready. 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
12+
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
1213

1314
### To Do
1415

@@ -43,6 +44,22 @@ This is currently an experimental work in progress and is not production ready.
4344

4445
## Building NumDiff
4546

47+
### FPM
48+
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:
50+
51+
```
52+
fpm build --profile release
53+
```
54+
55+
And to run the unit tests:
56+
57+
```
58+
fpm test
59+
```
60+
61+
### FoBiS
62+
4663
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:
4764

4865
* To build all the examples using gfortran: `FoBiS.py build -f numdiff.fobis -mode tests-gnu`

fpm.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name = "NumDiff"
2+
version = "1.5.0"
3+
author = "Jacob Williams"
4+
maintainer = "Jacob Williams"
5+
copyright = "Copyright (c) 2016-2021, Jacob Williams"
6+
license = "BSD-3"
7+
description = "Modern Fortran Numerical Differentiation Library"
8+
homepage = "https://github.com/jacobwilliams/NumDiff"
9+
10+
[library]
11+
source-dir = "src"
12+
13+
[install]
14+
library = true
15+
16+
[build]
17+
auto-executables = false
18+
auto-examples = false
19+
auto-tests = false
20+
21+
[[test]]
22+
name = "dsm_test"
23+
source-dir = "tests"
24+
main = "dsm_test.f90"
25+
26+
[[test]]
27+
name = "test1"
28+
source-dir = "tests"
29+
main = "test1.f90"

media/logo.png

156 KB
Loading

numdiff.fobis

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ cflags_heritage = True
2525
build_dir = ./lib/
2626
mod_dir = ./mod/
2727
obj_dir = ./obj/
28-
src = ./src/
28+
src = ./
2929
colors = True
3030
quiet = False
3131
log = False
@@ -40,7 +40,7 @@ cflags_heritage = True
4040
build_dir = ./lib/
4141
mod_dir = ./mod/
4242
obj_dir = ./obj/
43-
src = ./src/
43+
src = ./
4444
colors = True
4545
quiet = False
4646
log = False
@@ -55,7 +55,7 @@ cflags_heritage = True
5555
build_dir = ./bin/
5656
mod_dir = ./mod/
5757
obj_dir = ./obj/
58-
src = ./src/
58+
src = ./
5959
colors = True
6060
quiet = False
6161
log = False

numdiff.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
project: NumDiff
22
project_dir: ./src
33
output_dir: ./doc
4+
media_dir: ./media
45
project_github: https://github.com/jacobwilliams/NumDiff
56
summary: NumDiff -- Numerical Differentiation Library
67
author: Jacob Williams
File renamed without changes.

0 commit comments

Comments
 (0)