Skip to content

Commit

Permalink
updates to ford documentation. (#14)
Browse files Browse the repository at this point in the history
* Minor updates to ford documentation and Travis configuration.
  • Loading branch information
jacobwilliams authored Nov 2, 2019
1 parent a008f7a commit 490e4d7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ before_install:
- sudo apt-get install graphviz
- sudo ln -fs /usr/bin/gfortran-4.9 /usr/bin/gfortran && gfortran --version
- sudo -H pip install FoBiS.py && FoBiS.py --version
- sudo -H pip install ford==5.0.6 && ford --version
- sudo -H pip install --upgrade markdown==2.6.9
- sudo -H pip install ford && ford --version
- sudo -H pip install matplotlib
- export PATH=".:$PATH"

Expand All @@ -25,6 +24,7 @@ script:
- ./bin/slsqp_test_2
- ./bin/slsqp_test_3
- ./bin/slsqp_test_71
- ./bin/slsqp_test_stopping_criterion

after_success:
- git config --global user.name "TRAVIS-CI-for-$(git --no-pager show -s --format='%cn' $TRAVIS_COMMIT)"
Expand Down
1 change: 1 addition & 0 deletions slsqp.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ display: protected
source: true
graph: true
exclude: pyplot_module.f90
exclude_dir: ./src/tests
extra_mods: pyplot_module:https://github.com/jacobwilliams/pyplot-fortran
iso_fortran_env:https://gcc.gnu.org/onlinedocs/gfortran/ISO_005fFORTRAN_005fENV.html

Expand Down
8 changes: 5 additions & 3 deletions src/slsqp_core.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1832,12 +1832,14 @@ end subroutine h12
!>
! Compute orthogonal rotation matrix.
!
! Compute matrix \( \left[ \begin{array}{cc} c & s \\ -s & c \end{array} \right] \)
! so that \(
! Compute matrix $$ \left[ \begin{array}{cc} c & s \\ -s & c \end{array} \right] $$
! so that
!
! $$
! \left[ \begin{array}{cc} c & s \\ -s & c \end{array} \right]
! \left[ \begin{array}{c} a \\ b \end{array} \right] =
! \left[ \begin{array}{c} \sqrt{a^2+b^2} \\ 0 \end{array} \right]
! \)
! $$
!
! Compute \( \sigma = \sqrt{a^2+b^2} \)
!
Expand Down
23 changes: 6 additions & 17 deletions src/tests/slsqp_test_stopping_criterion.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,10 @@
!
! Test for the [[slsqp_module]].

module report_variable

use slsqp_kinds

implicit none

real(wp) :: flast
real(wp),dimension(2) :: xlast
real(wp),dimension(1) :: clast

end module

program slsqp_test_criterion
program slsqp_test_stopping_criterion

use slsqp_module
use slsqp_kinds
use report_variable

implicit none

Expand All @@ -41,6 +28,9 @@ program slsqp_test_criterion
integer :: istat !! for solver status check
logical :: status_ok !! for initialization status check
integer :: iterations !! number of iterations by the solver
real(wp) :: flast
real(wp),dimension(2) :: xlast
real(wp),dimension(1) :: clast

x = [0.1_wp, 0.1_wp] !initial guess
xlast = x
Expand Down Expand Up @@ -111,9 +101,8 @@ subroutine rosenbrock_grad(me,x,g,a)
end subroutine rosenbrock_grad

subroutine report_iteration(me,iter,x,f,c)
use, intrinsic :: iso_fortran_env, only: output_unit
use report_variable
!! report an iteration (print to the console).
use, intrinsic :: iso_fortran_env, only: output_unit
implicit none
class(slsqp_solver),intent(inout) :: me
integer,intent(in) :: iter
Expand All @@ -139,5 +128,5 @@ subroutine report_iteration(me,iter,x,f,c)

end subroutine report_iteration

end program
end program slsqp_test_stopping_criterion
!*******************************************************************************

0 comments on commit 490e4d7

Please sign in to comment.