Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add f90 interface to minpack

  • Loading branch information...
commit ee9134ba2182f378546d92643bb7bf67d6583552 1 parent 01e2eb1
@certik authored
Showing with 51 additions and 0 deletions.
  1. +2 −0  src/CMakeLists.txt
  2. +49 −0 src/minpack.f90
View
2  src/CMakeLists.txt
@@ -5,6 +5,8 @@ set(SRC
dogleg.f fdjac2.f hybrd.f lmder.f lmstr1.f qrfac.f ssqfcn.f
dpmpar.f grdfcn.f hybrj1.f lmdif1.f lmstr.f qrsolv.f ssqjac.f
enorm.f hesfcn.f hybrj.f lmdif.f objfcn.f r1mpyq.f vecfcn.f
+
+ minpack.f90
)
add_definitions(-std=legacy -Wno-implicit-interface)
View
49 src/minpack.f90
@@ -0,0 +1,49 @@
+module minpack
+implicit none
+
+interface
+
+ double precision function dpmpar(i)
+ integer i
+ end function
+
+ double precision function enorm(n,x)
+ integer n
+ double precision x(n)
+ end function
+
+ subroutine lmder1(fcn,m,n,x,fvec,fjac,ldfjac,tol,info,ipvt,wa,lwa)
+ integer m,n,ldfjac,info,lwa
+ integer ipvt(n)
+ double precision tol
+ double precision x(n),fvec(m),fjac(ldfjac,n),wa(lwa)
+ interface
+ subroutine fcn(m,n,x,fvec,fjac,ldfjac,iflag)
+ implicit none
+ integer, intent(in) :: m,n,ldfjac,iflag
+ double precision, intent(in) :: x(n)
+ double precision, intent(out) :: fvec(m),fjac(ldfjac,n)
+ end subroutine
+ end interface
+ end subroutine
+
+ subroutine lmdif1(fcn,m,n,x,fvec,tol,info,iwa,wa,lwa)
+ integer m,n,info,lwa
+ integer iwa(n)
+ double precision tol
+ double precision x(n),fvec(m),wa(lwa)
+ interface
+ subroutine fcn(m,n,x,fvec,iflag)
+ implicit none
+ integer, intent(in) :: m,n,iflag
+ double precision, intent(in) :: x(n)
+ double precision, intent(out) :: fvec(m)
+ end subroutine
+ end interface
+ end subroutine
+
+end interface
+
+contains
+
+end module
Please sign in to comment.
Something went wrong with that request. Please try again.