Skip to content

Commit

Permalink
Merge pull request #27 from jacobwilliams/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jacobwilliams authored Dec 2, 2023
2 parents 62ada30 + c2c8284 commit d57fa08
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ jobs:

Build:
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
Expand All @@ -16,34 +18,37 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3.0.2
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up Python 3.x
uses: actions/setup-python@v1 # Use pip to install latest CMake, & FORD/Jin2For, etc.
- name: Install Python
uses: actions/setup-python@v4 # Use pip to install latest CMake, & FORD/Jin2For, etc.
with:
python-version: ${{ matrix.python-version }}

- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1

- name: Setup Fortran Package Manager
uses: fortran-lang/setup-fpm@v4
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Python dependencies
if: contains( matrix.os, 'ubuntu')
run: |
python -m pip install --upgrade pip
pip install matplotlib ford
pip install ford numpy matplotlib
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install GFortran Linux
if: contains( matrix.os, 'ubuntu')
run: |
sudo apt-get install lcov
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y gcc-${{ matrix.gcc_v }} gfortran-${{ matrix.gcc_v }}
sudo update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc_v }} 100 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ matrix.gcc_v }} \
Expand All @@ -58,14 +63,15 @@ jobs:
- name: Create coverage report
run: |
mkdir -p ${{ env.COV_DIR }}
lcov --capture --initial --base-directory . --directory build/gfortran_*/ --output-file ${{ env.COV_DIR }}/coverage.base
lcov --capture --base-directory . --directory build/gfortran_*/ --output-file ${{ env.COV_DIR }}/coverage.capture
mv ./build/gfortran_*/*/* ${{ env.COV_DIR }}
lcov --capture --initial --base-directory . --directory ${{ env.COV_DIR }} --output-file ${{ env.COV_DIR }}/coverage.base
lcov --capture --base-directory . --directory ${{ env.COV_DIR }} --output-file ${{ env.COV_DIR }}/coverage.capture
lcov --add-tracefile ${{ env.COV_DIR }}/coverage.base --add-tracefile ${{ env.COV_DIR }}/coverage.capture --output-file ${{ env.COV_DIR }}/coverage.info
env:
COV_DIR: build/coverage

- name: Upload coverage report
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
files: build/coverage/coverage.info

Expand All @@ -74,7 +80,7 @@ jobs:

- name: Deploy Documentation
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@v4.3.3
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
branch: gh-pages # The branch the action should deploy to.
folder: doc # The folder the action should deploy.
6 changes: 3 additions & 3 deletions fpm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ include-dir = "src"
[install]
library = true

[[ test ]]
[[test]]
name = "single"
source-dir = "test"
main = "quadpack_tests_single.F90"

[[ test ]]
[[test]]
name = "double"
source-dir = "test"
main = "quadpack_tests_double.F90"

[[ test ]]
[[test]]
name = "quad"
source-dir = "test"
main = "quadpack_tests_quad.F90"
Expand Down
6 changes: 4 additions & 2 deletions src/quadpack_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4212,7 +4212,7 @@ subroutine dqc25c(f, a, b, c, Result, Abserr, Krul, Neval)

real(wp) :: ak22, amom0, amom1, amom2, cc, &
p2, p3, p4, resabs, resasc, u
integer :: i, isym, k, kp
integer :: i, isym, k
real(wp) :: fval(25) !! value of the function `f` at the points
!! `cos(k*pi/24)`, `k = 0, ..., 24`
real(wp) :: cheb12(13) !! chebyshev series expansion coefficients,
Expand All @@ -4226,6 +4226,8 @@ subroutine dqc25c(f, a, b, c, Result, Abserr, Krul, Neval)
real(wp) :: hlgth !! half-length of the interval
real(wp) :: centr !! mid point of the interval

integer,parameter :: kp = 0 !! unused variable for [[dqwgtc]]

real(wp), dimension(11), parameter :: x = [(cos(k*pi/24.0_wp), k=1, 11)]
!! the vector x contains the values `cos(k*pi/24)`,
!! `k = 1, ..., 11`, to be used for the chebyshev series
Expand Down Expand Up @@ -6941,7 +6943,7 @@ real(wp) function dqwgtc(x, c, p2, p3, p4, Kp)
real(wp), intent(in) :: p3
real(wp), intent(in) :: p4
real(wp), intent(in) :: x
integer, intent(in) :: Kp
integer, intent(in) :: Kp !! not used in this function

dqwgtc = 1.0_wp/(x - c)

Expand Down

0 comments on commit d57fa08

Please sign in to comment.